Trailblazer: A New Architecture For Rails

Trailblazer: A New Architecture For Rails

English | 2015 | 259 Pages | PDF, EPUB, AZW3 | 22 MB

Trailblazer is a thin layer on top of Rails and brings a high-level application architecture, decent encapsulation and a new code structure. Here are the main features.

  • Logicless models solely focusing on persistence.
  • Skinny controllers working as endpoints, only.
  • Domain objects for your business logic, known as operations.
  • Form objects for deserialisation and validation.
  • View models to introduce a widget architecture.
  • Representers that parse and render documents for APIs.
  • Twin objects for decorating models.

This book takes you for an adventure trip from Rails’ code jungle to Trailblazer beach. We’re building a complete Rails application using all of Trailblazer’s goodies while exploiting the Rails Way where it helps us.
What we build here is not just a simple 5-minutes blog, but a full-blown commenting application with complex forms, composed views, signed-in users and admin, authentication rules, polymorphic views and operatoins, a document-based JSON API, and more. We have a strong focus on testing, object design and structuring the code using Trailblazer’s concept-oriented framework.