MV* Frameworks Office Hours Q&A: REACT.js, Angular Design Practices, and More
This post will talk about which MV* to choose for large apps in terms of code base maintainability, AngularJS design practices to follow, and whether you should consider using REACT.js + Flux + Backbone.js for your project.
Due to stricter conventions, is Ember at advantage in the long term for larger applications in terms of code base maintainability?
I think Angular and Ember both have a big advantage over Backbone in terms of larger code bases and maintainability because you’re writing less code, particularly in the case of Ember. However, from an Angular argument—not that Ember’s not testable or anything—but Angular is so testable because of the Inversion of Control (IoC) and dependency injection. Thus, this is a big advantage for Angular if you’re also looking to test that large application. However, you have to be disciplined and for both Angular and Ember, which means following style guides and such.
Do you recommend any design practices to follow for writing a huge Angular app?
John Papa has made a great style guide in terms of writing large AngularJS apps. It will help you structure your files, organize your code, make sure you’re not polluting the global namespace, and more. Basically, this is a fantastic guide to follow which will help you avoid things that will catch up to you in larger apps but not in smaller ones.
What do you think about REACT? A lot of people seem to be using REACT.js + Flux + Backbone.js
For those who don’t know what REACT.js is, it’s a library/framework from Facebook for building user interfaces.
Another framework that is gaining a lot of ground in the same space is famo.us, which has some real advantages to Angular and Ember in terms of performance, but to me they’re a little too close to the metal to be productive enough for most of the apps I’m building. Thus, personally I have a hard time thinking about using those, but if performance is your concern, you’ll likely find it more acceptable to write more code to achieve better performance.
Which MV* is More Poised to Handle the Object.Observe()?
Angular and Ember are both well-poised to handle
Object.Observe() since they both use ECMAScript 6 (ES6) and therefore are better-positioned than Backbone. I don’t know if you’ve noticed, buck although Backbone is still getting some maintenance over the project, there is not a lot of innovation happening. It is what it is good for as a light library, but there aren’t new features coming out, and it shows, since it’s a version behind with ES5. Of course, it’s still a good, stable framework, but if you’re looking for innovation and things moving forward, Angular and Ember are better choices.
Other posts in this series with Craig McKeachie:
- AngularJS, Backbone.js or Ember.js─Which One to Choose for Your Project?
- Should You Wait Until Angular 2.0 is Released Before Learning AngularJS?
Codementor is your live 1:1 expert mentor helping you in real time.