Fowler style "Two Step View" implementation


#1

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


#2

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:

Regards,
Andy S.


#3

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


#4

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


#5

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