What’s new in Rails 5.1: Better JavaScript, for one

What’s new in Rails 5.1: Better JavaScript, for one
27-Feb-2017 04:30 INFOWORLD

Ruby on Rails, the veteran server-side web framework, is playing nice with JavaScript in an upgrade that has recently moved to a first beta release.Rails 5.1 offers multiple improvements, including encryption, system tests, and managing JavaScript dependencies from NPM via Facebook's new Yarn package manager.[ Use JavaScript in your dev shop? InfoWorld looks at 17 JavaScript editors and IDEs and 22 JavaScript frameworks ready for adoption. | NPM or Yarn? Node.js devs pick their package manager. | Keep up with hot topics in programming with InfoWorld's App Dev Report newsletter. ] By managing JavaScript dependencies through Yarn, users can depend on libraries like React via NPM. Assets are made available in a pipeline, and the binstub bin/yarn is used to add these dependencies. Developers working with version 5.1 also can compile JavaScript using the Webpack module bundler, via a Webpacker gem. But Rails 5.1 drops jQuery as a default dependency. With the rewrite of rails-ujs unobtrusive scripting adapter to use vanilla JavaScript, this dependency is no longer needed.To read this article in full or to leave a comment, please click here