Layered Design for Ruby on Rails Applications: Discover practical design patterns for maintainable web applications

Description:

About this item:

Transition from the traditional Rails MVC trio to an abstraction model and evolve your application codebase with synchronized components, boosting flexibility and maintainability

Key Features

  • Understand Rails' architectural patterns along with its advantages and disadvantages
  • Organize business logic in Rails apps when the default approach is insufficient
  • Introduce new abstractions to address design problems
  • Purchase of the print or Kindle book includes a free PDF eBook

Book Description

The Ruby on Rails framework boosts productivity by leveraging the convention-over-configuration principle and model-view-controller (MVC) pattern, enabling developers to build features efficiently. This initial simplicity often leads to complexity, making a well-structured codebase difficult to maintain. Written by a seasoned software engineer and award-winning contributor to many other open-source projects, including Ruby on Rails and Ruby, this book will help you keep your code maintainable while working on a Rails app.

You’ll get to grips with the framework’s capabilities and principles to harness the full potential of Rails, and tackle many common design problems by discovering useful patterns and abstraction layers. By implementing abstraction and dividing the application into manageable modules, you’ll be able to concentrate on specific parts of the app development without getting overwhelmed by the entire codebase. This also encourages code reuse, simplifying the process of adding new features and enhancing the application's capabilities. Additionally, you’ll explore further steps in scaling Rails codebase, such as service extractions.

By the end of this book, you’ll become a code design specialist with a deep understanding of the Rails framework principles.

What you will learn

  • Get to grips with Rails' core components and its request/response cycle
  • See how Rails' convention-over-configuration principle affects development
  • Explore patterns for software flexibility, extensibility, and testability in Rails
  • Identify and address Rails' anti-patterns for cleaner code
  • Implement design patterns for handling bloated models and messy views
  • Expand from mailers to multi-channel notification deliveries
  • Introduce different authorization models and layers to your codebase
  • Take a class-based approach to configuration in Rails

Who this book is for

This book is for Rails application developers looking to efficiently manage the growing complexity of their projects. Whether you've recently launched your first Rails minimum viable product or are struggling to progress with a sizable monolithic application, this book is here to help. A deep understanding of core Rails principles is a must. Prior experience in building web apps using the Rails framework will help you understand and apply the concepts in the book in a better way.

Table of Contents

  1. Rails as a Web Application Framework
  2. Active Models and Records
  3. More Adapters, Less Implementations
  4. Rails Anti-Patterns?
  5. When Rails Abstractions Are Not Enough
  6. Data Layer Abstractions
  7. Handling User Input outside of Models
  8. Pulling Out the Representation Layer
  9. Authorization Models and Layers
  10. Crafting the Notifications Layer
  11. Better Abstractions for HTML Views
  12. Configuration as a First-Class Application Citizen
  13. Cross-Layers and Off-Layers

Editorial Reviews

About the Author

Vladimir Dementyev has been working on web applications for more than 10 years and launched his first Ruby on Rails project back in 2014. Since then, he has been working on a dozen of Rails web applications, used by hundreds of millions of customers, monolithic or component-based, following the Rails way or trying to swim against the current.

He has been an active member of Rails open-source community since 2015, becoming a regular Rails contributor, a RailsConf speaker, and the author of dozens of gems, including AnyCable, TestProf, and Action Policy to name a few. For his work on the Ruby Next project, the author got the Fukuoka Ruby Award for outstanding performance in 2021.

Currently, he’s leading the backend developers’ team at Evil Martians, helping dozens of web projects around the world build better software.

Review:

5.0 out of 5

100.00% of customers are satisfied

5.0 out of 5 stars Arrived in good time, Christmas present for son

L.D. · December 23, 2024

Books are what I ordered

5.0 out of 5 stars Elevate Your Rails Craft: The Go-To Guide for Advanced Design Patterns

D.P. · September 4, 2023

As someone who has been writing Ruby on Rails code for over 15 years, I can honestly say that this book by Vladimir Dementyev is a treasure trove of insights for seasoned developers. This book delves deep into the intricate layers of Rails, offering a sophisticated understanding that goes beyond the basics. Whether it's tackling the nuances of Active Record or discussing complex layered architectures, the book makes you rethink and refine your approach to Rails development. One of my favorite parts was the chapter on authorization models; it provided me with a comprehensive look at something so essential, yet often overlooked. But the book doesn't stop at just offering advice; it also encourages you to experiment and find your own best practices. For those of us dealing with mature, more complex systems, this book is a godsend. It's not just another Rails book; it's an investment in mastering your craft.

5.0 out of 5 stars Must-read for career Rails devs

J.S. · August 31, 2023

I loved this book, and found it very timely given the many questions and opinions I've seen in the community over the past couple years, about how to grow Rails applications beyond what the framework gives you out-of-the-box.As an overarching concept, Vladimir lays out a compelling vision for an "Extended Rails Way" that first guides us on how to use the baked-in abstractions well, and then helps us imagine how we could extract new abstraction layers that really feel like they could be Rails.The book helped me see how I could turn design patterns into new, cohesive abstractions that rhyme with Rails, creating more harmonious codebases with reduced cognitive burden.Vladimir provides clear perspective and helpful recommendations around some of Rails' most contentious features, including callbacks and concerns.Throughout the book, there's a repeated pattern of showing less-than-ideal examples, and then reasoning our way into one or more improved solutions. I found observing his thinking here to be really informative and helpful.I was impressed by how comprehensive the book is, covering all the topics you'd expect, like Active Record and Active Storage, plus those you might not expect, like filter objects, notifications, view components, and even configuration and logging.Long story short, this is now one of two Rails books I'll be recommending that all Rails devs read.

5.0 out of 5 stars Fantastic resource for intermediate and above Rails developers

K.C. · September 6, 2023

This isn't a book for beginning Rails developers, but for those who already know the framework and have worked in with it for awhile, this book is a great resource for leveling up. It covers not only the Rails way, but it also describes how to grow large applications sensibly once the basic Rails abstractions are no longer enough. It gives examples of different patterns and abstractions as well as how to evaluate whether or not they are a good fit for your application. I appreciate this nuanced approach, because every application is different and there are tradeoffs to everything.The book also covers several Rails antipatterns and discusses common Rails concepts such as thin controller/fat model and where those ideas can lead to problems in large applications. Additionally every chapter ends with thoughtful questions for the reader and exercises to illustrate the points raised in the chapter. Many also include a list of resources for further reading on the topic. To get the most out of the book you'll want to clone the associated repository and work through the questions and exercises.This is an incredible resource for those looking to take their Rails development practices to the next level, with great advice on dealing with the complexities that come with larger applications.

5.0 out of 5 stars Great for leveling up your Ruby on Rails skills

T. · October 11, 2023

This is a great read for intermediate Ruby on Rails developers and software engineers in general. The book provides clear and easy-to-follow examples. Many of the examples only require a slightly higher level of understanding beyond beginner-level Rails knowledge, making it accessible to a wide audience.One aspect I appreciate is that the design principles taught in this book can be applied to other languages and frameworks. For instance, Chapter 9 discusses various authorization models, which I found very helpful. Many other software engineering books either skim over how to implement authorization or provide overly simplistic examples.If you're a language-agnostic programmer, like me, who knows Ruby on Rails, you'll find this book to be incredibly valuable.

5.0 out of 5 stars Great resource to level-up your Rails-fu

M.G. · September 12, 2023

This book is mostly geared towards intermediate to senior-level Rails engineers, but more junior-level folks can still benefit from the information contained therein.The first several chapters are an overview of how Rails works which are essential for any engineer who wants to get the most out of Rails. The rest of the book are a collection of different design patterns that someone could employ to make an existing application easy to reason about.I wouldn't recommend starting with these advanced design patterns or else you run the risk of over-engineering and introducing too much complexity unnecessarily, but if you've got an existing app that's starting to look a little crufty, these patterns can help you to abstract away the cruft in more convention-y way.The content of the book is great. It's easy to read and follow. A bit dry at times (but what technical resource isn't dry?).

A solid Rails book

L.M. · October 15, 2023

I just love reading an up to date rails book with valuable insight from a seasoned dev. I’ve really enjoyed this one. Layered design should be the new rails way.

Layered Design for Ruby on Rails Applications: Discover practical design patterns for maintainable web applications

4.8

BHD23059

Quantity:

|

Order today to get by

Free delivery on orders over BHD 20

Return and refund policies

Product origin: United States

Electrical items shipped from the US are by default considered to be 120v, unless stated otherwise in the product description. Contact Bolo support for voltage information of specific products. A step-up transformer is required to convert from 120v to 240v. All heating electrical items of 120v will be automatically cancelled.

All product information listed on the site are from 3rd party sources, including images and reviews. bolo.bh is not liable for any claims or promotions mentioned on the product description or images with textual content. For detailed product information, please contact the manufacturer or Bolo support by logging into your account. Unless stated otherwise during checkout, all import taxes and duty are included in the price mentioned on the product page. bolo.bh follows the rules and regulations of sale in Bahrain and will cancel items in an order that are illegal for sale in Bahrain. We take all the necessary steps to ensure only products for sale in Bahrain are displayed. Product stock and delivery estimate may change with the seller even after placing the order. All items are shipped by air and items marked “Dangerous Goods (DG)” by the IATA will be cancelled from orders. We strive to process your order as soon as it is finalized.

Similar suggestions by Bolo

More from this brand

Similar items from “Networking & Cloud Computing”