Название: Trailblazer: A New Architecture For Rails
Автор: Nick Sutterer
Издательство: Leanpub
Год: 2015
Страниц: 259
Формат: True PDF, EPUB, AZW3
Размер: 22 Mb
Язык: English
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.