RocketModule - Symfony http://rocket.local/categories/symfony en Build your own JavaScript framework http://rocket.local/blog/build-your-own-javascript-framework <div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>I've happily reached a significant milestone in the development of my project, finishing a foundational layer that by itself could be valid to open source at some point.</p> <p>Also:</p> <ul><li style="padding:0 0 10px 0;">In my last post I explained my reasons for passing on the current crop of JavaScript frameworks. This is a decision that I've been extremely pleased with, as I've managed to conceive/implement my own MVC/MVVM pattern for the project and the endeavor has pushed me much further into my JavaScript education.</li> <li style="padding:10px 0;">I have refactored the codebase from using 100% jQuery to about 80% raw JavaScript to 20% jQuery. It is nice to be able to know how to step outside of jQuery and/or deepen one's appreciation for what jQuery is doing under the hood. Also, if you've spent any time on at all you probably know that <a href="">jQuery is much slower than raw JavaScript</a> for many things. When building an almost-entirely client-side app, speed starts to matter much more than when you have just a couple jQuery snippets on a page, and I want this app to be whip quick. It was a little ackward getting started with plain JS, but once underway I caught the hang of it fairly quickly, and the end result I'm definitely happy with.</li> <li style="padding:10px 0;">Currently, I am using <a href="">localStorage</a> for my data store, and it's been working great for development purposes - it's basically a mock mongoDB for me (I'm storing nested objects in localStorage using a small jQuery library called <a href="">jStorage</a>). I'm purposely putting off the server side of this application because I want to be able to use the Symfony 2.3 LTS release, which is scheduled for May as middleware between the client-side and mongoDB. The temptation to use node.js is strong, and arguably would be the most performant option, but the reasons for picking Symfony are probably obvious to any Drupal developer.</li> <li style="padding:10px 0;">Finally, don't forget - if you are using regex to parse the DOM, you're doing it <a href="">brain-meltingly wrong</a>!</li> </ul><p>Cheers all, I'm off to <a href="">DrupalCamp Sacramento</a> for the weekend.</p> </div></div></div><div class="field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-above"><div class="field-label">Categories:&nbsp;</div><div class="field-items"><div class="field-item even"><a href="/categories/javascript" typeof="skos:Concept" property="rdfs:label skos:prefLabel">JavaScript</a></div><div class="field-item odd"><a href="/categories/drupal" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Drupal</a></div><div class="field-item even"><a href="/categories/symfony" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Symfony</a></div></div></div> Sat, 13 Apr 2013 02:46:46 +0000 Caleb Gilbert 129 at http://rocket.local http://rocket.local/blog/build-your-own-javascript-framework#comments