Trailblazer - Learn

  • Last updated 01 Feb 22

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.

Screencasts

Want a quick and easy introduction to Trailblazer? Regardless of your expertise level our screencast series TRAILBLAZER TALES is for you! In a series of 6 minute episodes we’re refactoring a messy Rails controller to a Trailblazer operation.

As of now, early 2022, we’re still adding episodes that discuss basic TRB mechanics and concepts. Future episodes will discuss further refactorings, new features in Trailblazer or answer questions from users.

Coming up are

  • Dry-validation, Reform
  • Cells
  • nesting operations
  • variable mapping
  • dependency injection

Do you want to have a particular topic discussed? Hit us up!

Quick start

We offer short, concise guides for developers who love more code and less words.

  1. Operation basics
  2. Trailblazer basic
  3. Rails basics implements a quick CRUD Rails app for publishing blog posts. This guide assumes you know basics of Operation and macros. → Do some CRUD!

Beginner

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.

  1. 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.
  2. The BUILDALIB book. It teaches you all bread-and-butter mechanics and tools you need to be developing applications with Trailblazer.
  3. 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.
  4. Once you feel comfortable browse through our API docs. After reading the BUILDALIB book, you should’ve seen a lot of specific docs already.
  5. 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.

Expert

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 Rescue() or Contract::Validate() shipped with TRB.
  • Reform The infamous form gem that allows keeping validations out of the models.

Books

At this moment there are two free ebooks available written by us. We try to keep documentation free, however, feel free to chip in to pay off the astronomical comic illustration costs for our artist.

BUILDALIB

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.

GET THE BOOK!

In the second part (ETA early 2022) we cover implementing the frontend in Rails using Cells, Reform and endpoints.

TRAILBLAZER

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.

Tutorials

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.