Ruby on Rails 7 rejiggers JavaScript support

Nancy J. Delong

Ruby on Rails seven, the most current version of the website software framework, is now obtainable as a production release. The update embraces a entire-stack technique to website enhancement with help for JavaScript progress.

Released December 15, Rails seven leverages browser help for the ECMAScript six JavaScript typical and ECMAScript modules, extensive adoption of HTTP/2, and the import maps typical for importing JavaScript modules. It offers builders a “no-Node” technique to entrance-close enhancement even though even now supplying entry to NPM deals and modern JavaScript. Rails seven replaces TurboLinks and Rails UJS with Hotwire’s Turbo and Stimulus on the entrance close.

Most Rails apps will not involve Node.js, presented the new defaults. Developers can use the JavaScript bundler they like, as Webpack is no extended necessary. The identical technique has been taken with CSS bundlers that rely on Node Rails seven documents involve only a compiled software.css file. Bundlers this sort of as Tailwind or Bootstrap can be utilised.

Rails seven. guides can be located at guides.rubyonrails.org. Rails seven. release notes are also obtainable at the venture web page. Other improvements in Ruby on Rails seven:

  • Encrypted characteristics have been extra to Energetic Record, enabling apps to provide at-work encryption in addition to classic at-rest and in-transit protection. An supplemental security layer is supplied by this enhancement.
  • With asynchronous query loading, two unrelated queries can be operate concurrently via a controller motion.
  • The Zeitwerk code loader replaces the const_missing technique.
  • The Spring software preloader is no extended on by default, as more quickly computer systems have manufactured it unwanted apart from for the most significant apps.

Copyright © 2021 IDG Communications, Inc.

Next Post

How developers scrambled to secure the Log4j vulnerability

Previous weekend, the net caught fire, and it is even now unclear just how a lot of builders with fire extinguishers will be desired to deliver it beneath command. There was a established of very first responders on the scene, on the other hand: mainly unpaid maintainers or builders doing […]