MVC, IoC and TDD for JavaScript Development
With the current resurgence of JavaScript and the new features being added to it I’ve been doing some research over the last few months to get up to speed. Specifically I’ve been exploring JS application development frameworks and libraries for TDD/Unit Testing. Being primarily an AS3/Flex developer for the past several years I’ve grown accustom to having great tools to rely on and work with to simplify, expedite and organize my development process. As the days pass more and more Flash Platform developers are getting involved with development using the “HTML5 Family” which means using JavaScript.
Some of us Flash guys have expressed concern and resentment of having to start using JavaScript again, and with valid reasons in my opinion. I won’t get into that in this post, maybe at a later date. The point being there’s a number of pretty cool advancements that we’ve grown to love (or at least I have) using AS3 and Flex for RIA dev. A couple of these being a myriad of application development frameworks and TDD/Unit Testing libraries and tools. Additionally there’s a wealth of other mature libraries and APIs to handle everything from mapping, to components to skinning and more.
As much as I hate to say it and admit to myself that inevitably we’re all going to most likely be coding JavaScript based RIAs in the not so distant future my brain said: “Sean, you better start finding some some of the things you’ve grown to love about AS3 and Flex in the JavaScript world.” So I did. I’ve done some preliminary research and found the following links, resources and information that should hopefully ease the pain and help with the transition back into the world of JavaScript (God help us all!). Hopefully the time I’ve spent gathering this info will help some of my fellow Flash Platform developers as well. I didn’t add the obvious stuff here like jquery as I’m sure everyone is pretty aware of that already…
TDD:
http://www.infoq.com/articles/javascript-tdd
http://www.slideshare.net/marcinbunsch/jessie-tdd-in-nodejs-using-jasmine
http://tddjs.com/
http://css.dzone.com/modern-javascript-techniques?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+zones%2Fcss+(CSS+Zone)
FRAMEWORKS:
https://github.com/briancavalier/hello-wire.js
https://github.com/briancavalier/piratescript
http://briancavalier.com/presentations/wirejs-2011-jsconf/#0
http://puremvc.org/content/view/102/181/
http://trac.puremvc.org/PureMVC_JS
http://documentcloud.github.com/backbone/
http://maccman.github.com/spine/
http://javascriptmvc.com/
http://knockoutjs.com/
http://maverick.round.ee/en-US/
http://ajaxian.com/archives/squirrel-ioc-dependency-injection-for-javascript
TOOLS:
http://code.google.com/closure/
So, idk, happy JS coding I suppose… :\
(The photo in this post is from: http://www.flickr.com/photos/dmitry-baranovskiy/2378867408/)
Another Unit Testing framework I found really handy was QUnit http://docs.jquery.com/Qunit which is used to test all the JQuery stuff.
Very handy as it also includes asynchronous tests, which is invaluable really!
Thanks for the resource links! Sigh, “There are no foreign lands. It is the traveler only who is foreign.” – Robert Louis Stevenson spreken ze JavaScript?? I’m with ya, but I don’t have a perception that I am moving away from Flex/AS3, more so, I feel that I am looking for ways to expand my development interaction between complementary technologies. The trouble I have is determining what it is that I want to do in JavaScript as I can pretty much already do ‘That’ in Flex/AS3 – so why?? But with respect to the future, looking at HTML 5, CSS 3, etc… I think it is going to be important to broaden the base to be able to take on a greater range of customer requirements. This makes me want to take great care in making decisions though. I’ve spent the past 5 years focusing on a concentration, working on creating depth of knowledge, and crafting my niche. Broadening the base can create a dilution of concentration and specialization. I’m not saying that is a bad thing, but the successes I’ve had have been a result of focus, rather than spectrum.
One more category:
Sidestepping it all
haXe