On 2011-05-14 04:17, Adam D. Ruppe wrote:
I haven't used it yet, but I think you've got the right approach
with your DOM stuff.

For people who haven't read about this, I just wrote up a quick
document about it:

http://arsdnet.net/web.d/dom.html

I really rambled at points, but I wanted to cover all the bases.

I can agree with some of this but not all of it. I quite like Rails' Model-View-Controller pattern which allows the view layer to contain logic but which you should try to avoid as much as possible. I guess this fall under "PHP (Disciplined)".

I don't see anything wrong with the view layer containing simple logic, like this (written in HAML):

%ul
    - @posts.each do |post|
        %li= post.title

Or, if you prefer, you can a partial:

posts.html.haml:

%ul
    = render @posts

_post.html.haml:

%li= post.title

--
/Jacob Carlborg

Reply via email to