If you’ve worked with errors and debugging a node, it can be kind of a pain. Before we got some weird string based error messages that we’d have to constantly look up or sometimes guess what they mean but now with node 10, they actually adopted standardized error codes. So we have consistent codes with a repeatable pattern instead just a string with no identifiers and of
HTTP 2 was introduced in N
odeJs 8, but it was known to be very buggy in version 10
We also have stable HTTP 2, so HTTP 2 is a higher performing successor to HTTP. If you really haven’t looked into HTTP 2, it’s not a rewrite of the protocol or anything like that. All the HTTP methods, the status codes, all the semantics those are all the same and you should be able to use the same API is with HTTP 1.X, there will be few additions but everything should be backward compatible. Now HTTP 2 was introduced in node 8, but it was known to be very buggy in version 10.
- NodeJS Logging: What should you know about logging?
- SQL vs NoSQL | SQL vs MongoDB
- How Does MongoDB or NoSQL Database work? (Relations)
- SQL Database structure | Schemas | Data Normalization
- Why node.js is better than Java? (node vs java)
It is now completely stable and safe to use. As far as frameworks go, the happy JS framework and the KOA framework fully support HTTP 2 right out of the box, as far as express though, at least at the moment for the last time I checked, you just need to use the Express HTTP to work around package, you would think Express would be the first to fully support it but apparently not. So ultimately, this should lead to you building faster API’s, the focus of HTTP 2 is performance, specifically end-user perceived latency and network and server resource usage, so I think having stable HTTP 2 is a pretty nice addition to version 10.
What’s new about Modules in NodeJs 10?
Now let’s talk about modules, node offers better support for ESM or Xmas script modules for years. Node has used common-js modules and if you don’t know what that is, it’s we bring in our packages using like Const equals, require expressJs or require whatever module and the equi script modules or es6 modules is where we say import something from something.
For example, react angular and most front-end frameworks they use this syntax with web pack and babel, now understand that native Ecman script modules are not standardized yet and they’re not ready to be used by default in node 10. But they are getting closer and it’s a huge priority it’s just its apparently, it’s very difficult for them to kind of integrate along with the common j/s modules but for now, we can enable the experimental modules flag and any file where you want to use ESM or ECMA script modules.
Why it’s so hard to get native ESM into NodeJs
You can you have to give it this .mjs extension. I’ll be very happy when we can actually just use es6 modules right out of the box, of course, you can implement like babel on your server side and use them, but it would be nice to not have to do that anymore and just have it right out of the box so that’s something that’s one thing I’m really excited to happen. Now there’s a really great medium article that kind of explains the status of this as well as why it’s so hard for them to get native ESM into
Because now it provides better abstractions that are more true to
With TLS 1.3 we’ll have faster SSL handshakes and even better security
As far as cryptography open SSL has been updated to version 1.1 so with TLS 1.3 we’ll have faster SSL handshakes and even better security. It’ll also include the chacha 20 cipher which is a high-speed cipher up to three times faster than a ES which is the advanced encryption standard and we’ll also get the poly 1305 Authenticator for authenticated encryption which I don’t really know too much about, but this stuff is going to make node more secure overall so if you’ve worked with node you’ve probably worked with the FS or the file system module which obviously allows you to interact with the file system.
Node 10 we have the experimental FS promises, meaning, that we can now use a synchronous file system methods that return a promise, and we can use this require FS / promises and we’ll get methods where we don’t need to use callbacks and it will make our code much cleaner, more readable especially if you use async await. Also for error handling, we don’t need to use try catch blocks because where it’s promise based we can now use dot catch.