# Fowler style "Two Step View" implementation

**URL:** <https://www.ruby-forum.com/t/fowler-style-two-step-view-implementation/90968>\
**Category:** Rails\
**Created:** [April 3, 2007, 1:30pm UTC](https://www.ruby-forum.com/t/fowler-style-two-step-view-implementation/90968 "2007-04-03T13:30:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![timperrett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Post date:** [April 3, 2007, 1:30pm UTC](https://www.ruby-forum.com/t/fowler-style-two-step-view-implementation/90968/1 "2007-04-03T13:30:22Z")

</div>

Hey All

I have a situation where I would like to try and build in a Fowler style  
“Two Step View” as the domain logic is always the same but the front end  
needs to be tottaly a difffert look and feel.

In fowlers terms, i know rails uses a template view out of the box,  
however is there some way I could put somthing in before it got to the  
templating so that it enabled me to use a two step pattern?

Thanks

Tim

---

<div class="post-metadata">

**Author:** ![timperrett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Post date:** [April 3, 2007, 1:50pm UTC](https://www.ruby-forum.com/t/fowler-style-two-step-view-implementation/90968/2 "2007-04-03T13:50:19Z")

</div>

Hello,

On 3 Apr 2007, at 12:30, Tim P. wrote:

> I have a situation where I would like to try and build in a Fowler  
> style  
> “Two Step View” as the domain logic is always the same but the  
> front end  
> needs to be tottaly a difffert look and feel.
> 
> In fowlers terms, i know rails uses a template view out of the box,  
> however is there some way I could put somthing in before it got to the  
> templating so that it enabled me to use a two step pattern?

This might be what you’re after:

> **[Rails: Presenter Pattern](http://blog.jayfields.com/2007/03/rails-presenter-pattern.html)**
>
> The default architecture for Ruby on Rails, Model View Controller, can begin to break down as Controllers become bloated and logic begins to...

Regards,  
Andy S.

---

<div class="post-metadata">

**Author:** ![timperrett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Post date:** [April 3, 2007, 2:28pm UTC](https://www.ruby-forum.com/t/fowler-style-two-step-view-implementation/90968/3 "2007-04-03T14:28:06Z")

</div>

> [Jay Fields' Thoughts: Rails: Presenter Pattern](http://blog.jayfields.com/2007/03/rails-presenter-pattern.html)
> 
> Regards,  
> Andy S.

hmmm, that quite possibly might work. However from what i can tell it  
does indeed abstact page logic (part one of two step) but then how could  
I select a template… I would have to think of some convention to do  
this. Perhaps some subfolder derivitive of views named per presenter  
class or somthing?

What do you think?

Tim

---

<div class="post-metadata">

**Author:** ![timperrett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Post date:** [April 3, 2007, 9:09pm UTC](https://www.ruby-forum.com/t/fowler-style-two-step-view-implementation/90968/4 "2007-04-03T21:09:57Z")

</div>

You can always render a partial who’s name is defined by a param in  
the URL or computed by the controller.

Michael

On Apr 3, 5:28 am, Tim P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![timperrett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Post date:** [April 3, 2007, 9:21pm UTC](https://www.ruby-forum.com/t/fowler-style-two-step-view-implementation/90968/5 "2007-04-03T21:21:39Z")

</div>

MichaelLatta wrote:

> You can always render a partial who’s name is defined by a param in  
> the URL or computed by the controller.

I coudl indeed do this however I was looking for somthing a little  
cleaner to be honest - somthing programatic that can be called properly  
without having to worry about locals etc etc

How does the rendering work with the rails templating? maybe its  
somthing i can adapt?

Cheers

Tim
