Choosing a front-end framework
- They are easy to do
- Companies and people want recognition
For our first project, deciding if we needed a framework or not was a though decision, something that should not be. We used Bootstrap and jQuery. It was a simple web application that used some plug-ins, had some form validation and data binding, that was it.
In our third project we used Handlebars in order to manage templates, and again some jQuery.
We learned from the previous mistakes. And in our fourth and final project, we decided that we needed the right tool for our more than repetitive tasks. Basically, what we needed was two-way data binding, templates, and something that did not conflict with jQuery (because of some plug-ins).
We evaluated around 15 frameworks and we always came to the same conclusions: it is too complex, it is not what we need, it has a weird dependency with NodeJS, it is not compatible with x, y, and z plug-in, etc.
In the end, we chose good old KnockoutJS with PagerJS. It did made some development aspects much easier, but also gave us a few headaches. In the end, I was satisfied with our choice. But the bottom line is... you probably do not need a framework or a library.
If your application has few interactions with the DOM, and uses some plug-ins, all you need is pure vanilla JS or maybe jQuery. Maybe.
If, however, your application is a complex system that requires more control, you could evaluate other options. I cannot list all frameworks and libraries in a single post, but before choosing a framework, if you need it at all, answer yourself these questions:
- Why I want and need this particular framework?
- Does it addresses the needs of my application?
- Does it addresses the requirements of the development team?
- Does the learning curve justifies using the framework?
- Will it make development easier?
- Do you feel comfortable and productive with that framework?
Why you should not use a framework:
- Because it is new
- Because everyone seems to be using it
- Because x company or project uses it
- Because it is "trending"
Chances are that your application only has some CRUD operations, form validation and charting. If that is the case you probably do not need a framework.
I like how VueJS has a small guide in helping you decide whether if you need it at all. Angular is a hot topic, it is a full MVC front-end framework, but the fact that it has three versions, a size of 180kb (minified) and one of them depends on TypeScript kinda ruins it for me.
Backbone looks very interesting because it uses Underscore in its core, and many successful websites have used it, Ember is brutal, too. As for Knockout, I hope that it gets more updates in the future.