in reply to Re: XSLT vs Templating?
in thread XSLT vs Templating?

This is also something I'm interested in - I've been talking to various people about this recently.

Aside from the technical merits of the TT2 / XSLT approaches, there's another important issue: What skills do you have available for the project?

My previous place of work is a typical multimedia design agency. The technical staff mostly fall into one of two categories: back-end or front-end developer. The back-end developers (like me) worked with tools like Perl, Apache, Unix, SQL databases and XML feeds. The front-end developers worked with tools like Photoshop, HTML, limited JavaScript and Flash. I was talking to one of the front-end developers the other week, and he mentioned that most of them much prefer the old HTML::Template systems I developed to the XSLT systems they're working with now. They prefer the basic syntax of HTML::Template to the more functional approach of XSLT, and they'd probably also prefer it to TT2 because of its HTML-like syntax. HTML::Template's simplicity can cause problems with more complex projects, though, so TT2 is often more appropriate, as well as being more widely used. I've heard other front-end developers mention that they like Cold Fusion for similar reasons, although CF is a back-end developer's worst nightmare...

At my current workplace, we're using an XML/XSLT system for the rapid development of a number of similar sites. Several of our group have learnt XSLT, and I get the impression that although they've found it awkward, they like it once they're used to it. People have different skills: most developers do bits of both front-end and back-end development. Designs come from an external group, as does research and development into new tools. XSLT seems to fit well with people who are neither expert graphic designers nor software developers, but have a broad range of Web skills.

Also, I think it's important to focus on the distinction between different uses of XML - documents and data - that Matts makes.

In my previous job, we were using XML for newsfeeds, i.e. data. I stored the XML feeds in a SQL database, and used some Perl to interrogate the database and pass information to HTML::Template documents. Everyone involed found this clean and quick to develop, and easy to understand. If you're working with simple data, the procedural style of Perl-based templating systems is ideal; you don't need the complexity of XSLT's callouts.

My current job is basically about delivering documents via the Web for distance learning. Using XML and XSLT for this is ideal. Given the different types of information that can appear at any point in a document, developing TT2 or HTML::Template templates would be almost impossible. XSLT gives us the flexibility to process complex documents with the same template for numerous sites, with a stylistic skin that ensures each site has its own look and feel.

I've not read Michael Kay's book, but I get the impression from others that it's best-suited for more technically minded people. I've been reading O'Reilly's XSLT (Mastering XSL Transformations) and found it easy going, but too brief to fully explain some topics. I've found myself using parts of resources linked from W3C's XSLT site as well as Google for learning XSLT, which isn't ideal.