Have no fear... Node.js 10 is here (since April 24, actually)! And, as expected, this version is planned to grow into the platform's official Long Term Support version (in October 2018); to be supported for 3 years after that date.
So? What's in it for you, the back-end web developer?
Are there any new features and improvements worth getting really excited about? Which are they and how precisely will they improve the overall developer experience.
Now before we take a deep dive into the “steamy fresh load” of new features, I feel like pointing out that:
it's mostly incremental improvements, applied throughout the entire codebase of the platform, that Node.js 10 ships with
… performance, reliability and stability-centered improvements, bubbling up to the back-end developer's experience
But let's name these improvements that ship with the new version of Node.js. Let's talk specific incremental changes, shall we?
10 of the “really worth getting excited about” ones:
1. Error-Handling Improvements
And error messages/error-handling improvements do make the majority of semver-major commits (approx. 300) that Node.js ships with.
It's a “pledge” made since Node.js 8.0.0 to assign static error codes to all Error objects:
“Error messages should be useful, more consistent and predictable”, this has been the “pledge” driving all the sustained efforts geared at improving error-handling.
Note: error codes have been included in Node.js 10, making constant error-checking conveniently easier!
2. Enhanced JavaScript Language Capabilities
There's an entire list of Node.js 10 language improvements (you can find them all here) worth exploring and... exploiting, I'll outline the highlights only:
you now get to use line and paragraph separator symbols (U+2028 and U+2029) in string literals, that match JSON
V8 “introduces”: String.prototype.trimEnd(), String.prototype.trim(), String.prototype.trimStart()
prototype.toString() returns the exact “pieces” of the source code text (comments and whitespace here included!)
the catch clause of the try statements no longer calls for a parameter
3. The Node.js fs (file system) Has Been Significantly Overhauled
And here are the most “dramatic” improvements made during this overhaul:
the type checking and error handling have been improved
the code got restructured, for easier maintainability
a new experimental fs/promises API got implemented, featuring first-class Promise-based API
Speaking of this new API, its “role” is that of generating a warning at runtime, the very first time that it gets used. Hopefully, things will turn out “bugs-free” so that it can grow from experimental to stable.
4. Node.js 10 Ships with Full Support for N-API
N-API — the ABI stable (Node.js) API for native modules — has leveled up to a stable version in Node.js 10.
What does this mean?
it provides a stable module API, one that is not influenced by the changes in Node.js's V8 JavaScript engine
the API layer makes upgrading a whole lot easier, streamlining production deployments and... easing module maintainers' lives
… and it goes without saying that this bubbles up to native modules' maintenance costs, as well
In short: say goodbye to module breakage!
5. The Assert Module: Explore Some Crucial Improvements
All efforts targetting the assert module have been aimed at easing the internal implementation and improving the developer experience.
But let me point out some of these improvements that eventually fleshed out and landed in Node.js 10:
a new “diff” view got implemented, for whenever assertion errors get generated
overall the output becomes more descriptive, more... “verbose” (and implicitly more useful)
better object comparisons
promises support
detailed error messages
6. Node.js 10 Ships With V8 6.6: Expect a Major Performance Boost
Get ready to “exploit” V8 6.6's range of performance improvements to their full potential! Along with its new set of JavaScript language features!
From them all, I can't but mention:
the async functions
the async generators
the promise execution
7. Cryptographic Support
Node.js 10 is the first version of the platform to include OpenSSL 1.x! And this can only translate into:
Enhanced protection for your priceless data!
Now, if I am to outline just 2 of the OpenSSL features to look forward tapping into, I should definitely mention:
the Polu1305 authenticator
the ChaCha 20 cipher
8. The Trace Events Mechanism: Monitoring Your Code's Performance Just Got Easier
That's right! Keeping a close eye on how your code's performing and being able to quickly diagnose any emerging issues is easier than ever with Node.js 10!
Basically, what these trace events do is enabling that all the diagnostic information output gets collected to a file accessible to the Chrome browsers DevTools utility.
No need to use a command-line flag anymore to trigger this whole trace events mechanism underlying Node.js.
And since we're here, let me point out to you 2 trace events-related improvements worth getting (really) excited about:
the node.perf.usertiming category got added — its role is that of capturing, in the trace events timelines, all the Performance API user timer marks and measures.
the JavaScript API got implemented, as well; enabling/disabling trace events dynamically is now possible in Node.js:
const trace_events = require('trace_events')
const tracing = trace_events.createTracing({
categories: ['node.async_hooks', 'v8']
})
tracing.enable()
// do stuff
tracing.disable()
9. HTTP and HTTP/2 Improvements
Another thing to get excited about, when it comes to Node.js 10's release, is given by all the incremental improvements made to HTTP and HTTP/2.
Let me detail a bit:
when it comes to HTTP, the changes applied range from improved Streams API compatibility to stricter standards support, to improve header and error handling
now when it comes to HTTP/2, significant progress has been made for getting it the closest to “stable mode” as possible before Node.js 10 reaches its Long Terms Support cycle. And I'm talking here about improvements made to the way trailing headers requests and responses get implemented and about overall improvements of the internal implementation and the public API
10. Node.js Ships With The Experimental Node-ChakraCore
And how does this impact the developer experience? Your experience?
using the JavaScript engine to its full potential
tapping into the Time Travel debugging
… gets a whole lot easier for you. You're practically enabled to detect errors way before they even get to “infest” your code.
The END! This is how our list of 10 Node.js 10 features worth getting (really) excited about looks like! Do explore them and start your preparations for moving over to this new version of Node.js before October!
RADU SIMILEANU / May 02'2018
Here’s something new: Microsoft Build announced that it is bringing GNU project’s Bash shell to Windows. Bash or Bourne Again Shell has been a standard OS X on many Linux distribution systems but the default terminal for Windows developers is PowerShell, produced by Microsoft itself.
This means that developers will be able to write their .sh Bash scripts on Windows as well. The new system will work through a Linux subsystem in Windows 10 that Microsoft worked on with Canonical.
Canonical founder Mark Shuttleworth states: “The native availability of a full Ubuntu environment on Windows, without virtualization or emulation, is a milestone that defies convention and a gateway to fascinatingly unfamiliar territory,”
“In our journey to bring free software to the widest possible audience, this is not a moment we could have predicted. Nevertheless we are delighted to stand behind Ubuntu for Windows, committed to addressing the needs of Windows developers exploring Linux in this amazing new way, and excited at the possibilities heralded by this unexpected turn of events.”, he adds.
It gets better
The idea behind moving the Bash shell to Windows 10 is to make Windows a better operating system for developers who want to target other platforms than Microsoft’s.
Satya Nadella, the new CEO of Microsoft is actively pushing for projects that target all platforms and developers, not just Windows. A few years ago it was unthinkable for Microsoft to work together with a rival operating system such as Linux but now the company offers Linux support on Azure and plans to bring SQL Server to Linux in the near future as well.
Bash will become available with the Windows 10 Anniversary Update but Windows Insiders can try it out before that. Microsoft is planning to bring other shells to Windows as well, which is a great thing for developers worldwide.
Adrian Ababei / Apr 19'2016
Microsoft is equipping its Azure cloud service with a tool to debug PHP-based Web applications that are running on the platform. The service “offers in-depth insight into how an application is performing,” said Andi Gutmans, who is the CEO of Zend Technologies and one of the original developers of PHP.
Zend is supplying the debugging tool, called Z-Ray. The software “exposes a huge amount of information to the developer through the Web browser,” he said. PHP is one of the most widely used languages for building Web applications and dynamic Web sites.
Microsoft has long supported PHP on its Azure platform, offering a PHP runtime environment and a selection of PHP aids such as a software development kit and a lightweight integrated development environment called WebMatrix. The new additional debugging capabilities indicate Microsoft’s interest in staying competitive with other cloud providers in supporting Web applications, one of the primary uses of cloud computing services today.
As a Web programming language, PHP code can be particularly thorny to debug. When something goes wrong, error messages may not make it to the browser screen, leaving developers scratching their heads. Zend designed Z-Ray to give developers more insight into how their PHP code is operating under the hood of the browser. It details each PHP to call the browser makes to the server and reveals the code making those calls. The software, for instance, can show what specific database queries PHP has issued, and how long they are taking to complete. It can show how the session data changes between user requests.
In addition to revealing the inner workings of PHP, Z-Ray can also be used to troubleshoot many popular Web platforms written in PHP, such as the WordPress and Drupal blogging software and the Magento e-commerce platform. “It can show the architectural issues that are otherwise almost impossible to figure out,” Gutmans said. The Z-Ray service will be available as an optional add-on for PHP Azure users in two editions, a basic version available without charge and a more comprehensive version available for a “modest,” still undetermined, fee, Gutmans said. The service will be available as a preview after Microsoft’s Build developer conference at the end of this month.
Zend, which bills itself as “the PHP company,” also offers Z-Ray as stand-alone software, and as a service on the Amazon Web Services (AWS) marketplace.
Source: https://goo.gl/Gj5e2V
Adrian Ababei / Apr 17'2015