|Ruby On Rails 7 Moves To No-Node Default|
|Written by Kay Ewbank|
|Tuesday, 21 December 2021|
Ruby on Rails has been updated to version 7 with major improvements that the developers say is the fulfillment of a vision to present a truly full-stack approach to web development that tackles both the front- and back-end challenges with equal vigor.
Ruby on Rails is a web-application framework written in Ruby. It is intended for creating database-backed web apps using the model–view–controller framework.
The move to a no-node model has been made possible through advancements in browser support for ES6/ESM and widespread adoption of HTTP/2, according to the launch information.
The developers say that Hotwire’s combination of Turbo and Stimulus deliver all the tools needed to produce fantastic user experiences that are much less complex to create, so the new method is the default choice for new Rails apps, replacing the far more limited options of Turbolinks and Rails UJS.
Describing the improvement, David Heinemeier Hansson,
The same approach is taken with CSS bundlers that rely on Node. With Rails 7, all they need to be able to produce is a compiled application.css file, and they’ll integrate perfectly.
Away from the front-end improvements, the Rails team has added encrypted attributes to Active Record, so your application can offer at-work encryption in addition to the traditional at-rest and in-transit coverage.
Active Record also now has the ability to trace query origins with SQL comment tagging as QueryLogs, and asynchronous query loading is now supported. Hansson says that when you have a controller action that needs to load two unrelated queries, you can now do it concurrently through Relation#load_async:
"If you have three complex queries that each take 100ms, you’d have to spend 300ms executing them one by one before. Now you can run them in parallel, spending only a total of 100ms on the set."
Rails 7 is available for download now.
or email your comment to: firstname.lastname@example.org