sailboats100754322orig

What's new in the Sails Node.js framework

Sails, an MVC web framework for building Node.js applications also known as Sails.js, is now in Version 1.0 production status, featuring an async/await capability from the ECMAScript 2017 specification that promises to improve developer productivity.

Async/await promises sizable gains in productivity and fewer lines of code. It lets server-side JavaScript code be written with the await keyword, instead of using lower-level, more-fragile flow control functions such as nested callbacks and promise chains. “Callback hell,” the most common source of bugs and stability issues in Node.js and Sails applications, is ended with async/await. Developers also are freed from manual error handling after every database query.

Intended to resemble the Ruby on Rails web framework, Sails is positioned as a lightweight framework that rests atop Express.  Sails was designed to emulate MVC patterns while supporting data-driven APIs. Applications are written in JavaScript.

Other new features in the Sails 1.0 release include:

  • A web app template using the Vue.js framework on the front end and with features such as password recovery and login.
  • Enabling of custom builds of Sails. Certain core hooks are installed as direct dependencies. Developers gain more control over dependencies and npm install sailscode can run “considerably” quicker, documentation states.
  • The datastores capability represents databases configured for an application. This could be a database running in a locally installed MySQL server, remote PostgreSQL databases in a datacenter, or a remote MongoDB database in the cloud.
  • The view engine configuration syntax has been normalized to be consistent with the approach in the Express v4+ framework that serves as a basis for Sails.
  • The i18n translation module for dynamic JSON storage has been upgraded to the lighter-weight Version 2 of this module.

The Sails 1.0 release has more breaking changes than previous versions, to favor a better developer experience over backward compatibility. The framework’s blueprint API, for example, has minor breaking changes that might require changes to client-side code. The Sails documentation provides a list of breaking changes.

Where to download Sails 1.0

You can download Sails 1.0 from the project’s website, which has instructions on getting started.

IDG Insider

PREVIOUS ARTICLE

« GE Smart Lighting review: ZigBee or Z-Wave? In-wall or plug-in?

NEXT ARTICLE

Microsoft adds ransomware protections to make OneDrive and Outlook.com safer »
author_image
IDG News Service

The IDG News Service is the world's leading daily source of global IT news, commentary and editorial resources. The News Service distributes content to IDG's more than 300 IT publications in more than 60 countries.

  • Mail

Recommended for You

Trump hits partial pause on Huawei ban, but 5G concerns persist

Phil Muncaster reports on China and beyond

FinancialForce profits from PSA investment

Martin Veitch's inside track on today’s tech trends

Future-proofing the Middle East

Keri Allan looks at the latest trends and technologies

Poll

Do you think your smartphone is making you a workaholic?