Why I prefer Ember.js over Angular & React.js
- Fortunately one month ago I got a chance to work with a client who wanted me to develop his project in Ember.
- I was not much excited as ember was a known guy to me, but started developing the project as it’s a day to day life for me.
- But after delivering the project I started thinking of my experiences with these three front-end frameworks and probably today publishing this article out of my emotions.
- If all the teams of your organization (or even someone outside your organization) are developing ember applications using ember-cli; they will be very familiar to the projects architecture and in no time can start contributing at any project.
- The developers of Ember’s core team are also developers in their own projects and this is the biggest plus of Ember.
React is better than angular 2 atleast in this sector; but still you need to deal with jsx.
Trust me, reducing the configuration code of your project is a huge advantage. Firstly, the code size is going to be smaller and very cleaner. Secondly, the conventions are universal. Any new developer can easily understand what’s going on. For the people who haven’t worked with ember yet; ember is smart enough to detect the purpose of your files and variable names if you name them in a certain way.
Ember guides and Ember apis are probably the best technical documentation I’ve ever came across in my life. Even the beginners can understand it very easily. The official discussion form of ember is also very helpful to address your issues.
Ember-CLI is a power to Ember. Even angular is trying to develop a cli inspired by ember. When you scaffold a project using ember-cli it will scaffold with a predefined architecture which is approved by the big guns of the community.
When a startup tries to start building something using a certain tool, no matter how experienced the team is, but if the framework is new to them, they will never be sure of the best practices. In case of react the risk is even higher as it’s a library and not a framework.
Even if you have good developers in your team; sometimes, out of delivery pressure they write bad codes. Not logically, but conceptually bad. In some parts atleast ember forces you the best practices. For an example, you can’t write business logic in your template. Only iteration and if helper that too with boolean parameter only is available. So you simply CAN’T write logics in your template.
I understand the learning curve is very steep and ember is probably the toughest to learn among these three frameworks. But once you are a master, you can develop projects way faster than people with angular or react. Convention over configuration and ember-cli are the main cause of that.
If all the teams of your organization (or even someone outside your organization) are developing ember applications using ember-cli; they will be very familiar to the projects architecture and in no time can start contributing at any project. This also improves your productivity as an organization by the way.
No organization; only community
Angular belongs to Google and React belongs to Facebook; two giant organizations. But ember is by the community; for the community. The developers of Ember’s core team are also developers in their own projects and this is the biggest plus of Ember. Because they are just not the framework developer, but the framework user. Thus always attached to the ground reality.
Fortunately when Angular 2 was released I was out of my angular projects. But I’ve seen my friends crying with the headache of upgrading their applications to angular 2.
In the other hand when Ember 2 was released, it simply didn’t have any changes. Yes you heard me right. It did not have any changes; ember 1.13.0 and 2.0.0 are exactly the same (only the deprecations were there). Because the developers started releasing the new things slowly and gradually in the 1.X versions. Absolutely zero pain for application developers to upgrade the application. This is the benefit when the core team members are the framework consumers.
No cons for Ember?
Everything has a second side. Ember also has cons like steep learning curve, little slow rendering, heavy weight etc. There are more technical articles who compares the framework almost apis to apis. But this one is more a behavior article which I’ve composed out of my experiences. I believe no matter what the framework is, technically you can always complete your project with it. But there are other factors which affects the journey and the path. After considering everything along with your situation, use case and business you can make the best decision for your project and startup.
Given the popularity of React and the emerging interest in Angular 2 I took some time to develop an application in each of them. I have been developing ambitious applications in Ember for a few years so my goal was to reproduce what I have with Ember & Ember CLI (stateful routing, build tools, model state management, automated testing, etc…).
With React I started with create-react-app which fortunately goes a long way in some of these areas. To this I wired in react-router, redux, redux-thunk, redux-form, and some other modules. I also did my best to employ the latest best practices to ensure familiarity among developers who are keeping up with them. What I love about React is that you become a better developer if you follow the community and embrace the best practices as they make use of some of the best architectural practices such as pure functions, single source of truth (state), data down actions up, container/presentation components, etc… The fact that none of this is enforced by the library means that, as you mention, very few projects built in React will look the same. To developers authoring new applications this might be considered a benefit as they have more choices in the architecture. To developers who join the project later on this increases the learning curve. I also agree that this makes it easier to write bad code. My React app can be viewed at https://github.com/sandnap/react-redux-albums.
Bottom line is that I think your article is spot-on. Once I had everything set up and configured in React I was able to be pretty productive but I can’t imagine a scenario where my productivity would match what I have with Ember. Angular 2 will most likely get there eventually but with all of the addons available for Ember it will take time.