Struggling with complex Rails app and business domain?
Do you recognize these problems in your application:
- no clear boundaries, just one big monolith with hundreds of models and associations
- ActiveRecord classes are getting really big (50 attributes even) and constantly acquiring more knowledge about your whole system and more responsibilities
- service objects dealing with too many responsibilities
- critical business logic implemented in validations (especially conditional validations depending on state)
- complex business workflows and processes are hard to see, manage and extend
- lots of bugs when a few features enabled together
- maintenance and adding features is getting harder every day
- it’s hard to balance performance and maintainability, when you focus on one, the other suffers
We feel you. Our company specializes in handling complex, successful, legacy Rails projects which took years to develop and which reached certain level of complexity. And we’ve been there as well. It’s very rewarding to work on challenging projects but also very stressful and tiring. To break down this complexity and handle it piece by piece. Every day you and I, we need to wonder:
- How do I break it down into smaller, more manageable units?
- How do I decouple this and that?
- How do I connect together those uncoupled parts?
- How do I keep it from collapsing down?
We would like our systems to:
- be easier and faster to test
- have more loosely coupled components
- have cleaner boundaries and responsibilities
But we also understand that we must use tools and techniques which can be easily introduced into new and legacy Rails apps.
Domain-Driven Rails will help you
For a few years we’ve been studying Domain-Driven Design and applying its techniques in our projects. In Domain-Driven Rails we describe 11 techniques that you can use separately and together in new and old Rails apps to achieve better architecture. They were useful to us and we are sure they are going to be useful for you and your complex apps.
This book will teach you:
- Why classes eventually reach 50 columns and hundreds of methods - and how to avoid it
- Why it’s not enough to keep adding more horizontal layers such as service objects,form objects, serializers and instead why you should focus more on vertical boundaries
- 3 techniques for modeling objects from your domain
- Where to put the code which is not about domain logic
- 2 types of Service Objects and which one is for what
- The difference between commands and events
- How to avoid explosion of Service Objects and keep things more cohesive
- How you can make your system expendable and decoupled with domain events and handlers
- Coordinate business processes with sagas
- Making your classes smaller by extracting side-effects into handlers
- Building unobtrusive reporting
- Providing insight into temporal aspect of your domain with event sourcing
These techniques have been used for a long time in Java and .NET communities in complex, enterprise projects. But reading about them does not make it easy to figure out how to apply them in the context of Rails apps. That’s where our book comes in with help. Same techniques but explained using our language (literally and metaphorically).
Subscribe for updates
To celebrate 25th Ruby Anniversary we have a 25% discount code for you: RUBY25
Book - $49
- available in pdf, epub, mobi
- 140 pages + bonus
- Describes 10 building blocks for your Rails app that will help you handle complexity
Book + Code + Exercises - $69 (recommended)
- Code of a reference Rails application presenting the techniques
- 8 exercises to train the techniques described in the book
- All exercises includes solutions, which you can just read as bigger examples
Thanks @arkency for Domain-Driven Rails book. Long time haven’t seen a book to read without stops for several days.— Ilya Shakirov (@aelaau) August 18, 2017
Book + Code + Exercises + Community access - $99
- Access to private Slack community
- Ask us any questions about Rails architecture, DDD, the book or the exercises
- Meet and consult other developers doing DDD in Rails
- Find out how they structure their apps and solve the problems
- See which gems they use and in which way
Book + Code + Exercises + Community access + Online Videos - $199
- 7 online videos, 3 hours 50 minutes in total.
- Available on Vimeo: https://vimeo.com/ondemand/domaindrivenrails
Book + Code + Exercises + Community access + Online Videos + Online Course - $299 (best package online)
- We walk you through the book, videos and exercises step by step
- You have ongoing personal support, we will help you finish and review the exercises and explain any doubts
- If you get stuck, we help you get back on track
- You can work in your own tempo, faster or slower depending on your preferences
This book is just amazing! pic.twitter.com/1oSl6LlSP3— Dennis Hägler (@DennisHaegler) October 17, 2017
Workshop - $419 - $719
- Two day, hands-on workshop
- Includes Book + code + exercises + community access
- Find out more