Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Layered Design for Ruby on Rails Applications
  • Table Of Contents Toc
  • Feedback & Rating feedback
Layered Design for Ruby on Rails Applications

Layered Design for Ruby on Rails Applications

By : Vladimir Dementyev
4.7 (16)
close
close
Layered Design for Ruby on Rails Applications

Layered Design for Ruby on Rails Applications

4.7 (16)
By: Vladimir Dementyev

Overview of this book

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.
Table of Contents (20 chapters)
close
close
1
Part 1: Exploring Rails and Its Abstractions
In Progress | 0 / 1 sections completed | 0%
7
Part 2: Extracting Layers from Models
In Progress | 0 / 1 sections completed | 0%
11
Part 3: Essential Layers for Rails Applications
In Progress | 0 / 1 sections completed | 0%
17
Index
In Progress | 0 / 1 sections completed | 0%
18
Gems and Patterns
In Progress | 0 / 2 sections completed | 0%

Active Job as a universal queue interface

In Chapter 1, Rails as a Web Application Framework, we talked about the background jobs layer and its importance for Rails applications. Before Rails 4.2, we only had implementation-specific mechanisms to build this layer: Sidekiq workers, delayed method calls (via the delayed_job gem), and so on.

The more implementations, the more code styles and patterns are in use; hence, the higher the learning curve for a new developer joining a Rails project. Rails’ omakase was incomplete—no item from the Background processing category was on the menu.

What is omakase?

Omakase is a Japanese term used to describe a meal consisting of dishes selected by the chef. Rails is omakase means that the framework maintainers have chosen the building blocks for your application, and they play together nicely.

To solve these problems, the Active Job framework was introduced in Rails 4.2. What is Active Job? Let’s consider a minimal...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY