I have a web app I would like to gradually refactor by adding structure to it.
My goal is to refactor that app, which has the usual jQuery spaghetti and gradually add some structure to it.
- not a "all or nothing" framework, e.g. allow gradually moving code from "before" to "after" without rewriting the app from scratch (winner - Backbone?)
- something that has a future, people seem excited about and has a big company behind it (Angular takes this bullet)
- Let me sometimes do things "my way" and not force a paradigm (Backbone a clear winner here)
- Something that will really boost my productivity and remove the need for boilerplate code (Angular + Ember)
- Something that is good not just with the obvious things, but also the complex things, e.g. animation transitions, nested models, handling modal dialog views, drag and drop support, widget system etc
One option is to become an advanced developer in all 3 and then, the other is to ask people who did something similar
I know that with Backbone I can do everything I want, but I want to know if I'm not to "careful" and wonder if I'm not missing out by not taking the risk of using AngularJS / Ember.js
So my specific, answerable, constructive (as much as I could) questions are:
- Is Angular / Ember able to support drag and drop without bending over backward?
- Can either of these frameworks support animation transitions well?
- Which of these 2 frameworks is easier to "add in" gradually and not to fully rewrite things "their way"
- Which of these has better support for NoSQL /document based models as in MongoDB like documents (e.g. a JSON doc rather than a relational model)
- Which of these has better built in support for complex models (similar to #4)
Both Ember Data, and Backbone-relational seem to come from a relational database paradigm, and I wonder if there is anything that can build a model from an arbitrary multilevel / nested tree like structure without having to define a NoSQL model in a relational like data structure (e.g. hasMany, belongsTo instead of just a JSON like document).
Also I don't want to stop using JqueryUI because it's not 100% done the "Ember way" or the "Angular way", is Backbone really my best option? Are the nice bells and whistles that come with Angular / Ember are in a trade-off with flexibility?
Is it a good architectural choice to use either Angular or Ember when refactoring an existing jQuery callback pasta in a gradual, iterative approach?