Earlier quoted context omitted.
Say that again after you have to learn a rails app with 1500 line models built "the rails way." Controller -> model breaks down when you reach a certain size. Or worse, giant controllers and models with no clear distinction.
You can go a long way with using simple Ruby objects to break up logic and separate out logic from models. If developers are writing 1500 line models and the lead developer isn't doing anything about it a adding new abstract concepts isn't going to help.
Trailblazer: A new architecture for Rails
11–20 of 53 posts
Re: Trailblazer: A new architecture for Rails
#12The documentation would benefit from some clear examples of how the new architecture provides benefits over the existing ones. The given examples are opaque and its superiority is merely asserted, with references to concepts such as "cells" which are not defined.
Re: Trailblazer: A new architecture for Rails
#13I'm intrigued, and would love to hear of anyone's experience using this, particularly in a production environment. One question: does it have performance implications, one way or another?
Re: Trailblazer: A new architecture for Rails
#14I tend to use a service object abstraction based around concerns, or "business stories". My service objects map to specific scenarios or pieces of business logic that often utilize multiple underlying Models and/or other entities (eg. third party interactions services).
It wasn't clear to me whether such a scenario is discouraged with Trailblazer, or maybe not even possible.
Re: Trailblazer: A new architecture for Rails
#15* Concept-Driven directories (ie: having your model, views, controller, etc. for everything Comment related in the same directory). Meteor still hasn't figured out what directory structure it wants (you could make up your own and things would still work), but I've seen this in several places.
* having an object for each view (I didn't like this about Meteor at first, but it's really just stripping out logic that would have been in the view and putting it somewhere else. It actually makes it a lot easier to debug layout vs. code errors by having the view be as simple as possible)
* I was going to say use of monads, but a) I'm not sure that's what the "call style" and "run style" actually are, and b) Meteor doesn't really use monads, now that I think about it
I'm sure nothing here is unique to meteor either, but it's interesting to read about stuff like this with the added perspective of another framework.
Re: Trailblazer: A new architecture for Rails
#16Huh, this is interesting. I've been getting more into Meteor[1] lately, and I see a few things here that mirror my experience there: * Concept-Driven directories (ie: having your model, views, controller, etc. for everything Comment related in the same directory). Meteor still hasn't figured out what directory structure it wants (you could make up your own and things would still work), but I've seen this in several p…
Given that, it's less likely that you'll change the code for all your models than change the view+controller+model code for a given feature.
Re: Trailblazer: A new architecture for Rails
#17Re: Trailblazer: A new architecture for Rails
#18Trailblazer looks interesting, and there are a lot of good ideas in here. One issue I have with it after reading the documentation is that the code is organized around "Concepts" and at the core of each Concept appears to be a single Model. All of the Form, Presenter, and other Operation objects live within a Model's namespace where often the @model is implicit. This works well if your business logic only applies to…
Re: Trailblazer: A new architecture for Rails
#19This "architecture" changes so much about Rails that I don't know why it's trying to build on Rails at all. If you don't like the Rails Way, just create another framework.
Yes, it replaces view rendering completely with Cells, but routing, dispatch, request serialization, activerecord, asset pipeline, rails-provided view helpers and more are all used basically as-is.