When I first planned to develop the web service for our application I was greatly confused of choosing which framework to use. Because writing JavaScript on the server-side applications is relativity newer to me. I was not aware of the complete features of any framework. So, i started exploring all the available JavaScript frameworks. These were certain features I was looking for.
CLI tools for generating framework components. A framework that comes with a vast set of tools for generating essential components of an application like models, error handlers or even an entire CRUD application.
I hate reinventing the wheel and was really not a fan of creating the same old admin panels again for every project, so my expectation also includes a powerful admin panel with almost all the basic functions..
It’s always debatable of what makes a perfect framework structure. The main reason for me to choose a framework is, it will have all these problems addressed and make your things easy, so no need of messing up with the creation of things for basic components like routing, error handling, etc.,
Considered Frameworks:
With all these futures in mind, when I started searching for the NodeJS frameworks, I found 2 frameworks with these features. They are,
Express:
Express is really a very minimal framework on its own. It provides a robust set of features that facilitates the developers developing the project based on their own necessities and it is not restricting to have your framework in certain way of having your files or the entire architecture as a whole. If you want to have a basic boilerplate you can generate one using their own Express Application Generator.
Basically it generates the structure of the framework like below,
Again as it’s a basic structure, you have to add the models, error handlers etc., and obviously there’s no admin panel though there are some admin panels written based on ExpressJS like Express Admin.
So if you look at the advantages of using Express,
- Well Matured
- Stable
- Actively maintained with over 43K stars on GitHub
and the disadvantages based on my needs are,
- Very minimal, have to write everything on your own
Strapi:
When it comes to Strapi, first of all Strapi comes with a beautiful Admin panel that is damn powerful with lots of possibilities.
There are plugins already available for uncommon framework things like generating the documentation through swagger and Strapi admin is brutally powerful where you can edit the DB model straight from the admin panel which I’ve never seen before with any framework.
The biggest advantage of Strapi according to me is they have a WordPress like marketplace where you can find plugins for almost every common thing right from authentication, email integration to elastic search, payment integration, internationalisation etc., You can see the complete set of features in their website. And they have really nice built-in error handlers to handle your errors/responses very easily.
So, there is no disadvantage? There are.
The community for Strapi is not as big as ExpressJS but still it has around 13K stars in Github. May be this may grow in the feature, but even as of now I see Strapi as one of the very easy and convenient for any new comer to start and dive into the development.
What’s your opinion? Know a better framework? Let me know in the comments.