On 06/12/10 16:57, Trevor Parscal wrote:
I personally think XSL is awesome, and would defend it with vigor.
I love XSL too. Probably the easiest way to render an XML data file.
Another approach could be inspired by ruby on rails way. You define a general application layout using HTML with special directives such as:
<html> <body> <%= yield %> </body></html>
"yield" is where the current view should be inserted. This mean a graphist / skinner, just have to know about HTML/CSS :-b
To create your view, you use rhtml (ruby html) which is plain HTML in which you can insert ruby code using <% %> or <%= %> :
<html><table> <% @articles.each do |article| %> <tr> <td><%= article.title %></td> <td><%= link_to 'Show', article</td> <td><%= link_to 'Edit', edit_path( article )</td> </tr> </table></html>
It does make thing easier, since the whole backend is hidden. Its role is just to provide the correct variables (in the above case 'article' which is an array of articles objects).
I think Symfony, now a day a popular PHP framework, use this system as well.
[1] http://www.symfony-project.org/