I'm developing a big project in Backbone (around 8000 lines of javascript, excluding external libraries) and I'm considering a migration to AngularJS.
Currently I have a lot of code that handles DOM changes, binding and unbinding of events. I'm using Mustache for template rendering. Most data is loaded with AJAX, and stored in Backbone models, some of which use BackboneRelational. I'm using about 10 little jQuery plugins to do fancy UI stuff.
I'm determined to do this migration, however I'm worried about my deadlines. So the questions are:
I ported a large 5k+ lines of BB code to Angular. I did this port when I was first starting with Angular and if I remember right, I did it over a weekend and then 3 days. So it was done in 5 days approx. You have to note that I wrote the whole BB application ( all of the 5k lines as well .. ) so it was easier for me to port.
You could perhaps mix BB and Angular initially ( develop new parts in Angular and slowly port BB parts over.. ) but I would suggest that if you can, then do the porting of the complete app first.
As a general rule, all your Backbone Models and Collections should go into services ( of the same name perhaps ? ) . Porting html and Mustache templates should be a piece of cake. The part that would be slightly tricky is your jquery plugins. But if they are simple ones then you will be able to use the angular-ui jquery passthrough ( http://angular-ui.github.io/ ).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With