Presenter Pattern in Rails

I took time to read more about the presenter pattern today. I came across an interesting post which included a few statements that were very compelling:

?The first advantage we gain is that we can unit test view logic easily.?
[ helps eliminate the the frailty of view testing to some degree]

?Secondly, we can move all helper methods into presenters so that we can have a more elegant way to implement these methods.?
[ this seems great because their tends to be either excessive code in helpers in many projects i see or not enough (correct) code in helpers.]

?The third and the most important advantage we gain is that now the model is free from view logic, making its intention much more clear.?
[ who wouldn't want this?]

pass it along:

  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
This entry was posted in ruby/rails. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*
Copyright 2008 brightpoint | Powered by WordPress. Built on the Thematic Theme Framework.