News for hackers. Stuff that matters.
Re:Crazy, Heretical, and Awesome: The Way I Write Rails Apps by pilif on Tuesday August 02, 2011 @11:43AM (#2837516)
At first, people wanted to get away from Java with their FactoryFactoryFactoryCreationFactories. So they went to rails where everything was simpler.

Back then, every controller method had a URL.

This was fine, but had some corner cases where it wasn't. So they moved to explicit urls.

Everything was fine, but controllers got bloated. So stuff was moved into models and controllers became restful.

Now there's too much stuff in the models and we are back where we started and write blog posts about this cool new invention: The Factory.

I'm not saying this is bad. I'm not saying the people were wrong at any stage in this development. I'm just saying that as projects grow and people work to prevent old cold-smells from reappearing, to learn from earlier mistakes they slowly move to where they left off.

Until the abstractions get too complicated, the perceived bloat gets too bad. Then we'll see a new frameowrk and/or language grow, going through the same iterations.

Just wait.

I'm not complaining. I'm not flaming, I'm just thinking loudly.

Re:Crazy, Heretical, and Awesome: The Way I Write Rails Apps by jvoorhis on Tuesday August 02, 2011 @01:43PM (#2837978)
This isn't exactly the factory pattern. It reminds me more of the service classes in Eric Evans' Domain Driven Design. It seems the author is addressing the problem of adding too many side effects to the models themselves.
Re:Crazy, Heretical, and Awesome: The Way I Write Rails Apps by bkudria on Tuesday August 02, 2011 @04:52PM (#2838660)
Is it possible to design a language that circumvents these concerns?