I have been programming in Javascript for a while. I recently made a rather large jQuery project and applied a module template as described in this wonderful article: http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth
Everything went fine, and the dandy, and the code looks smooth and manageable, but I felt it could be better. I spent this day looking for some Javascript frameworks, mainly those that:
- UI Binding Support
- You have a template system
- May work with jQuery
- Help me organize my code in the same way as with the module template
I came across frameworks like AngularJS, KnockOutJS, SpineJS, JavascriptMVC etc. The one that really stuck out - and was praised - was EmberJS.
I decided to do it, but it was not easy. The availability of tutorials for EmberJS is very limited. After a long downtime, I managed to run something, and I like what EmberJS does! There is only one thing that I seem to be unable to understand - this is also my question: How can I expand the Ember namespace (made using Ember.Application.create)?
To clarify: In the old version of my project, there was a Core namespace and a Util namespace. Both contain their respective functions that all other classes can use. How can I have a Core and Util namespace with functions on top of the original namespace?
I just do:
MyNamespace = Ember.Application.create(); MyNamespace.Core = Ember.Application.create(); MyNamespace.Util = Ember.Application.create();
Or something else?
source share