Trailblazer - Learn
- Last updated 23 Jul 21
On this page you can find all documents you need to learn about Trailblazer or deepen your knowledge on specific topics. We are constantly updating it and broadcast changes on our Facebook page.
As a beginner you might feel confronted with a massive stack of new technology. But, do not worry, Trailblazer is very simple to approach. We got nice step-by-step guides, books and example applications ready for you.
Our advice: read the following in the listed order.
- Chapter 2 of TRAILBLAZER. This is a good introduction to our ideas, the problems we see with the conventional MVC stack, and how we change it.
- The BUILDALIB book. It teaches you all bread-and-butter mechanics and tools you need to be developing applications with Trailblazer.
- Don’t miss to read the overview of all Trailblazer gems to understand that TRB is not one gigantic monster but a pretty modular framework.
- Once you feel comfortable browse through our API docs. After reading the BUILDALIB book, you should’ve seen a lot of specific docs already.
- If you use Reform, make sure to check out the populator docs. This is one of the most frequently used (and misunderstood) features or the form gem.
If you already know the basics of Trailblazer, you might want to jump directly to our API documentation. Here are a few links of the most popular topics.
- Wiring API Activities and operations allow for more than just a plain railway. You can have any outcomes and connections in your activity.
- Macros Operation helpers like
Contract::Validate()shipped with TRB.
- Reform The infamous form gem that allows keeping validations out of the models.
At this moment there are two ebooks available written by us. We try to keep documentation free, the BUILDALIB book is currently priced at $6.99, though. Of course, this is only to pay off the astronomical comic illustration costs.
The second book on Trailblazer, "BUILDALIB", was published June 2021. It is an up-to-date tutorial for learning all aspects of the framework. The tutorial targets beginners but is worth reading for all levels of developers.
By implementing an authentication library with "Create account" or "Forgot password" workflows, you learn everything you need to know about operations, designing application functions and the wiring API.
While working on the library the book constantly extends a test suite and heavily involves refactoring existing code.
In the second part (ETA Sept 2021) we cover implementing the frontend in Rails using Cells, Reform and endpoints.
The book from 2016 plainly called "TRAILBLAZER" put TRB on the map by discussing our new architecture for designing, implementing and testing Rails applications. It's available for free.
While the introduction and the Reform chapters are still worth a read, most of this book is terribly outdated. It focuses on Trailblazer 1.1 that has long been superseded by the 2.1 version. Read our new BUILDALIB book instead.
Find a number of external tutorials below.
Our partners at 2N wrote a 6-part tutorial about how to refactor a complex Rails application with Trailblazer. In this guide you find a lot of knowledge by an experienced team, written as an easily followable step-by-step tutorial.
Subscribe to our newsletter!
We send you news about Trailblazer's components, posts, events and rants straight to your inbox, every 2-3 months.