in reply to Advice Choosing a Templating System
I've used Mason on a couple of fairly large projects, and love it.
It's fairly quick to get up to speed on, uses perl, with a few special html-ish tags, includes a caching api built on Cache::Cache, and has quite a number of modules that extend the core system. (such as adding Apache::Session support)
I don't know enough about other systems, at least not any recent usage, but in my mind, the fact I don't have to learn a fancy mini-language for my templates, and just write them in perl, is a big plus.
Too many templating systems seem to have been written by people wanting to design a programming language, rather than a templating system.
Re^2: Advice Choosing a Templating System
by merlyn (Sage) on Mar 02, 2005 at 02:27 UTC
|
Mason is great if the only people who will ever hack your templates are already Perl programmers.
However, the mini-language of Template Toolkit is soooo much easier to teach to non-programmers who might be hacking the HTML of your site. So says my clients that are using TT in their web apps.
So, while you might prefer the Mason approach, there are many reasons to prefer the "mini-language" approach.
| [reply] |
|
Each templating system / text pre-processor, or whatever is intended for a particular audience. You have to analyze what functionality you're going to need, and who is going to be using it.
If you can take care of 99% of your site with a CMS system that requires no technical, and leave the last 1% to someone with some programming skills, it's probably better than giving them something they can accidentally break.
For instance, back in my undergrad days, the group I worked for did a web page that called an SSI for the bulk of its content. Unfortunately, the site's 'owner' kept editing the page in a WYSIWIG editor which pulled down its content through HTTP ... I tried leaving a hint, but as they never looked at the source, they never found my not-so-subtle hint.
My advise, if you're going to be the only one using it, is to take a look at the syntax, and see if it makes sense to you. If it does, then you're probably fine -- but if the maintainer has a different mindset than you do, you might want to look at something else.
If whoever is developing content has absolutely no programming skills at all, and you're not dealing with database backends and the like, you might also take a look at Markdown.
| [reply] |
|
Your not-so-subtle hint was hilarious. :-) Thanks for sharing that. It's a shame that the guy didn't see it... and I love that it was picked up by archive.org.
| [reply] |
|
True. Although in my (limited) experience, I've found that generally, teaching the people who do design anything to do with languages, mini, or not, seems to be a crap shoot.
Either they can grasp the concept, or they can't.
If they can, mason, or template toolkit, or any other comes easy enough. They can include a header/footer, call another block of code in a loop, without having to be 'programmers', after a simple example or two.
If they cannot, it doesn't seem to matter if the template is as simple as:
<title>%%title%%</title>
they can't seem to understand that we'll put the proper value there.
| [reply] [d/l] |
|
If that's the case, then maybe Petal is the templating system to use - the templating information is secretly kept in attributes, so the designers can move around the tags to their liking, and fill it with sample data as much as they want. This might give them a more concrete grip on things.
| [reply] |
|
|