-
Notifications
You must be signed in to change notification settings - Fork 17
Real World Concerns
I love AREL API and proven ActiveRecord magic. It must be quite a pain in the arse to isolate from it. How much overhead it will take to build entity gateways instead of using AR directly?
(TBD)
In short, I believe we can develop a generic gateway for ActiveRecord as a one-time effort. It doesn't even need to cover the whole ActiveRecord API - just the parts your app actually uses.
What about REST? REST is a wonderful and time-tested organizational principle. I'd prefer not to give up on that.
It is my present belief that nothing prevents us from organizing use cases in a RESTful way most of the time. It's not the web but the idea still holds.
What about simple CRUD use cases? How much boilerplate code do I need to wrap it in this "architecture" thing?
It is the subject of this experiment.
Can standard view helpers work with this ViewModel thing? Like, form_for(@model) which clearly accepts a model which we will no longer have?
It's just a matter of implementing the required interface. In short, making an object "helper-compatible" seems to be an easy problem to solve.