Hey! I’m getting lots of queries related to the front-end frameworks, like which frameworks are most suitable for ?their projects. So, I thought of writing this article which will help you to choose the best javascript framework?available in the market as of 03/17.
You might already aware of various javascript frameworks out there. Every now and then a new framework emerges which aims to solve a problem of some other framework or to make some things easy. Often times it becomes difficult for front-end developer to choose the best suitable framework for his project. Afterall, it is a hard choice to make. Whatever you choose is going to become a part of what you create next. Therefore, this decision must be given a lot of thought and research.
Table of Contents
Angular
We all are aware of AngularJS (simply Angular). It is one of the most widely used frontend framework today. With the release of its recent version which many of you know by the name AngularJS 2 (by the way, it’s just Angular) has already won many hearts as well as heart-breaks. They have re-written angular from scratch and completely changed the way Angular 1 used to work. Infact, it has no similarity with its previous version.
If you are building an application which is going to deal with lots of data and where response time is very important then I would suggest you to go with the Angular. It is a trusted framework and also the fact that it is used by many big companies. You will never regret your decision.
Why Angular?
Angular is lightning fast. I saw a seminar on Angular when it was in its beta stage. That guy really surprised each and everyone in the audience when he compared Angular with ReactJS and showed who’s the boss when it comes to speed and performance. Angular is amazingly fast when it comes to data handling. However, there are some bad sides to it.
New Angular directives are one of the best things it has introduced. Earlier with Angular-1, lots of people complained that its directives are confusing and doesn’t feel kind of natural, such as ng-repeat. With the latest version of Angular, new directives has been introduced which gets blend with HTML pretty gracefully. Also, ng-repeat has become *ngFor. Now, everything is clear and amazing.
Angular has kept the javascript code and HTML integration separated in the best possible ways. It has kept the theory of adding JS to HTML and not HTML to JS. A front-end designer can easily change the look and feel of the website without even know a bit about javascript. This is something you are going to love about Angular. For more details you can have a look at angular getting started tutorials. If you are looking for a good book on the same then checkout this AngularJS 2 textbook.
Cost for such benefits
Angular is complicated. Right aways when you see Angular it seems complicated to write code. Even before you start writing code you have to perform various ceremonies: import modules, put it in the providers, then inject it via constructor and so on. It’s like following the same old recipe again and again for even a smallest thing. At any given point, a developer has to keep a lot of things in his mind or the application will error out.
It has a steep learning curve. If you have young resources who have not worked on Angular before then it is going to take some time and money to get them started with Angular.
ReactJS
It is a javascript library which is built by Facebook. It was built by facebook for its internal use but soon they realized that they have built something truely amazing which needs to be shared with the world. React is opensource. React is not an MVC as they say, it is simply a ‘V’ in MVC. It is mostly suitable for creating views (User Experience) for the users of the website. If you want a text book for the same then have a look at below text book,
If you are working on some project which is involved with giving the best of the user experience to the users without loosing the performance of the website then ReactJS is the best choice for you. It will make your job easy.
Why ReactJS?
It is lightweight as compared to the Angular. It is very efficient and provides developer with lots of flexibility and code reusability as it prefers component driven development.
ReactJS allows you to break you website into many different components and provides a way to share data between them. It makes your UI feel more fluent because of it’s DOM rendering technique.
ReactJS uses some kind of shadow DOM which it uses to compare the difference whenever there is a change of state. It doesn’t refresh the whole thing instead only changes the part which has been changed and keeps the DOM as it is. It very well understands that DOM manipulation is costly, so it tries to keep it to the minimum
ReactJS does not uses external templates. It uses component driven development in which you create multiple components/parts of your website with the use of JSX. Follow their official website for more insights on how awesome reactJS actually is 😉
Cost for this awesome features
It could be a new concept for the programmers and it doesn’t come that naturally but it’s not difficult to learn. I don’t think there are any drawbacks with ReactJS. It is going to grow at an amazingly faster rate.
VueJS
Whenever I use vue I can only think of Miley Syrus songs “Best of both worlds”. If you haven’t heard of VueJS then it’s not a problem. Even I didn’t heard of it till 2015 :/ but it was there. It has been around for quite some time. It was developed around 2013 and from there on it has been continuously evolving by learning from the mistakes of ReactJS and Angular.
When I first used VueJS, I simply fell in love with it. It shares quite a lot of similarities with ReactJS. One of which is its virtual dom concept which makes you fall in love with it. It also have a two-way binding just like Angular. On top of that the basic Vue library is very lightweight. They have very well managed to keep the core concepts in one single library and if you need additional functionalities you can use other libraries for that. It very well integrates with 3rd party libraries.
Who Should use VueJS?
Anyone who is looking for a lightweight frontend library to make user experience wonderful must go for VueJS. It does not have a steep learning curve, unlike ReactJS and Angular. Anyone with a basic knowledge of javascript can begin with it right away. Also, it can very well scale with your application. It have various tools which acts like an additional power suits for it that makes it more powerful. You can follow their official documentation which will get you started in less than an hour.
Where does VueJS lag behind?
I didn’t found any drawbacks but if VueJS would have made templating a little more fun then it would have been great. It is a little backward with it’s default template, although with some additional tweaks it can provide with you with a very powerful templating system. But then again it will increase its complexity.
Conclusion
In my opinion, these three frameworks are leading the charts. If you are not sure which framework to choose then I would suggest look at the size of you application. If your only concern is giving user the best user experience then go with ReactJS or VueJS. If your website is going to scale up quickly and is going to deal with lots of data then Angular should be a better choice for you.
I will try to post some tutorials based on all the above three frameworks. It will make your understanding more clear and precise. For more information on frontend jobs and technologies, please refer to Frontend Handbook. ?Or directly download it from the following link frontend handbook.
And as always,
Be my aficionado 🙂