DISQUS

DISQUS Hello!  The comments on this profile are unclaimed and thus are unverified.

Do they belong to you? Claim these comments.

Steve Molitor's picture

Unregistered

Feeds

aliases

  • Steve Molitor
  • Walter Robbins

Steve Molitor

1 year ago

in Dan Manges's Blog - Smart Model, Dumb Controller on Dan Manges's Blog
Greg,

I think the pattern you're describing is service layer:

http://martinfowler.com/eaaCatalog/serviceLayer...

In Spring the service layer sits between the controllers and the models. The relevance guys have written a plugin to implement a service layer in Rails:

http://blog.thinkrelevance.com/2008/1/18/announ....

I used to be religious about having a service layer in Java but I don't find the need for it as much in Rails. But YMMV.

The other solution for 'fat' models of course is to have the model delegate to smaller helper objects that do not extend AR::Base. I do this all the time. I agree it's important to stress to newbies that you can have classes in your model layer that do not extend AR::Base, and 'controller' layer classes like view presenters that do not extend AV::Controller. It's easy to create a new 'presenters' directory and add that to the load path for example.

Steve Molitor

1 year ago

in Should Sun focus more on Java-Ruby or Java-Groovy integration on /var/log/mind
"For the record, I never said anything bad about Ruby...."

"Then if I still had some money, I would donate it charity and leave Ruby out in the cold like the match stick girl."

Wow! Rick you're coming across as being really weird, pyschocotic almost. Why the hatred for Ruby? It's just another language dude! Get counseling or something.
Returning? Login