«Painless Rails» book
Why another book about Ruby on Rails?
There are two kinds of books about Rails:
- First ones are a description of Rails features.
- Second ones provide a list of anti-patterns and recipes to fix them.
This book is different. The goal of this book is to describe a new integrated approach to Web-applications development using Rails. To achieve this goal we'll go through several "unlearning" and several "learning" chapters.
In "unlearning" chapters we discover how writing code in a conventional way makes our life harder. In "learning" chapters we describe "Painless Rails" approach piece by piece.
This book is here to help you achieve these things:
- Identify and fix most harmful flaws in your current Rails application
- Establish a solid foundation for your next Rails project
- Learn to look beyond code and realize how to organize concepts, not classes and methods
Meet the book:
Table of contents*
Chapter 1: Controversial smoothness of Rails way approach
- Masking complexity with callbacks and conditional validations
- Mixing internal with external
- Ignoring layers in Rails
- Mixing Application Logic and Business Logic
- The time-bomb effect
Chapter 2: Painless Rails foundation
- Domain Models
Chapter 3: Painless Rails frame
- Hierarchy of models
- The key part of REST
- Hierarchy of controllers
- Service Locator
Chapter 4: Painless Rails approach in practice
* The book structure and titles might differ in the final version
Meet the author: Ivan Nemytchenko
- Has 14 years of professional experience with Rails
- Rails applications architecture explorer
- Regular speaker at Ruby-related conferences
- Former GitLab developer advocate
The roots of the Painless Rails approach
The author of the approach described in the book is Kirill Mokevnin - CTO of Hexlet.io. Hexlet is a major online-learning platform for programmers in Russian-speaking community.
Their platform is a 7-years old Rails application with:
- more than 300 models
- ~100 associations in the User model
- ~700 routes
- ~60K lines of Ruby code
- user base: ~250000 learners
Kirill has managed to develop an efficient approach to web development using Rails, so that through the whole life of the project they never needed a huge team of developers.
I learned about that approach in 2018. The approach made so much sense to me, so I decided that it is worth to describe it in th ebok and share with the others.
The most encouraging discovery for me was that you don't have to fight against the framework to beat complexity clumps in your app.
Who is this book for?
- You know that vanilla Rails is not enough for big projects
- You have tried multiple alternative approaches
- You are still not happy with what you get
If all of the above applies to you, then you will not regret buying this book.
What do I get?
- The work-in-progress version of the book (83 pages in PDF format), containing first three chapters.
- Also, if you understand Russian, you get a bonus of 16 screencasts (2.5 hours) with Painless Rails approach description
- Access to private Telegram chat where you can ask questions about the approach
- All future updates
This book is going to help you to:
- understand the real meaning of Rails Way code, and its negative effects
- separate business logic from application logic
- line up the hierarchy of models and controllers
- start using lightweight services to describe business scenarios
- turn your models into Domain Models
- distinguish harmful gems from harmless
- isolate harmful gems effects if you want to keep using them
- recognize and avoid harmful Rails features and conventional techniques
- learn how to write cheap but efficient tests