8 Matching Annotations
- Mar 2021
-
trailblazer.to trailblazer.to
-
Run the complete unit with a certain input set, and test the side-effects. This differs to the Rails Way™ testing style, where smaller units of code, such as a specific validation or a callback, are tested in complete isolation. While that might look tempting and clean, it will create a test environment that is not identical to what happens in production.
-
-
trailblazer.to trailblazer.to
-
Instead of one big code pile, activities will gently enforce a clean, standardized way for organizing code.
-
the Activity component is the heart of TRB
-
- Feb 2021
-
trailblazer.to trailblazer.to
-
In other words: the controllers usually contain only routing and rendering code and dispatch instantly to a particular operation/activity class.
-
-
github.com github.com
-
Instead of dealing with a mix of before_filters, Rack-middlewares, controller code and callbacks, an endpoint is just another activity and allows to be customized with the well-established Trailblazer mechanics.
-
-
trailblazer.to trailblazer.to
-
Endpoint is the missing link between your routing (Rails, Hanami, …) and the “operation” to be called. It provides standard behavior for all cases 404, 401, 403, etc and lets you hook in your own logic like Devise or Tyrant authentication, again, using TRB activity mechanics.
-
-
github.com github.com
-
In Trailblazer, models are completely empty. They solely contain associations and finders. No business logic is allowed in models.
-
While Trailblazer offers you abstraction layers for all aspects of Ruby On Rails, it does not missionize you. Wherever you want, you may fall back to the "Rails Way" with fat models, monolithic controllers, global helpers, etc. This is not a bad thing, but allows you to step-wise introduce Trailblazer's encapsulation in your app without having to rewrite it.
Tags
- the Trailblazer way
- newer/better ways of doing things
- allowing developer/user to pick and choose which pieces to use (allowing use with competing libraries; not being too opinionated; not forcing recommended way on you)
- focus on what it should do, not on how it should do it (implementation details; software design)
- models: should be thin, dealing with persistence/associations only, not business logic
- freedom of user to override specific decision of an authority/vendor (software)
- focus on concepts/design/structure instead of specific/concrete technology/implementation
- abstractions
- Trailblazer
- rails: the Rails way
- making changes / switching/migrating gradually/incrementally/step-wise/iteratively
- leaving the details of implementation/integration up to you
Annotators
URL
-