The limits of node and express?

I have been working in Express lately, and really like it as a stack. With ejs templates it is so easy to build a good user interface, I don’t really see a need for a front end framework on top of it. Express gives you easy access to the incredible universe of NPM packages and the whole thing integrates so easily with a database. It’s hard for me to imagine a project one would not be able to build with Express. So …

Why don’t I see Express jobs out there? Why is Express not a dominant framework? Are there limits to what you can do with it?

Looking forward to hearing your thoughts!

Hello!

There are jobs for express, though they may seem less because, I think, it’s mostly used by startups.

And I don’t say this because bigger companies find it less useful, it’s just that a big company has a software already built using a different technology, and migrating it may be too expensive.

If you think about it, most jobs require something related to JavaScript, hence it’s easier to find a JavaScript developer than a, let’s say, C# one.

In regards to express… it may be that it’s implied that when you have experience with node you already know how expressjs works, after all it’s quite simple (simplicity is good), functional and easier to have something working in less time… or it may be that companies are moving to graphql, which many have called the improvement on REST APIs, which is debatable.

Nevertheless, there are jobs for express on startups, you just have to look.

Those are my thoughts :stuck_out_tongue:

Thanks for those thoughts! I wonder if there are limits to what you can do with Express. Or to put it another way, do you know if there are things you can do with popular front end frameworks that you cant do with Express?

I don’t think there is something you cannot do with Express that you can with other back end frameworks.

However, an advantage of using a separate project for the front end is scalability. I could have two separate servers, one for the front and another for the back end which could grow separately.

Another advantage could be that teams can work more efficiently with two separate projects (maintainability), where each team may be pushing to a different server.

It will depend on different factors, but those are problems that can be solved by separating the projects.

Edit

Just to clarify, this is a simple case. Take in consideration that there can be balance loaders or an entire cluster of machines powering a service :slight_smile:.

1 Like

Hi @jimmyFox , good questions :slight_smile:

Express is a framework by itself, not a stack.
You can use it within a stack, which is what it is often used for. But relying only on it has a few downfalls.

  1. What happens if you don’t have a network connection, or have a bad internet connection to the express server? Nothing will render, or take ages to appear.
  2. What happens if you want “fancier front-end features”, such as instant messaging chat, or notifications, or quicker feedback on user input (like autocomplete?)
  3. What happens on mobile devices? Is your site responsive, able to change depending on the device, or changes to the screen size? (this could partially be done server-side)
  4. What happens if you want a mobile app? Express provides almost nothing to build a mobile app UI from.
  5. What happens when you become super successful and need to add new features to existing ones? Express is very flexible almost to a fault with how you build our app, making it easy to change, but more prone to breaking things as it doesn’t enforce any distinct architecture.
  6. What happens if you need to run a CPU intensive task? This isn’t Express’s fault, rather its just a limitation with nodejs itself. Nodejs is single threaded, which means if your single thread is busy calculating something, it can’t even process other requests. This force you to build out more nodejs instances where other languages and architectures could just spin up other threads to handle the load. (nodejs can do this but generally doesn’t)

(not all of these are solved by front-end frameworks, but they generally aren’t solve with Express)

No one should be a pure “Express developer”, as that means you rely on 1 framework for all solutions when in reality you should use the right tool/framework for the job. Being a nodejs developer is more generic and probably means you know more than just using express. Going further a back-end developer in general would know when nodejs isn’t a good fit at all and could probably use another language if need be.

Express is a dominant framework in its domain (nodejs webserver), but its only a web server framework. It solves a select set of problems very well and is essentially a standard for its domain. This doesn’t mean it is a be all end all solution though. (nothing is)

2 Likes

Those are great insights, and you have definitely given me a better idea of the limitations of Express…thanks!