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.

rails logo

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.

For applications that still have a dependency on Node, there are improvements too. You no longer need to use Webpack with Webpacker, and instead can choose any JavaScript bundler you prefer.

Describing the improvement, David Heinemeier Hansson,
creator of Ruby on Rails, said:

"Whether you like esbuild (and who doesn’t these days!) or rollup.js or even Webpack, you’ll be able to use any of them through the new jsbundling-rails integration that can be pre-configured for new apps with --javascript esbuild."

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.

rails logo

More Information

Ruby On Rails

Related Articles

Rails 6 Adds Action Mailbox And Parallel Testing

Ruby On Rails Survey

Top 10 From Around The Web: Ruby On Rails Resources

Top 10 From Around The Web: More Ruby On Rails Resources

Ruby On Rails Reaches 5.0 

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Extend NGINX With The New JavaScript Module
28/10/2024

Inject middleware functionality into NGINX with the expressive power of Javascript. NGINX JavaScript or NJS for short is a dynamic module under which you can use scripting for hooking into the NGINX e [ ... ]



Zitadel Announces Funding And Future Plans
21/11/2024

Zitadel has announced a major funding round that will be used to expand technical teams and fund further product development. The company is the creator of an open source project for cloud-native iden [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info