<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2germanfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:series="http://organizeseries.com/" version="2.0">

<channel>
	<title>Casa Rock!</title>
	
	<link>http://www.casa-rock.de</link>
	<description>Gedanken, Geschreibe, Musik, Software, Web. Alles was rockt!</description>
	<lastBuildDate>Mon, 17 Jun 2013 08:35:43 +0000</lastBuildDate>
	<language>de-DE</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=casarock&amp;url=http%3A%2F%2Fwww.casa-rock.de%2F&amp;language=de_DE&amp;category=text&amp;title=Casa+Rock%21&amp;description=Gedanken%2C+Geschreibe%2C+Musik%2C+Software%2C+Web.+Alles+was+rockt%21&amp;tags=development%2C+javascript%2Cmusic%2C+web" type="text/html" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CasaRockt" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="casarockt" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FCasaRockt" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.bloglines.com/sub/http://feeds.feedburner.com/CasaRockt" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FCasaRockt" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FCasaRockt" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FCasaRockt" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><item>
		<title>Nein, ich bin nicht interessiert!</title>
		<link>http://www.casa-rock.de/2013/06/17/nein-ich-bin-nicht-interessiert/</link>
		<comments>http://www.casa-rock.de/2013/06/17/nein-ich-bin-nicht-interessiert/#comments</comments>
		<pubDate>Mon, 17 Jun 2013 08:35:43 +0000</pubDate>
		<dc:creator>Carsten</dc:creator>
				<category><![CDATA[Sonstiges]]></category>
		<category><![CDATA[Glücksritter]]></category>
		<category><![CDATA[kooperationen]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.casa-rock.de/?p=1534</guid>
		<description><![CDATA[Liebe Kooperationspartnersuchende, nein, ich möchte keine Kooperation haben. Weder bezahlt, noch unbezahlt. Ich werde keine Artikel schreiben, egal für welches neue Portal. Auch möchte ich keine Werbung schalten oder andere SEO-Maßnahmen eurerseits unterstützen. Zum einen &#8230; <a href="http://www.casa-rock.de/2013/06/17/nein-ich-bin-nicht-interessiert/">Weiterlesen &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>Liebe Kooperationspartnersuchende,</p>
<p>nein, ich möchte keine Kooperation haben. Weder bezahlt, noch unbezahlt. Ich werde keine Artikel schreiben, egal für welches neue Portal. Auch möchte ich keine Werbung schalten oder andere SEO-Maßnahmen eurerseits unterstützen. Zum einen ist die Reichweite meines Blogs sehr gering und zum anderen, viel wichtigerem Teil, gehen mir solche Anfragen und SEO-Maßnahmen tierisch auf den Geist! </p>
<p>Ich werde weiterhin auf derartige Mails NICHT reagieren, auch wenn ihr ganz lieb follow-up Mails schreibt. Nutzt diese Zeit um gute Inhalte zu generieren, dann klappt&#8217;s auch mit Google.</p>
<p>Gruß<br />
Carsten!</p>
 <p><a href="http://www.casa-rock.de/?flattrss_redirect&amp;id=1534&amp;md5=dd039296111b6906749dc46465604d2d" title="Flattr" target="_blank"><img src="http://www.casa-rock.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/CasaRockt/~4/hOB9j3iYo8Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.casa-rock.de/2013/06/17/nein-ich-bin-nicht-interessiert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=casarock&amp;url=http%3A%2F%2Fwww.casa-rock.de%2F2013%2F06%2F17%2Fnein-ich-bin-nicht-interessiert%2F&amp;language=de_DE&amp;category=text&amp;title=Nein%2C+ich+bin+nicht+interessiert%21&amp;description=Liebe+Kooperationspartnersuchende%2C+nein%2C+ich+m%C3%B6chte+keine+Kooperation+haben.+Weder+bezahlt%2C+noch+unbezahlt.+Ich+werde+keine+Artikel+schreiben%2C+egal+f%C3%BCr+welches+neue+Portal.+Auch+m%C3%B6chte+ich+keine+Werbung+schalten+oder+andere...&amp;tags=Gl%C3%BCcksritter%2Ckooperationen%2CSEO%2Cdevelopment%2C+javascript%2Cmusic%2C+web" type="text/html" />
	</item>
		<item>
		<title>Firefox OS!</title>
		<link>http://www.casa-rock.de/2013/05/02/firefox-os/</link>
		<comments>http://www.casa-rock.de/2013/05/02/firefox-os/#comments</comments>
		<pubDate>Thu, 02 May 2013 20:07:51 +0000</pubDate>
		<dc:creator>Carsten</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Firefox OS]]></category>
		<category><![CDATA[Geeksphone]]></category>
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://www.casa-rock.de/?p=1522</guid>
		<description><![CDATA[Ich liebe HTML5 und alles, was in diesem Dunstkreis entsteht. Seien es abgefahrene Demos, beeindruckende Webseiten oder darauf basierende Mobiletelefonbetriebssysteme (gibts das Wort?). Ich hatte ein Palm Pre und bin immer noch angetan von WebOS. &#8230; <a href="http://www.casa-rock.de/2013/05/02/firefox-os/">Weiterlesen &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>Ich liebe HTML5 und alles, was in diesem Dunstkreis entsteht. Seien es abgefahrene Demos, beeindruckende Webseiten oder darauf basierende Mobiletelefonbetriebssysteme (gibts das Wort?). Ich hatte ein Palm Pre und bin immer noch angetan von WebOS. Unter dem Codenamen <em>Boot to Gecko</em> hat Mozilla schon vor einiger Zeit ihre Vision eines HTML5 basierenden Applikationslayers vorgestellt. Mittlerweile heißt das Projekt <a href="http://www.mozilla.org/en-US/firefox/partners/">Firefox OS</a> und wird langsam erwachsen. Ich beobachte die Entwicklung schon seit dem ersten auftauchen von Boot2Gecko.</p>
<p><span id="more-1522"></span><a href="http://farm9.staticflickr.com/8122/8702644396_c9a9b3e565_z.jpg" rel="lightbox[1522]"><img src="http://farm9.staticflickr.com/8122/8702644396_c9a9b3e565_z.jpg" width="320" height="320" class="alignright" /></a><br />
Mit dem <a href="http://www.geeksphone.com/">Geeksphone</a> Keon und Peak existieren nun auch zwei &#8220;echte&#8221; Telefone, die Firefox OS verwenden. Diese Telefone verstehen sich als Developer Preview und <a href="http://christianheilmann.com/2013/04/29/geeksphones-are-developer-tools/">nicht als Alltagstelefon</a>. </p>
<p>Heute brachte mir der nette UPS-Mann mein Geeksphone Keon. Erster Eindruck: Solide und trotz extrem günstigem Preis (ich habe 127,-Euro bezahlt) erstaunlich gut verarbeitet. Firefox OS ist intuitiv zu bedienen. Bisher habe ich nur mit den Apps und dem Marketplace herumgespielt. Den eigentlich interessanten Teil werde ich erst die Tage genauer betrachten können: <a href="https://developer.mozilla.org/de/docs/Mozilla/Firefox_OS">App-Entwicklung</a> unter Verwendung der Web-APIs. Falls ich dazu komme, werde ich hier darüber berichten. Ich hoffe sehr, dass Mozilla es im Gegensatz zu Palm (HP) schafft, eine solche Plattform salonfähig zu machen, zumal ich den Ansatz günstige Smartphones zu ermöglichen, sehr clever finde, denn nicht jeder kann sich ein Telefon für >600,-Euro leisten.  </p>
 <p><a href="http://www.casa-rock.de/?flattrss_redirect&amp;id=1522&amp;md5=8ff6d06b66ec320f7b861a0c08085963" title="Flattr" target="_blank"><img src="http://www.casa-rock.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/CasaRockt/~4/OiAg2qWhpso" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.casa-rock.de/2013/05/02/firefox-os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=casarock&amp;url=http%3A%2F%2Fwww.casa-rock.de%2F2013%2F05%2F02%2Ffirefox-os%2F&amp;language=de_DE&amp;category=text&amp;title=Firefox+OS%21&amp;description=Ich+liebe+HTML5+und+alles%2C+was+in+diesem+Dunstkreis+entsteht.+Seien+es+abgefahrene+Demos%2C+beeindruckende+Webseiten+oder+darauf+basierende+Mobiletelefonbetriebssysteme+%28gibts+das+Wort%3F%29.+Ich+hatte+ein+Palm+Pre+und+bin...&amp;tags=Firefox+OS%2CGeeksphone%2CMozilla%2Cdevelopment%2C+javascript%2Cmusic%2C+web" type="text/html" />
	</item>
		<item>
		<title>Document, are you ready?</title>
		<link>http://www.casa-rock.de/2013/03/29/document-are-you-ready/</link>
		<comments>http://www.casa-rock.de/2013/03/29/document-are-you-ready/#comments</comments>
		<pubDate>Fri, 29 Mar 2013 20:20:44 +0000</pubDate>
		<dc:creator>Carsten</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.casa-rock.de/?p=1511</guid>
		<description><![CDATA[Mal wieder ein kleiner Artikel, der aus &#8220;Warum immer jQuery&#8221; entsprungen ist. Ich bin ein sehr großer Freund der $(document).ready Funktion von jQuery. Das hätte ich gerne losgelöst von jQuery und ich habe mich mal &#8230; <a href="http://www.casa-rock.de/2013/03/29/document-are-you-ready/">Weiterlesen &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>Mal wieder ein kleiner Artikel, der aus &#8220;<a href="http://www.casa-rock.de/2013/03/18/warum-immer-jquery/">Warum immer jQuery</a>&#8221; entsprungen ist. Ich bin ein sehr großer Freund der <code>$(document).ready</code> Funktion von jQuery. Das hätte ich gerne losgelöst von jQuery und ich habe mich mal auf die Suche gemacht. </p>
<p>Wie immer (grob geschätzt) ca. 1000 Fragen und Antworten bei Stackoverflow. Viele Diskussionen über IE6-Support etc. Aber was, wenn man moderne Browser unterstützen will und keine alten Dinosaurier?</p>
<p><a href="https://developer.mozilla.org/en-US/docs/DOM/Mozilla_event_reference/readystatechange">MDN</a> schlägt folgendes vor:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;">document.<span style="color: #660066;">onreadystatechange</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">readyState</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;complete&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        initApplication<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Für meine Zwecke, und viele Browser ausreichend. Wer es etwas kompatibler möchte, kann die leichtgewichtige Bibliothek <a href="https://github.com/ded/domready">domready</a> benutzen.</p>
<p>Für meine Zwecke ist die MDN-Lösung ausreichend. Kennt jemand Alternativen?</p>
 <p><a href="http://www.casa-rock.de/?flattrss_redirect&amp;id=1511&amp;md5=5fdbd81fe23f9e87e040f3b9a906ab34" title="Flattr" target="_blank"><img src="http://www.casa-rock.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/CasaRockt/~4/keT8ipuEqr8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.casa-rock.de/2013/03/29/document-are-you-ready/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=casarock&amp;url=http%3A%2F%2Fwww.casa-rock.de%2F2013%2F03%2F29%2Fdocument-are-you-ready%2F&amp;language=de_DE&amp;category=text&amp;title=Document%2C+are+you+ready%3F&amp;description=Mal+wieder+ein+kleiner+Artikel%2C+der+aus+%26%238220%3BWarum+immer+jQuery%26%238221%3B+entsprungen+ist.+Ich+bin+ein+sehr+gro%C3%9Fer+Freund+der+%24%28document%29.ready+Funktion+von+jQuery.+Das+h%C3%A4tte+ich+gerne+losgel%C3%B6st+von+jQuery...&amp;tags=Javascript%2Cjquery%2Cdevelopment%2C+javascript%2Cmusic%2C+web" type="text/html" />
	</item>
		<item>
		<title>Versprochen ist versprochen – Javascript Promises</title>
		<link>http://www.casa-rock.de/2013/03/28/versprochen-ist-versprochen-javascript-promises/</link>
		<comments>http://www.casa-rock.de/2013/03/28/versprochen-ist-versprochen-javascript-promises/#comments</comments>
		<pubDate>Thu, 28 Mar 2013 14:23:39 +0000</pubDate>
		<dc:creator>Carsten</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[async]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[promises]]></category>

		<guid isPermaLink="false">http://www.casa-rock.de/?p=1506</guid>
		<description><![CDATA[Javascript Promises. Der heiße Scheiß, wenn es asynchron wird. Um zu verstehen, was das alles sein soll, hier mal ein paar gute Links zu sehr langen und sehr detaillierten Artikeln. What&#8217;s The Point Of Promises? &#8230; <a href="http://www.casa-rock.de/2013/03/28/versprochen-ist-versprochen-javascript-promises/">Weiterlesen &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>Javascript Promises. Der heiße Scheiß, wenn es asynchron wird. Um zu verstehen, was das alles sein soll, hier mal ein paar gute Links zu sehr langen und sehr detaillierten Artikeln.</p>
<p><a href="http://www.kendoui.com/blogs/teamblog/posts/13-03-28/what-is-the-point-of-promises.aspx">What&#8217;s The Point Of Promises?</a><br />
<a href="http://domenic.me/2012/10/14/youre-missing-the-point-of-promises/">You&#8217;re Missing the Point of Promises</a><br />
<a href="http://blogs.msdn.com/b/ie/archive/2011/09/11/asynchronous-programming-in-javascript-with-promises.aspx">Asynchronous Programming in JavaScript with “Promises”</a><br />
<a href="http://flaviocopes.com/deferred-and-promises-in-javascript/">Deferreds and Promises in JavaScript</a></p>
<p>Und da heutzutage nichts ohne Spezifikation geht:</p>
<p><a href="http://promises-aplus.github.com/promises-spec/">Promises/A+</a></p>
<p>Wenn ihr damit durch seid, wisst ihr warum Callbacks plötzlich nicht mehr cool sind. Ich bin noch am lesen&#8230;</p>
 <p><a href="http://www.casa-rock.de/?flattrss_redirect&amp;id=1506&amp;md5=f6cd7ab227122a34b86ad10a515533da" title="Flattr" target="_blank"><img src="http://www.casa-rock.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/CasaRockt/~4/JKN67vsNRD8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.casa-rock.de/2013/03/28/versprochen-ist-versprochen-javascript-promises/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=casarock&amp;url=http%3A%2F%2Fwww.casa-rock.de%2F2013%2F03%2F28%2Fversprochen-ist-versprochen-javascript-promises%2F&amp;language=de_DE&amp;category=text&amp;title=Versprochen+ist+versprochen+%26%238211%3B+Javascript+Promises&amp;description=Javascript+Promises.+Der+hei%C3%9Fe+Schei%C3%9F%2C+wenn+es+asynchron+wird.+Um+zu+verstehen%2C+was+das+alles+sein+soll%2C+hier+mal+ein+paar+gute+Links+zu+sehr+langen+und+sehr+detaillierten+Artikeln....&amp;tags=async%2CJavascript%2Cpromises%2Cdevelopment%2C+javascript%2Cmusic%2C+web" type="text/html" />
	</item>
		<item>
		<title>Teilweise jQuery</title>
		<link>http://www.casa-rock.de/2013/03/27/teilweise-jquery/</link>
		<comments>http://www.casa-rock.de/2013/03/27/teilweise-jquery/#comments</comments>
		<pubDate>Wed, 27 Mar 2013 21:16:49 +0000</pubDate>
		<dc:creator>Carsten</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[custom build]]></category>
		<category><![CDATA[grunt]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.casa-rock.de/?p=1468</guid>
		<description><![CDATA[Der Blogpost über das Tutorial auf Codeplayer könnte den Eindruck erwecken, dass ich jQuery nicht mag. Das ist nur zum Teil richtig. jQuery unterstützt im Umgang mit DOM oder XHR, hindert aber viele am erlernen &#8230; <a href="http://www.casa-rock.de/2013/03/27/teilweise-jquery/">Weiterlesen &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>Der <a href="http://www.casa-rock.de/2013/03/18/warum-immer-jquery/">Blogpost</a> über das Tutorial auf Codeplayer könnte den Eindruck erwecken, dass ich <a href="http://jquery.com/">jQuery</a> nicht mag. Das ist nur zum Teil richtig. jQuery unterstützt im Umgang mit DOM oder XHR, hindert aber viele am erlernen von &#8220;echtem&#8221; Javascript. Es bringt für viele Projekte sehr viel Overhead mit. Also was liegt näher, als jQuery selbst zu bauen oder im eigenen Build-Prozess zu integrieren und nur die Module zu benutzen, die man benötigt? Das haben wir bei meinem Arbeitgeber derzeit per Grunt relativ einfach gelöst. Wie wir das erreichen, möchte ich hier kurz skizzieren. </p>
<p>Ich gehe hier schamlos davon aus, dass Grunt als Build-Tool benutzt wird, falls nicht, auf <a href="http://gruntjs.com">gruntjs.com</a> lernt ihr es kennen und hoffentlich auch lieben. Der vorgestellt Task ist nicht in Stein gemeißelt, funktioniert aber für uns sehr gut.</p>
<p><span id="more-1468"></span>Damit wir jQuery selber bauen können, benötigen wir einen Clone aus dem <a href="https://github.com/jquery/jquery">offiziellen GitHub-Repository</a>. Da ich nicht sehr experimentierfreudig bin, hole ich mir den aktuellen stable branch.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">$ </span><span style="color: #c20cb9; font-weight: bold;">git clone</span> <span style="color: #660033;">-b</span> <span style="color: #000000;">1.9</span>-stable <span style="color: #c20cb9; font-weight: bold;">git</span><span style="color: #000000; font-weight: bold;">@</span>github.com:jquery<span style="color: #000000; font-weight: bold;">/</span>jquery.git</pre></td></tr></table></div>

<p>jQuery wird mit Grunt gebaut und bietet eine sehr komfortable Möglichkeit eine eigene Version zu bauen. Das geschieht über</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">$ </span>grunt custom:-deprecated,-ajax,...</pre></td></tr></table></div>

<p>Das werden wir nutzen um unsere Version im eigenen Build zu erstellen. Also erstellen wir ein Gruntfile.js und konfigurieren es nach unseren Wünschen. Dazu benötigen wir einen Task, der jQuery baut. Den nennen wir <code>jquery</code>. Um bauen zu können, müssen npm module per <code>npm install</code> im <code>jquery</code> Verzeichnis installiert werden. Außerdem müssen die Submodules, die jQuery nutzt, initialisiert werden und die Selector-Engine vorab gebaut werden. Mit diesem Vorwissen können wir den Grunt-Task aufbauen.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;">grunt.<span style="color: #660066;">registerTask</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'jquery'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'Build our own jquery'</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">var</span> jquery <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    	grunt.<span style="color: #660066;">log</span>.<span style="color: #660066;">write</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Build jquery.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        grunt.<span style="color: #660066;">util</span>.<span style="color: #660066;">spawn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
&nbsp;
            grunt<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
&nbsp;
            args<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">&quot;update_submodules&quot;</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// initialize jqueries submodules</span>
                <span style="color: #3366CC;">&quot;selector&quot;</span><span style="color: #339933;">,</span>          <span style="color: #006600; font-style: italic;">// build selector engine</span>
                <span style="color: #006600; font-style: italic;">// Build custom jquery with our needs!</span>
                <span style="color: #3366CC;">&quot;custom:-deprecated,-dimensions,-effects,-event-alias,-offset,-sizzle&quot;</span>
            <span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>error<span style="color: #339933;">,</span> result<span style="color: #339933;">,</span> code<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>error<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                grunt.<span style="color: #660066;">fail</span>.<span style="color: #660066;">fatal</span><span style="color: #009900;">&#40;</span>error<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
&nbsp;
            grunt.<span style="color: #660066;">util</span>.<span style="color: #660066;">spawn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
                grunt<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
                args<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;dist:../myjquery/&quot;</span>  <span style="color: #006600; font-style: italic;">// Copy our build to ../myjquery/</span>
            <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>error<span style="color: #339933;">,</span> result<span style="color: #339933;">,</span> code<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>error<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    grunt.<span style="color: #660066;">fail</span>.<span style="color: #660066;">fatal</span><span style="color: #009900;">&#40;</span>error<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
&nbsp;
                grunt.<span style="color: #660066;">file</span>.<span style="color: #660066;">setBase</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;..&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                grunt.<span style="color: #660066;">log</span>.<span style="color: #660066;">write</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Built custom jQuery successfully!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                done<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">var</span> done <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">async</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    grunt.<span style="color: #660066;">file</span>.<span style="color: #660066;">setBase</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;jquery&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 	<span style="color: #006600; font-style: italic;">// cd to jquery submodule</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>grunt.<span style="color: #660066;">file</span>.<span style="color: #660066;">exists</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;node_modules&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  <span style="color: #006600; font-style: italic;">// check if npm install has been run in jquery</span>
&nbsp;
    	grunt.<span style="color: #660066;">log</span>.<span style="color: #660066;">write</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Initialize npm modules for jquery&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        grunt.<span style="color: #660066;">util</span>.<span style="color: #660066;">spawn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
                cmd<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;npm&quot;</span><span style="color: #339933;">,</span>				<span style="color: #006600; font-style: italic;">// Init all npm modules.</span>
                args<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;install&quot;</span><span style="color: #009900;">&#93;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>error<span style="color: #339933;">,</span> result<span style="color: #339933;">,</span> code<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>error<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    grunt.<span style="color: #660066;">fail</span>.<span style="color: #660066;">fatal</span><span style="color: #009900;">&#40;</span>error<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
&nbsp;
                jquery<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	<span style="color: #006600; font-style: italic;">// execute our build-task</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
        jquery<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	<span style="color: #006600; font-style: italic;">// npm has already been run, go and build our jquery!</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Was passiert hier? Eigentlich ganz einfach. Wir wechseln in das <code>jquery</code> Verzeichnis, prüfen ob alle npm-Module installiert sind und führen das bei Bedarf aus. Anschließend rufen wir die Funktion <code>jquery()</code> auf. Hier wird der Grunt-Task mit den Parametern <code>update_submodules</code>, <code>selector</code> und der eigentlichen Konfiguration unseres jQuery-Builds aufgerufen: <code>custom:-deprecated,-dimensions,-effects,-event-alias,-offset,-sizzle</code>. Ist das durch, müssen wir die eigens erstelle Distribution noch mit dem von jQuery bereitgestelltem <code>dist:../myjquery/</code>-Task in das gewünschte Ziel-Verzeichnis kopieren.</p>
<p>Tadaaa! Ein beherztes <code>grunt jquery</code> erstellt eine eigene jQuery-Version mit den wirklich benötigten Modulen.</p>
<div class="yellow-box">Der oben stehende Grunt-Task stammt nicht alleine aus meiner Feder, sondern vielmehr waren meine Kollegen <a href="http://www.saschagoebel.com/">Sascha Göbel</a> und Frederic Schimmelpfennig maßgeblich daran beteiligt!</div>
 <p><a href="http://www.casa-rock.de/?flattrss_redirect&amp;id=1468&amp;md5=359bc2a659a52eaf13abec9b82e11ceb" title="Flattr" target="_blank"><img src="http://www.casa-rock.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/CasaRockt/~4/VRCWkqn9NEc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.casa-rock.de/2013/03/27/teilweise-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=casarock&amp;url=http%3A%2F%2Fwww.casa-rock.de%2F2013%2F03%2F27%2Fteilweise-jquery%2F&amp;language=de_DE&amp;category=text&amp;title=Teilweise+jQuery&amp;description=Der+Blogpost+%C3%BCber+das+Tutorial+auf+Codeplayer+k%C3%B6nnte+den+Eindruck+erwecken%2C+dass+ich+jQuery+nicht+mag.+Das+ist+nur+zum+Teil+richtig.+jQuery+unterst%C3%BCtzt+im+Umgang+mit+DOM+oder+XHR%2C...&amp;tags=custom+build%2Cgrunt%2CJavascript%2Cjquery%2Cdevelopment%2C+javascript%2Cmusic%2C+web" type="text/html" />
	</item>
		<item>
		<title>Devcamp Karlsruhe 2013</title>
		<link>http://www.casa-rock.de/2013/03/24/devcamp-karlsruhe-2013/</link>
		<comments>http://www.casa-rock.de/2013/03/24/devcamp-karlsruhe-2013/#comments</comments>
		<pubDate>Sun, 24 Mar 2013 16:57:46 +0000</pubDate>
		<dc:creator>Carsten</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[devcamp]]></category>
		<category><![CDATA[karlsruhe]]></category>
		<category><![CDATA[new relic]]></category>
		<category><![CDATA[versioneye]]></category>

		<guid isPermaLink="false">http://www.casa-rock.de/?p=1470</guid>
		<description><![CDATA[Endlich mal wieder ein Barcamp besucht! Dieses Jahr wurde in Karlsruhe am 23.03. und 24.03.2013 das erste Devcamp veranstaltet. Beherbergt wurde das Devcamp in den Räumlichkeiten von Gameforge in Karlsruhe. Wie der Name schon vermuten &#8230; <a href="http://www.casa-rock.de/2013/03/24/devcamp-karlsruhe-2013/">Weiterlesen &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>Endlich mal wieder ein Barcamp besucht! Dieses Jahr wurde in Karlsruhe am 23.03. und 24.03.2013 das erste <a href="http://www.nerd-zone.com/devcamp">Devcamp</a> veranstaltet. Beherbergt wurde das Devcamp in den Räumlichkeiten von <a href="http://de.gameforge.com/home/index">Gameforge</a> in Karlsruhe.<br />
Wie der Name schon vermuten lässt, lag der Schwerpunkt auf Softwareentwicklung und alles was dazu gehört. Es wurden Sessions wie <em>1&#215;1 der App-Entwicklung</em>, <em>Silicon Valley</em> oder auch <em>Deployment</em> angeboten. Die Sessions waren auf vier Räume und verteilt. Die Organisation war wunderbar &#8211; Essen, Trinken (auch Club Mate!) und Obst stand ausreichend bereit. Alle Sessions, denen ich beiwohnen konnte, waren ein Gewinn für mich. Insgesamt haben sich die beiden Tage in Karlsruhe für mich gelohnt.</p>
<p>Besonders freut es mich, dass ich zwei neue Services kennenlernen durfte, die ein wirklicher Nutzen in der Softwareentwicklung bringen.</p>
<p><span id="more-1470"></span>Zum einen ist das <a href="http://newrelic.com/">New Relic</a>, das Server- und Application-Monitoring auf ein für mich neues Level hebt. Das muss ich mir definitiv näher anschauen. <a href="https://twitter.com/Sujan">Jan Piotrowski</a> hat an Live-Games von Gameforge eindrucksvoll die Leistungsfähigkeit von New Relic bewiesen und ein Problem bis auf Datenbank und PHP-Stacktrace-ebene innerhalb von 5 Minuten lokalisieren konnte.</p>
<p>Ein weiterer Dienst wird durch das deutsche Startup <a href="https://www.versioneye.com/">Versioneye</a> angeboten. Gründer <a href="https://twitter.com/RobertReiz">Robert Reiz</a> hat seinen Dienst kurzweilig und ohne &#8220;Marketing geblubber&#8221; sehr detailliert vorgestellt. Im Grunde monitored Versioneye Open Source Repositories/Pakete und benachrichtigt per E-Mail, sobald eine neue Version released wurde. Besonders hilfreich ist es, dass man hier auch eigene &#8220;Projekte&#8221; anlegen kann und alle seine verwendeten Open Source Bibliotheken beobachten lassen kann. Das alles sehr komfortabel durch bspw. das hochladen einer <em>package.json</em> seines eigenen Node-basierten Projektes. Die dort hinterlegten Abhängigkeiten können nun überwacht werden. Derzeit werden node.js, PHP, Java, Ruby, Python, R und Clojure unterstützt. Wer in einem Projekt viele Open Source Libraries benutzt, sollte sich diesen Dienst mal anschauen, es wird sich lohnen. Versioneye kann noch viel mehr, würde den Rahmen dieses Eintrags aber sprengen.</p>
<p>Ansonsten konnte ich vor allem mal wieder die Erkenntnis mitnehmen, dass das Format <strong>Barcamp</strong> um einiges angenehmer ist als irgendwelche Konferenzen und wenn man sich die richtigen Session ausgesucht hat, ein wirklicher Mehrwert sein kann. Und das umsonst. Mein Dank an die Orga und für alle Gespräche mit vielen interessanten Menschen! </p>
 <p><a href="http://www.casa-rock.de/?flattrss_redirect&amp;id=1470&amp;md5=dc89abdd2d72e7489a6f286b6e176680" title="Flattr" target="_blank"><img src="http://www.casa-rock.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/CasaRockt/~4/3ERX3wqxtLc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.casa-rock.de/2013/03/24/devcamp-karlsruhe-2013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=casarock&amp;url=http%3A%2F%2Fwww.casa-rock.de%2F2013%2F03%2F24%2Fdevcamp-karlsruhe-2013%2F&amp;language=de_DE&amp;category=text&amp;title=Devcamp+Karlsruhe+2013&amp;description=Endlich+mal+wieder+ein+Barcamp+besucht%21+Dieses+Jahr+wurde+in+Karlsruhe+am+23.03.+und+24.03.2013+das+erste+Devcamp+veranstaltet.+Beherbergt+wurde+das+Devcamp+in+den+R%C3%A4umlichkeiten+von+Gameforge+in+Karlsruhe....&amp;tags=devcamp%2Ckarlsruhe%2Cnew+relic%2Cversioneye%2Cdevelopment%2C+javascript%2Cmusic%2C+web" type="text/html" />
	</item>
		<item>
		<title>Frühförderung</title>
		<link>http://www.casa-rock.de/2013/03/20/fruhforderung/</link>
		<comments>http://www.casa-rock.de/2013/03/20/fruhforderung/#comments</comments>
		<pubDate>Wed, 20 Mar 2013 20:56:38 +0000</pubDate>
		<dc:creator>Carsten</dc:creator>
				<category><![CDATA[Multimedial]]></category>
		<category><![CDATA[Vaterzeugs]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[amazing]]></category>
		<category><![CDATA[Früherziehung]]></category>
		<category><![CDATA[ski]]></category>

		<guid isPermaLink="false">http://www.casa-rock.de/?p=1464</guid>
		<description><![CDATA[Wann muss man anfangen ein Kind für einen Sport zu begeistern, damit es mit 11 so etwas kann? Und damit meine ich nicht chinesische Staatszirkusmethoden, sondern freiwillig &#8211; mit Spaß! http://www.youtube.com/watch?v=1JOWARPwJMo]]></description>
				<content:encoded><![CDATA[<p>Wann muss man anfangen ein Kind für einen Sport zu begeistern, damit es mit 11 so etwas kann? Und damit meine ich nicht chinesische Staatszirkusmethoden, sondern freiwillig &#8211; mit Spaß!</p>
<p><a href="http://www.youtube.com/watch?v=1JOWARPwJMo">http://www.youtube.com/watch?v=1JOWARPwJMo</a></p>
 <p><a href="http://www.casa-rock.de/?flattrss_redirect&amp;id=1464&amp;md5=7f2e9ddfe86ed7feb6ea15f4035321c1" title="Flattr" target="_blank"><img src="http://www.casa-rock.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/CasaRockt/~4/mYo6lHmVa4Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.casa-rock.de/2013/03/20/fruhforderung/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=casarock&amp;url=http%3A%2F%2Fwww.casa-rock.de%2F2013%2F03%2F20%2Ffruhforderung%2F&amp;language=de_DE&amp;category=text&amp;title=Fr%C3%BChf%C3%B6rderung&amp;description=Wann+muss+man+anfangen+ein+Kind+f%C3%BCr+einen+Sport+zu+begeistern%2C+damit+es+mit+11+so+etwas+kann%3F+Und+damit+meine+ich+nicht+chinesische+Staatszirkusmethoden%2C+sondern+freiwillig+%26%238211%3B+mit+Spa%C3%9F%21...&amp;tags=amazing%2CFr%C3%BCherziehung%2Cski%2Cdevelopment%2C+javascript%2Cmusic%2C+web" type="text/html" />
	</item>
		<item>
		<title>Warum immer jQuery?</title>
		<link>http://www.casa-rock.de/2013/03/18/warum-immer-jquery/</link>
		<comments>http://www.casa-rock.de/2013/03/18/warum-immer-jquery/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 19:48:02 +0000</pubDate>
		<dc:creator>Carsten</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web zwo null]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[game development]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[wtf]]></category>

		<guid isPermaLink="false">http://www.casa-rock.de/?p=1369</guid>
		<description><![CDATA[So manch einer verwechselt jQuery mit Javascript. Immer wieder findet man obskure Tutorials. Mein neustes Fundstück wird wie folgt beschrieben: HTML5 game tutorial &#8211; Make a snake game using HTML5 canvas and Jquery Neugierig, wie &#8230; <a href="http://www.casa-rock.de/2013/03/18/warum-immer-jquery/">Weiterlesen &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>So manch einer verwechselt jQuery mit Javascript. Immer wieder findet man obskure Tutorials. Mein neustes Fundstück wird wie folgt beschrieben: <a href="http://thecodeplayer.com/walkthrough/html5-game-tutorial-make-a-snake-game-using-html5-canvas-jquery">HTML5 game tutorial &#8211; Make a snake game using HTML5 canvas and Jquery</a></p>
<p>Neugierig, wie jQuery dort benutzt wird, habe ich mir das mal genauer angeschaut. Und wieder mal zeigt es sich: Leute, lernt Javascript. Und vor allem lernt, wann jQuery sinnvoll ist. Bei diesem Beispiel ist jQuery unnötig und kann vermieden werden. Vor allem vermeidet man, das lernwillige die <a href="http://thecodeplayer.com">the codeplayer</a> nutzen, den Eindruck gewinnen, dass das erreichte Ziel nur mit jQuery möglich ist.</p>
<p>Schauen wir mal, was wir tatsächlich verändern müssen, damit jQuery vermieden werden kann.</p>
<p><span id="more-1369"></span></p>
<h3>1. Canvas-Element ermitteln und den Context holen</h3>
<p>Vorher:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> canvas <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#canvas&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">var</span> ctx <span style="color: #339933;">=</span> canvas.<span style="color: #660066;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;2d&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">var</span> w <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#canvas&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">var</span> h <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#canvas&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Das ist sehr einfach ohne jQuery abzubilden:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> canvas <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;canvas&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">var</span> ctx <span style="color: #339933;">=</span> canvas.<span style="color: #660066;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;2d&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">var</span> w <span style="color: #339933;">=</span> canvas.<span style="color: #660066;">width</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">var</span> h <span style="color: #339933;">=</span> canvas.<span style="color: #660066;">height</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>2. Tastaturevent auf dem Dokument abfragen</h3>
<p>Vorher:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">keydown</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">var</span> key <span style="color: #339933;">=</span> e.<span style="color: #660066;">which</span><span style="color: #339933;">;</span>
...</pre></td></tr></table></div>

<p>Auch das ist mit Hausmitteln einfach zu erreichen:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;">document.<span style="color: #660066;">onkeydown</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">var</span> key <span style="color: #339933;">=</span> e.<span style="color: #660066;">which</span><span style="color: #339933;">;</span>
...</pre></td></tr></table></div>

<h3>3. Document Ready&#8230;</h3>
<p>&#8230; ist das einzige, was nicht trivial eins zu eins umgesetzt werden kann.</p>
<p>Vorher:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
...
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Ich habe den Code in eine self executing function am Ende der Seite eingebettet. Damit legen wir keine unnützen Variablen i globalen Scope an und die Funktion wird aufgerufen, wenn das HTML vollständig geladen ist (deshalb die Funktion ans Ende der Seite).</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">...
...
&lt;script type=&quot;text/javascript&quot;&gt;
(function() {
...
})();
&lt;/script&gt;;
&lt;/body&gt;
&lt;/html&gt;;</pre></td></tr></table></div>

<p>Das ist meiner Meinung nach völlig ausreichend, da der Fokus des Autors auf der Erstellung von einem Spiel liegt.</p>
<p><a href="https://gist.github.com/casarock/5190571">Das vollständige und jQuery-freie Beispiel ist hier zu finden</a>.</p>
<p>Es ist immer wieder traurig zu sehen, wie sehr jQuery auch in einfachsten Szenarien eingesetzt wird. Durch die Vermeidung von jQuery wird der Code, der über die Leitung gehen muss um ca. 30kB erleichtert. Nur um das Canvas-Element mit $() zu selektieren, muss man keine so große Library nachladen.</p>
<div class="yellow-box"><strong>Disclaimer</strong>: Ich selbst benutze jQuery in Projekten, die DOM-lastig sind, da es hier einige Funktionen bietet, die einem die Arbeit wirklich erleichtern und ich mag es dafür nicht missen.</div>
 <p><a href="http://www.casa-rock.de/?flattrss_redirect&amp;id=1369&amp;md5=ce0c0651c3d45f5d7e27c0b6cd763851" title="Flattr" target="_blank"><img src="http://www.casa-rock.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/CasaRockt/~4/-JtSq9AeDPo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.casa-rock.de/2013/03/18/warum-immer-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=casarock&amp;url=http%3A%2F%2Fwww.casa-rock.de%2F2013%2F03%2F18%2Fwarum-immer-jquery%2F&amp;language=de_DE&amp;category=text&amp;title=Warum+immer+jQuery%3F&amp;description=So+manch+einer+verwechselt+jQuery+mit+Javascript.+Immer+wieder+findet+man+obskure+Tutorials.+Mein+neustes+Fundst%C3%BCck+wird+wie+folgt+beschrieben%3A+HTML5+game+tutorial+%26%238211%3B+Make+a+snake+game+using+HTML5...&amp;tags=canvas%2Cgame+development%2CJavascript%2Cwtf%2Cdevelopment%2C+javascript%2Cmusic%2C+web" type="text/html" />
	</item>
		<item>
		<title>Meine Lesezeichen vom 17 Oktober bis 15 November</title>
		<link>http://www.casa-rock.de/2012/11/15/meine-lesezeichen-vom-17-oktober-bis-15-november/</link>
		<comments>http://www.casa-rock.de/2012/11/15/meine-lesezeichen-vom-17-oktober-bis-15-november/#comments</comments>
		<pubDate>Thu, 15 Nov 2012 10:00:25 +0000</pubDate>
		<dc:creator>casarock</dc:creator>
				<category><![CDATA[casa.licous]]></category>

		<guid isPermaLink="false">http://www.casa-rock.de/?p=1396</guid>
		<description><![CDATA[Meine Lesezeichen vom 17 Oktober bis 15 November Luvit [Tags: node.js async lua ] JSON Editor Online &#8211; view, edit and format JSON online [Tags: editor Javascript tools json ] grips Templating Engine [Tags: engine &#8230; <a href="http://www.casa-rock.de/2012/11/15/meine-lesezeichen-vom-17-oktober-bis-15-november/">Weiterlesen &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>Meine Lesezeichen vom 17 Oktober bis 15 November</p>
<ul>
<li><a href="http://luvit.io/">Luvit</a> <br /><span style="font-size: 75%">[Tags: <a href="http://www.delicious.com/casarock/node.js">node.js</a>   <a href="http://www.delicious.com/casarock/async">async</a>   <a href="http://www.delicious.com/casarock/lua">lua</a>   ]</span></li>
<li><a href="http://jsoneditoronline.org/">JSON Editor Online &#8211; view, edit and format JSON online</a> <br /><span style="font-size: 75%">[Tags: <a href="http://www.delicious.com/casarock/editor">editor</a>   <a href="http://www.delicious.com/casarock/Javascript">Javascript</a>   <a href="http://www.delicious.com/casarock/tools">tools</a>   <a href="http://www.delicious.com/casarock/json">json</a>   ]</span></li>
<li><a href="http://getify.github.com/grips/">grips Templating Engine</a> <br /><span style="font-size: 75%">[Tags: <a href="http://www.delicious.com/casarock/engine">engine</a>   <a href="http://www.delicious.com/casarock/templating">templating</a>   <a href="http://www.delicious.com/casarock/javascript">javascript</a>   ]</span></li>
<li><a href="http://maker.github.com/ratchet/">Ratchet</a> <br /><span style="font-size: 75%">[Tags: <a href="http://www.delicious.com/casarock/css">css</a>   <a href="http://www.delicious.com/casarock/html">html</a>   <a href="http://www.delicious.com/casarock/prototype">prototype</a>   <a href="http://www.delicious.com/casarock/iphone">iphone</a>   <a href="http://www.delicious.com/casarock/mobile">mobile</a>   ]</span></li>
<li><a href="http://codepen.io/jackrugile/pen/Gving">Canvas Sparkle Light Trail &middot; CodePen</a> <br /><span style="font-size: 75%">[Tags: <a href="http://www.delicious.com/casarock/sparkle">sparkle</a>   <a href="http://www.delicious.com/casarock/particle">particle</a>   <a href="http://www.delicious.com/casarock/canvas">canvas</a>   ]</span></li>
</ul>
 <p><a href="http://www.casa-rock.de/?flattrss_redirect&amp;id=1396&amp;md5=2f4be83dd934892a8931587a1b2fbf89" title="Flattr" target="_blank"><img src="http://www.casa-rock.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/CasaRockt/~4/ewRbpcU86h4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.casa-rock.de/2012/11/15/meine-lesezeichen-vom-17-oktober-bis-15-november/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=casarock&amp;url=http%3A%2F%2Fwww.casa-rock.de%2F2012%2F11%2F15%2Fmeine-lesezeichen-vom-17-oktober-bis-15-november%2F&amp;language=de_DE&amp;category=text&amp;title=Meine+Lesezeichen+vom+17+Oktober+bis+15+November&amp;description=Meine+Lesezeichen+vom+17+Oktober+bis+15+November+Luvit+%5BTags%3A+node.js+async+lua+%5D+JSON+Editor+Online+%26%238211%3B+view%2C+edit+and+format+JSON+online+%5BTags%3A+editor+Javascript+tools+json+%5D...&amp;tags=casa.licous%2Cdevelopment%2C+javascript%2Cmusic%2C+web" type="text/html" />
	</item>
		<item>
		<title>Meine Lesezeichen vom 27 September bis 12 Oktober</title>
		<link>http://www.casa-rock.de/2012/10/12/meine-lesezeichen-vom-27-september-bis-12-oktober/</link>
		<comments>http://www.casa-rock.de/2012/10/12/meine-lesezeichen-vom-27-september-bis-12-oktober/#comments</comments>
		<pubDate>Fri, 12 Oct 2012 14:00:25 +0000</pubDate>
		<dc:creator>casarock</dc:creator>
				<category><![CDATA[casa.licous]]></category>

		<guid isPermaLink="false">http://www.casa-rock.de/?p=1390</guid>
		<description><![CDATA[Meine Lesezeichen vom 27 September bis 12 Oktober Helpful JavaScript Patterns &#124; New Relic blog [Tags: tips patterns javascript ] Designing Better JavaScript APIs &#124; Smashing Coding [Tags: tutorial api javascript ] DOM Enlightenment &#8211; &#8230; <a href="http://www.casa-rock.de/2012/10/12/meine-lesezeichen-vom-27-september-bis-12-oktober/">Weiterlesen &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>Meine Lesezeichen vom 27 September bis 12 Oktober</p>
<ul>
<li><a href="http://blog.newrelic.com/2012/10/09/helpful-javascript-patterns/">Helpful JavaScript Patterns | New Relic blog</a> <br /><span style="font-size: 75%">[Tags: <a href="http://www.delicious.com/casarock/tips">tips</a>   <a href="http://www.delicious.com/casarock/patterns">patterns</a>   <a href="http://www.delicious.com/casarock/javascript">javascript</a>   ]</span></li>
<li><a href="http://coding.smashingmagazine.com/2012/10/09/designing-javascript-apis-usability/">Designing Better JavaScript APIs | Smashing Coding</a> <br /><span style="font-size: 75%">[Tags: <a href="http://www.delicious.com/casarock/tutorial">tutorial</a>   <a href="http://www.delicious.com/casarock/api">api</a>   <a href="http://www.delicious.com/casarock/javascript">javascript</a>   ]</span></li>
<li><a href="http://domenlightenment.com/">DOM Enlightenment &#8211; Exploring the relationship between JavaScript and the modern HTML DOM</a> <br /><span style="font-size: 75%">[Tags: <a href="http://www.delicious.com/casarock/ebook">ebook</a>   <a href="http://www.delicious.com/casarock/dom">dom</a>   <a href="http://www.delicious.com/casarock/javascript">javascript</a>   ]</span></li>
<li><a href="http://www.webdesignerdepot.com/2012/10/creating-a-modal-window-with-html5-and-css3/">Creating a modal window with HTML5 &amp; CSS3 | Webdesigner Depot</a> <br /><span style="font-size: 75%">[Tags: <a href="http://www.delicious.com/casarock/modalwindow">modalwindow</a>   <a href="http://www.delicious.com/casarock/css3">css3</a>   <a href="http://www.delicious.com/casarock/html5">html5</a>   ]</span></li>
<li><a href="http://impactjs.com/ejecta">Ejecta &#8211; Impact</a> <br /><span style="font-size: 75%">[Tags: <a href="http://www.delicious.com/casarock/games">games</a>   <a href="http://www.delicious.com/casarock/html5">html5</a>   <a href="http://www.delicious.com/casarock/canvas">canvas</a>   <a href="http://www.delicious.com/casarock/ios">ios</a>   <a href="http://www.delicious.com/casarock/javascript">javascript</a>   ]</span></li>
<li><a href="http://www.aaronlumsden.com/articles/7-html5-features-that-you-may-not-know-about/?utm_source=html5weekly&amp;utm_medium=email">7 HTML5 features that you may not know about Aaron Lumsden | Aaronlumsden.com</a> <br /><span style="font-size: 75%">[Tags: <a href="http://www.delicious.com/casarock/unknown">unknown</a>   <a href="http://www.delicious.com/casarock/html5">html5</a>   <a href="http://www.delicious.com/casarock/features">features</a>   ]</span></li>
</ul>
 <p><a href="http://www.casa-rock.de/?flattrss_redirect&amp;id=1390&amp;md5=66678fc774c9f9a8ae1a3280f273a027" title="Flattr" target="_blank"><img src="http://www.casa-rock.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/CasaRockt/~4/ERbM2oYwP2A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.casa-rock.de/2012/10/12/meine-lesezeichen-vom-27-september-bis-12-oktober/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=casarock&amp;url=http%3A%2F%2Fwww.casa-rock.de%2F2012%2F10%2F12%2Fmeine-lesezeichen-vom-27-september-bis-12-oktober%2F&amp;language=de_DE&amp;category=text&amp;title=Meine+Lesezeichen+vom+27+September+bis+12+Oktober&amp;description=Meine+Lesezeichen+vom+27+September+bis+12+Oktober+Helpful+JavaScript+Patterns+%7C+New+Relic+blog+%5BTags%3A+tips+patterns+javascript+%5D+Designing+Better+JavaScript+APIs+%7C+Smashing+Coding+%5BTags%3A+tutorial+api...&amp;tags=casa.licous%2Cdevelopment%2C+javascript%2Cmusic%2C+web" type="text/html" />
	</item>
	</channel>
</rss><!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
