Ruby on Rails Tuesday, June 29, 2010

Doug Jolley wrote:
>> Your site shouldn't be doing your
>> consumers' layout work.

> I don't think that it is.

Do you have a reason for this opinion, or are you just handwaving?

>  What I'm trying to do is to come up with a
> mechanism that will allow the consumers to do their own layout work.

>> �Instead, it sshould provide data that your
>> consumers can lay out as they please.

> That is clearly the preferred approach.  However, it is also the most
> labor intensive.

No.  It is just as labor-intensive for your consumers to provide a
layout for you as it is for them to do the layout themselves. There's
really no advantage for them, and there's a disadvantage for you. 

>  I see the external layout approach as a lower
> quality alternative that might be acceptable in some circumstances.
> One of its big advantages is that (but for problematic issue of
> reading the layout from the contents of a variable) it is extremely
> easy to implement.  I just wish that there were some sort of easy work
> around other than taking the brute force tact

"tack" -- "tact" is a different word. 

> of writing the data to a
> temp file and then reading it from there.

There is.  Stop thinking in terms of layouts and use Philip's
approach...

...except that the whole thing is completely infeasible.  How would the
layout be provided?  It won't fit in a GET query string, and you can't
supply POST data in a link, so the only way to supply it would be as an
uploaded file.  And at that point, you can just go back to Rails' layout
mechanism. 


> Thanks for the input.

>            ... doug


-- 
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org

Sent from my iPhone
--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment