# Presenters out of vogue?

**URL:** <https://www.ruby-forum.com/t/presenters-out-of-vogue/164191>\
**Category:** Rails\
**Created:** [March 29, 2009, 7:58pm UTC](https://www.ruby-forum.com/t/presenters-out-of-vogue/164191 "2009-03-29T19:58:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bill\_walton](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f07891/32.png) [@bill\_walton](https://www.ruby-forum.com/u/bill_walton)\
**Post date:** [March 29, 2009, 7:58pm UTC](https://www.ruby-forum.com/t/presenters-out-of-vogue/164191/1 "2009-03-29T19:58:37Z")

</div>

My controllers have gotten unwieldy. The situation looks well-suited to  
the use of the MVP pattern but the latest links Google is giving me are  
from '07. Looks like there was some pretty good discussion that just  
fell off a cliff. Has someone come up with a better solution?

A little background on my situation in case it helps and you’re still  
reading 😉

What was initially envisioned as a fairly typical Rails application with  
a heavy dose of RJS has grown into a soon-to-be RESTful (or soon will  
be) Rails web service that talks to two Ajax clients, one a single-page  
and the other a multipage app, and two self-spawned HTTP clients. Each  
of the clients is pretty-well constrained in terms of the resources /  
methods it needs.

I’m thinking of moving the Ajax clients to using an MVP pattern and  
keeping the HTTP clients on the standard Rails MVC pattern. My thought  
is that if each client is restricted to one ‘channel’ (HTML | JS | XML)  
then I’ll not only get better structure / testability on the code  
serving the Ajax clients, from a security perspective, I can lock down  
resources by URL, HTTP verb, and protocol.

Any thoughts / discussion is much appreciated.

Best regards,  
Bill

---

<div class="post-metadata">

**Author:** ![bill\_walton](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f07891/32.png) [@bill\_walton](https://www.ruby-forum.com/u/bill_walton)\
**Post date:** [March 30, 2009, 3:59am UTC](https://www.ruby-forum.com/t/presenters-out-of-vogue/164191/2 "2009-03-30T03:59:20Z")

</div>

bill walton wrote:

> Any thoughts / discussion is much appreciated.

The original concept of controllers in MVC was that they handled  
terminal events like mouse and keystrokes. The elaboration of MVC into  
MVP moved that responsibility into another layer between views and  
controllers called a presenter. One could argue that what one really  
has with Rails 2.x is MVP, with the browser acting as the presenter,  
rather than MVC.

---

<div class="post-metadata">

**Author:** ![bill\_walton](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f07891/32.png) [@bill\_walton](https://www.ruby-forum.com/u/bill_walton)\
**Post date:** [March 31, 2009, 2:34am UTC](https://www.ruby-forum.com/t/presenters-out-of-vogue/164191/3 "2009-03-31T02:34:04Z")

</div>

Hi James,

Thanks much for the reply!

On Mon, 2009-03-30 at 03:59 +0200, James B. wrote:

> bill walton wrote:
> 
> > Any thoughts / discussion is much appreciated.
> 
> The original concept of controllers in MVC was that they handled  
> terminal events like mouse and keystrokes. The elaboration of MVC into  
> MVP moved that responsibility into another layer between views and  
> controllers called a presenter.

Interesting. My understanding / impression is that the presenter sits  
between a controller and a set of models.

> One could argue that what one really  
> has with Rails 2.x is MVP, with the browser acting as the presenter,  
> rather than MVC.

Don’t think I understand this perspective. Say more, plz. My  
understanding is that one ‘purpose’ of the Presenter pattern is to  
restore the ‘silo-like’ source code organization that MVC brings to the  
table. With MVC, if I need to modify the customer info section of an  
app, I know I’ll be looking at customers\_controller.rb, .rhtml files in  
the views/customers folder, and the customer.rb file in the models  
folder.

Best regards,  
Bill
