DEV Community

Discussion on: What's the Node framework landscape like?

Collapse
 
ryansmith profile image
Ryan Smith • Edited

I recently researched Node frameworks for a project and there are a ton of options to choose from.

  • Express - Still the most widely used by a large margin. It is a barebones framework, so much of the setup for routes/views is done manually. To extend Express, you would use Express middlewares to take action on the incoming requests or outgoing response.
  • Koa - The successor to Express from the same initial development team, but has not gained as much traction as Express.
  • Sails - A framework that is based on Express, but provides some MVC conventions and ways to generate routes.
  • Hapi - This one has been rising in popularity. It provides more features out of the box than Express and there are plugins to extend it. It differs from Express because these plugins run together with Hapi to provide that functionality, as opposed to middleware that operates on requests and responses.
  • Adonis - This is more of a full-featured framework that was inspired by Laravel. It has been gaining popularity and looks pretty slick.

Those were the top 5 I considered, but there is also Meteor, Fastify, Nest, Keystone, Hasura, Vulcan, Hammer.js, Prisma, LoopBack, and others.

When in doubt, follow the saying of "Nobody ever got fired for choosing IBM" but replace that with "Express". It gets the job done and has the community support to back it up. A lot of the newer frameworks look very cool and include more features to provide a better developer experience, but it can be hard to choose and hard to predict long-term support for them.

Collapse
 
shadid12 profile image
Shadid Haque

Hmm I think sails is not relevant anymore :(

Collapse
 
leob profile image
leob

Right, that should definitely be AdonisJS now, Sails is probably a thing of the past

Collapse
 
guledali profile image
guledali

The idea of sails.js was promising I think the biggest problem with sails.js was that it came out when node was still infant.

Collapse
 
leob profile image
leob • Edited

AdonisJS is interesting and appeals to folks who've used Rails or Laravel (which would include myself).

The only thing that looks a bit weird is their homegrown custom "import syntax" (using a "use" keyword that seems to be taken literally from Laravel), instead of 'require' or standard ES6 'import'. But maybe (probably) their documentation explains the rationale behind that choice.

Collapse
 
shimjudavid profile image
Shimju David

I heard the 'use' syntax is going to be replaced with ES6 'import' in the next version of AdonisJS v5

Thread Thread
 
leob profile image
leob

Interesting! I don't know what the original reasoning was behind "use", but I assume it had some advanced capabilities which are now covered by standard "import" so that they don't need their homegrown syntax anymore ('import' is now supported natively by the newest node.js versions).

Thread Thread
 
guledali profile image
guledali

V5 is being rewritten in TypeScript

Thread Thread
 
leob profile image
leob

That's also good news, I'm definitely starting to see the advantages of TS.