Exploding Rails by Ryan Bigg [Leanpub PDF/iPad/Kindle]
Exploding Rails
Exploding Rails
$20.00
Minimum
$25.00
Suggested
Exploding Rails

This book is 95% complete

Last updated on 2018-05-16

About the Book

Learn how to improve a Rails application's structure by using the rom-rb and dry-rb set of gems. Move away from messy models and move towards crisp, clean code.

(This book is currently in a "beta" state, with some medium-sized changes coming to its code in the near future. Hence the "95% complete" part. I'd still love for people to read it in the meantime though!)

The default structure of Rails applications hasn't changed all that much in over a decade. And with good reason: this directory structure makes it easy to jump into building a Rails application.

While I agree that this way is still extremely simple and great for getting started within a Rails application, I do not agree that this is the best way to organise a Rails application in 2018 with long-term maintenance in mind. A decade of Ruby development has produced some great alternatives to Rails' MVC directory structure that are definitely worthwhile to consider.

One alternative can be found in the combination of the rom-rb and dry-rb set of gems.

The `rom-rb` gems allow us to interact with a database with just as much ease as Active Record, but with the added benefit that persistence and business logic aren't bundled together in the same class.

The `dry-rb` gems allow for splitting the validation logic away from the business logic's class (dry-validation) and also provides a sensible alternative to the community-wide pattern of service objects (dry-transaction).

This guide covers how you would go about integrating these gems into a brand new Rails application, building features in an iterative fashion.

About the Author

Ryan Bigg
Ryan Bigg

Ryan Bigg won a Ruby Hero Award in 2011 for his work on documentation within the Ruby on Rails community, including work on several of the official Ruby on Rails guides, and his first book Rails 3 in Action, which is now in its second edition as Rails 4 in Action. On the Leanpub side of things, he wrote Multitenancy with Rails.

He previously worked full-time on the open-source parts of Spree Commerce as the Community Manager, but now works full-time at Culture Amp. Oh, and he is well-known on Stack Overflow for providing great answers for Ruby and Rails questions.

He even has a blog.

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors and publishers use Leanpub to publish amazing in-progress and completed ebooks, just like this one. You can use Leanpub to write, publish and sell your book as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub