Perl Template Toolkit is making its way to stores near you as we speak. Within the next two weeks it should appearing on shelves, being shipped from Amazon, etc. Congratulations to Darren, Dave, and Andy, all of whom worked their butts off to write, rewrite, read, reread, rereread ....
--Nat
I'm going to go broke buying books, you know. I suspect this one, though, will be well used and not just another dusty reference work on a bookshelf.
Now if I could only get my company to go with TT instead of Mason
Mason (Re:Yet Another Book)
bart on 2004-01-07T20:53:05
What's so bad about Mason, then?Now if I could only get my company to go with TT instead of Mason... nah, it'll never happen. Re:Mason (Re:Yet Another Book)
Ovid on 2004-01-07T21:28:55
The same thing that's wrong with Java: nothing.
Java, like any language, has strengths and weaknesses. Some projects will be avoided or accepted in accordance with these. Some projects, however, will be avoided as a matter of personal taste. The latter is the major issue I have with Mason. For me, working with Template Toolkit is fun and easy. I just don't find Mason to be as straightforward, but that's probably because I learned TT first. For specific issues:
I don't like that everything gets compiled into the HTML::Mason::Commands namespace. With multiple components for a single page, I sometimes find it confusing to figure out what's where.
One (loose) way of looking at Mason is to think of HTML driving Perl, instead of the other way around. This can make it very easy to put too much logic into the HTML instead of merely having it as a presentation layer. I've found that with TT, I naturally put my logic into the Perl and just pass data to the templates. In other words, it encourages good style.
I find that TT makes it very easy for me to embed templates in my programs when I need specific formatting for output (something I do quite a bit).
On a personal level, I like the "mini-language" in TT. It's very clean and doesn't require the Web designers to learn Perl. I also appreciate that Andy Wardley has taken the time to handle some of the encapsulation issues well enough that you can transparently switch from accessing hashref keys to calling accessors without needing to change the template code (this has saved me a fair amount of time while prototyping.
I also find TT very easy to test and profile since it's Perl driving the HTML and not the other way around.
Really, though, these are personal gripes that stem more from my comfort level than with any deep knowledge of Mason. Anyone familiar with Mason can probably turn around and give me a similar list of issues regarding TT and I would probably not refute them.
Looks like I might make it to Chapter 3 before the packages finish installing. 8)
John
ps: How's the new phone?