In my sense, it is more "complete" than dead. It has everything they consider to be useful for the framework and more drastic changes will not be made because of the huge usage.
So many companies rely on it that it will get security patches, however, I would not expect any new big features anymore.
If you are searching for an alternative, I really like NestJS, it is less bare-bones and more opinionated than Express.
Dart runs on Google Cloud Run (which IMO will replace Cloud Functions potentially since it's better in almost every way). So you can already do this if you want.
Otherwise, it's pretty hard to compete with NodeJS with TypeScript for backend. The community is ENORMOUS and very mature. Every major organization produces a code library for their product for Node by default.
There is nothing stopping the Dart community from developing server-side dart, just not many people are doing it.
Someone could make a NestJS clone for Dart, but it would take a huge team a very long time to create it. And who would do that when they could just use NestJS since TypeScript and Dart have 95% the same syntax. NodeJS also has great performance these days.
Dart is used on the front end specifically because it compiles to native code for high performance in cross-platform apps. Google was able to fully control the ecosystem and their needs for this specific purpose with Dart.
So for the Google team to invest in optimizing compiling for backend server environments (maybe like how Rust does), we would need both Google to work really hard on yet another compile target, and a community of people to develop packages that can take advantage of that. Google doesn't really have a killer implementation for the backend (like they have Flutter for the frontend), so they don't really have a reason to do this.
I think it's possible, but Dart's community will have to be an order of magnitude larger to support that effort.
IMO, having to use two different languages is not a big deal especially if it's TS and Dart. Jumping between TypeScript and Dart is really nothing.
That's awesome. Kudos to that wise manager ;-)
I've been on a few fast prototyping teams at my company, and with Angular, as one person I was able to develop web apps in a matter of weeks that the React team of 2-3 engineers would have taken months to do... while developing the backend in Node too.
Unfortunately the more established product at the company is written in React and the leaders want to consolidate around that.
As an aside I recently discovered NestJS and am loving it as a backend framework. It's basically a Node/Express framework that adopts a lot of the patterns from Angular. It rounds out the full stack very nicely.
I'm using https://nestjs.com/ for APIs and their documentation states
>"Nest is a framework for building efficient, scalable Node.js server-side applications. It uses modern JavaScript, is built with TypeScript (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming)."
So yes, I'm kind of following OOP principles.
Meteor is pretty stable from what I've seen.
Sails.js is a popular and stable Node framework. I haven't used it, but from what I've seen it's up to snuff. It doesn't come with out of the box testing, but it does have a section in its documentation about testing, and details the process for installing mocha and setting it up. It seems very straightforward.
NestJS is another Node framework that's newer than Sails (IIRC), but I much prefer it. It's takes inspiration from Angular, if you're familiar with that. Nest comes with a CLI for scaffolding projects quickly, and they also have their own testing packages that compliment it, making testing far more integrated than Sails does.
I prefer Nest, and I have a feeling that you might like it over Sails. Either way, what makes Sails or Nest or Meteor / Node or Rails good is what you're comfortable with. Both Node and Ruby on Rails are very capable of achieving what you'd like. There are pros and cons to each, and choosing what you are most comfortable with here will be the better choice for you.
If you're just looking to learn Node for the sake of learning, I suggest picking a framework and just trying it out.
it's always a good idea to look what companies search for in your area.
knowing express and node will come in handy in a lot of situations including daily frontend business.
Big cooperations often use Java (spring) and .Net core. Both are good places to start.
For Node: NestJs ist probably the best batteries included framework in the node ecosystem.
Because Node itself has a low level API, developers have to set the software architecture themselves, and it requires a strong rigor.
JavaScript not having such things as private properties doesn't help to build something SOLID.
Also, because JavaScript was a front-end only language, many front-end only developers went into back-end without having engineer knowledge, then they started building things without using proper patterns.
It's, IMO, why we can see so many Node libs with a "hacky" API.
I'm not saying all front-end developers are "hackers" instead of "engineers", but there were many.
The actual trend is reversing that. Mainly because projects like Angular.
Then, we finally have projects like NestJS !
I waited for so long.
Thank you for the great feedback!
Full disclosure - I am a huge TypeScript fan and will happily go on and on about the advantages of TS over JS :D. But for this answer I'll stick to the specific advantages in the context of building a Vendure app.
So Vendure is built on top of NestJS, which itself is a TypeScript-based node framework. Both Nest and Vendure make heavy use of typescript features such as decorators. So Vendure is very much aimed primarily at TypeScript, and while you certainly can use JS, it is much clunkier to eg. do the decorators stuff without TS. So I would recommend against it. I guess the main "pro" of JS is that there is no new stuff to learn, and the build pipeline has one fewer steps.
So to your second question - I got into TS about 5 years ago and I'm not sure what the latest best learning resources are. A friend of mine published this book: TypeScript in 50 Lessons, which I've not read but I've heard a lot of good things about.
I agree -- the /api pages are really nice if your back-end layer is fairly limited in scope because you get to live the dream of a single full-stack project.
If you compare Next's API routes to something like NestJS (the back-end framework that sounds the same but is totally different) it offers quite a bit of flexibility at the expense of additional code and a separate back-end to deploy and maintain.
Some of the advantages are:
Disadvantages:
So, I think if I were building a scope-limited project that doesn't have really cumbersome server-side requirements, I'd go with the NextJS API routes, but if I were building a large (or potentially large) project where the structure and consistency of something like NestJS (or a well-designed Express app) starts to be more helpful, I'd elect to build a standalone back-end app instead.
The Dart team is REALLY focusing everything on FrontEnd. I would personally suggest learning TypeScript as the developer experience is similar to dart - not as good, but way better than JavaScript, but typescript / node has an extremely mature and diverse backend ecosystem.
I personally build my backends with NestJS.
I’m a big fan of NestJS for building backend microservices. Monorepos are supported. You can easily switch out the underlying transport that microservices use to communicate with each other. For example, if you want to use a queue, you can use the RabbitMQ transport to do so. Nest has a CLI tool for generating projects with build, watch, and test scripts already included. It’s a really robust and powerful framework, but might be overkill if you’re just looking for a learning experience.
NestJS is ~~quickly becoming the defacto~~ a decent way to use TypeScript on the backend. If you are coming ASP.NET, you should feel at home. Likewise on the React side you can use TSX (the react variant of Typescript), and have code end to end with TypeScript. There have been some new patterns where you are able to share data interfaces between the frontend and backend now that it is all TypeScript/JavaScript.
Edit: Rustled some jimmies sorry
It's an awesome combo!!! Almost perfect! I can imagine how much you loved that time :)
For some reason, lately, I've found myself using https://nestjs.com/ quite a lot (the name is too similar with Next.js eheh)
Have you ever tried nestjs? If yes what do you think of it?
Assuming you don't want to just write both the GraphQL service and REST endpoints from scratch (which you certainly could do), the easiest option would be to use some existing framework that can generate both a GraphQL schema and REST endpoints from a common collection of data models. The two that come to mind are NestJS and LoopBack. I haven't used either extensively so maybe others can speak to their experiences in this regard.
Alternatively, you can build an OpenAPI-compliant RESTful service and then use any one of a number of existing libraries to create a GraphQL schema that wraps it.
There are new Nodejs frameworks. If you want, you could take a look at them.
https://nestjs.com/ and https://moleculer.services/
Also, "serverless" architectures (oriented to microservices) would be great too.
Thanks, I figured as much. I'm actually using Nest (https://nestjs.com/) for my web server with custom API and they have some options for running microservices which I'm looking into.
Since my 'CRON' task is just a simple script at this stage, and I only need the one, I am thinking I will stick with just using my own setInterval() calls for now, since it will help me understand better, and I think a CRON scheduler would be overkill at this point.
No. I mean Nest.js
A really great node.js framework for building back end services.
It encourages u to follow concepts of clean code, dependency injection, modular coding, three layer architecture, etc out of the box.
If you come from the Java world I'd suggest to use nestjs + typeorm. It has microservices support plus great abstractions for module definitions, controllers, services. It might be a long ride, but definitely worth it. I'll never go back to old js with express given my past experiences.
Have a look at NestJS and just start building some basic API with it to get a feel on how things are done.
Stay away from MongoDB despite all the beginner tutorials telling you to use it. It is for special use cases most applications don't fall into. Use postgresql instead. And do yourself a favor right from the beginning and stay the hell away from TypeORM. Use MikroORM or Prisma.io instead.
Any backend technology would do but if you want to go with the javascript ecosystem:
You should use node.js I think for backend and prioritise typescript. Javascript is IMPOSSIBLE to work with in the backend if you have anything seriuous.
You should learn express.js and then use an MVC framework. My preference goes to https://nestjs.com/ (uses express.js under the hood).
Once you'll start your first job you will have to learn something new anyway.
To be frank there is a lot of hype right now, serverless, cloud native, jamstack...etc.
Those are all tools to solve specific problems. But people get personal about it and try to put that everywhere. A bit like what is happening in the blockchain/crypto.
​
You should try to acquire a good web development foundation. This will serve you forever.
TL;DR
If you don't like frontend don't do it. Focus on backend. Master express.js and nest.js. Try to integrate stripe, photo uploads (+ photo compression/resizing through lambdas). Integrate mailing with postmark or mailgun. Try websockets, social auth with passport.js. Try microservices. Learn by doing.
​
Use this site to see where there is demand
for fullstack JS projects, I find TypeScript + NextJS + NestJS + TypeORM to be pretty comfy:
Backend: either NestJS or Serverless depending on use case. if GraphQL is needed, Apollo Server works for me
Database: Postgres & Redis
Frontend: React & NextJS
Deployment: i should be using PM2... but i'm not
No, I think you are mixing up Nest.js with Next.js. Nest.js is a node.js framework that allows you to create backend APIs. I am using that for the backend and Nuxt.js for the frontend.
hey there,
i recommend 2 frameworks for typescript backends:
these use decorators and are a bit java like. I used them a lot in different companies and id definetly recommend to start with nest if you want to build a nice ts backend. However just my opinion. Have a look at it and of course have fun
You should take a look at NestJS, it's basically Laravel in Typescript. As in they have plugins for all of the important stuff: auth, testing with Jest, TypeORM, OpenAPI (Swagger docs).
If you want to stick with your boiler plate, there are express middlewares (eg this one that generate swagger docs from your code (by using annotations). Not sure how that stacks up against Swashbuckle though.
Nextjs comes with a bit of a learning curve (depending on your programming background), but once you get the basics it's pretty beefy and my personal go to for Node server arch. They have test templates, security plugins, a great cli, and their documentation has improved a lot.
Try Nestjs(https://nestjs.com/) + nestjsx/crud (https://github.com/nestjsx/crud) + react admin (https://marmelab.com/react-admin/)
You first two give you the Crud API, and react admin does the GUI over it.
I mean, I thought express was as light weight as it got lol.
So I like Nest.js a lot but the problem with that is that it depends on TypeORM, and I don't know how I feel about TypeORM. It's not a major version and I've already noticed one weird thing it does.
But it teaches me how to implement the repository pattern, the active record pattern, OOP, and dependency injection. It's really wonderful and easy to write decent code when i'm provided that kind of structure.
I really would like to see how I go about doing things like that myself.
With just node or just express.
So im vaguely familiar with Symfony. If i remember correctly its more of an MVC type full feature framework.
Hopefully this is an accurate assessment. I'd recommend checking out https://nestjs.com/ .
Its a more modern, full feature framework written in node. I haven't personally used it, but it seems pretty legit. Also, it seems pretty opinionated, so should hopefully help with the a million libraries, feeling since it picks a few and forces u to use them.
And all the times i stopped to take a look in it for a while, it feels like i was coding in java and was over engineering something.
How it is to use on small and on large scale projects? Pros and cons that you have faced?
I'm using NestJS for the backend portion and the frontend clients are just HTML/CSS/POJS minified bundles using Webpack and Express middleware. I am trying to follow semver conventions for versioning. No React yet, but we'll see. I'm leaning towards Angular and Web Components for the next iteration on the streaming client.
Oh and by the way, I saw you were working with Visual Studio. So I can imagine you usually work with C#. Maybe try out TypeScript with Express. If you want to scale up from there in terms of code quality and maintainability you can also use NestJS, which I also contribute to - it is quite easy to migrate because you can use your exisitng Express instance and rewrite over time. So if you need help to get started, ping me :)
Nonetheless, I think it is great that you have started with a lean setup (no frontend/backend framework). It is way easier to get started like that and easier to understand.
> How hard would it be to retrofit an existing express app to this?
I wouldn't say hard, it'll just take some time. NestJS follows Angular's programming paradigms, which are pretty different from express, but NestJS uses express under the hood by default so shouldn't be too hard, just read the docs: https://nestjs.com/
Depends on how sophisticated you expect your server side to be.
​
Node is very good at bootstrapping server side projects, but its hard to recommend it if you expect for your server-side to grow in complexity over time. There is a threshold that goes from manageable to unmanageable in node, with the unmanageable aspect directly proportional to the number of ways things interact with your node process. The complexity threshold is insidious and can creep up on you, and JavaScript as a language provides minimal functionality to deal with it. In general, if you suspect any complexity on the server-side, then you're better off using a typed language, ideally one with reflection and type introspection so that you can generate the parts you would otherwise need to manually author and manage yourself (particularly around server to server interactions, service contracts, JSON schemas | XSD and generally message types that are passed around).
​
Node can be good however, but if using it, be mindful of creeping complexity (and the things your do to try and manage it), use TypeScript (your on the server, its mission critical, use a type system) and try and leverage frameworks like https://nestjs.com/ which help to manage application architecture (express is not going to help you when things scale up).
​
In my experience, (having worked on node systems since 2012), I'm generally of the opinion node shouldn't be used for anything other than prototyping and perhaps message forwarding in brokered systems. I feel the immediate gains you get at the beginning of a project generally give way to diminishing returns in the long term, and usually im left wishing I was using something else.
​
Just my thoughts anyway.
I would recommend looking into NestJS.
You can use it with Firebase if you choose and that maybe what you prefer since nest has a different focus than Firebase and solves different problems.
From a quick glance, it seems NestJS is exactly what you are looking for. I've no experience with it, but from reading the documentation, it offers these features:
In fact this framework is looking so appealing I might start using it. Sorry AdonisJS, you tried your best. :D
The most popular web framework for Node is Express, which does not use OOP for its purposes.
A framework that I've had my eye on for a while but haven't tried yet but uses OOP is Nest. It uses controllers and the like that you see in Java frameworks.
Personally since we started using Typescript at work I have tried to use it whenever possible, it makes it a lot easier to work with JS, especially if you are used to typed languages. Complex typings, such as for redux's state management can sometimes be a headache, but it's usually worth the effort of getting it right.