I am no expert on JavaScript or Ruby by far, i have done most of my MVC work inside PHP space with CakePHP and ActionScript with Robotlegs. But it’s time for me to dive into the messy but exciting world of JavaScript frameworks. After reading allot about different frameworks i wanted something that resembles CakePHP in the sence that i could get model relations, helpers, easy of use and setup. Ember gives you all this since it’s very inspired by Rails. I knew from reading that the documentation of ember was really bad, things are moving fast in development with breaking changes but i thought to my self that it can’t be that bad, i can probably figure most of the things out. And i have… sort of.
Node
Everywhere you read today when it comes to JavaScript will most likely end up referring you to nodejs. Node is the next big thing in the JavaScript community and everything now is installed with npm install {package}. Don’t get me wrong, i really like Node but it gets really confusing as to how applications are meant to be used when every other framework comes with it’s own web server built in. I am trying to develop an application that will reside inside a CakePHP platform so there will be the standard Apache web server that i know and can trust for a production ready application. This does not apply as much for ember but the only way i could really make good use of ember without learning rails is to use a project called ember-runner for compiling my files or simply write the whole application in a single file. The single file approach was a non-option for me so i went with ember-runner.
Todo examples
The second confusing obstical in choosing JavaScript framework is the lack of good example applications, most frameworks has a simple todo application example witch is nice to quickly compare different frameworks but really not helpful in deciding what to use when building bigger and more complex applications.
API
Ember is really nice in theory but the API is quite confusing and it’s hard to know if you are following a good standard way of doing things when you write your code.
Rails
When you start looking around for help on how to use ember most of the example is built with ruby on rails in mind. Of course it’s possible to build ember applications for other platforms as well but very annoying to sort out all the rails talk.
Never underestimate JavaScript again
From this small initial phase of learning how to better write good JavaScript software i must admit that i underestimated the things that JavaScript can do. The power that node, html5 api, webgl, svg etc has brought this community is extremely impressive and today mostly anything could theoretically be written as an application for the browser (or the desktop) with all the code being JavaScript. And why the hell not! many other languages lives inside their virtual spaces like python, java, flash etc and why shouldn’t you be able to do the same things with JavaScript. Together with node you could even write an application for the desktop with frameworks like appjs and communicate with desktop hardware like a joystick. Someone even wrote an Nintendo 64 emulator in JavaScript.
Summary
The biggest problem with Ember is the breaking changes for now, this framework simply isn’t ready for production purpose yet. This post is just a bit of ranting on my part and nothing really constructive or gathered so please ignore everything you have read so far.
After posting this i was given a really good article on ember http://trek.github.com/
