|Problems? Is your data what you think it is?|
Re: rant on = qw(HTML::Mason Embperl Template etc) ;by lachoy (Parson)
|on Nov 09, 2001 at 08:49 UTC||Need Help??|
This whole discussion of templating systems ranks with editors and operating systems as a matter of style. Clearly, the way Mason does things isn't for you. So it goes. It sure works for lots of other people, so its designers must be doing something right :-)
That said, you might be interested in a Java technology that does much the same thing you discuss but quite a bit cleaner. XMLC allows you to compile an XML (or HTML) document to a Java class, using items specified by 'id' tags as objects in your Java code. No intermingled Java code whatsoever.
The nifty thing about it was that more than any other solution I've seen, the web designers didn't have to know anything about what you were doing in the backend. And because the document is represented as a series of hierarchical objects, you can clone() them, query them for properties and apply those properties to other objects in the document.
For example, one of the most common display elements is a data table with alternating colors. The designer creates the table with a header row and two sample rows for mockup. You grab the colors of the two rows, axe the second row and clone the first row for as many data elements as you require. Once you're done, you can apply the colors to the rows after they've been generated, rather than while you're generating them.
In fact, one of the interesting things this does is get you out of the mindset of having to generate everything all at once in a top-to-bottom fashion as most other solutions require.
Anyway, I bring this up merely to have something else to think about and throw into the mix. As if we don't have enough solutions already :-)