Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Model-View-Controller: Template Toolkit vs. XSLT

by simon.proctor (Vicar)
on Oct 15, 2004 at 08:34 UTC ( [id://399425]=note: print w/replies, xml ) Need Help??


in reply to Model-View-Controller: Template Toolkit vs. XSLT

Two things I think people always forget when considering XSLT are that to do XSLT well you need to know XPath and that sometimes you need to extend XSLT with your own custom functions to make life easier.

As to your novice programmers. Well if they already know Perl then picking up TT should be a snap. If they are manipulating XML then they will have to learn XML/XSLT/XPath anyway. However, I find XSLT very frustrating as outputting plain text or maintaining correct formatting in a document can be hard. Add in complex XPath and then I find myself reaching for TT or for HTML::Template.

At work, I tend to use XSLT purely in XSL-FO and create the underlying XML via TT. I rarely use XSLT out of the box unless my underlying data is in XML to begin with. So you know, XSL-FO can be used to create RTF and PDF documents (to name a few).

Of course, language neutrality is a boon for XML but there is nothing stopping you exposing whatever service you provide as a webservice or adding an additional output switch (for the command line as an example) for added interoperability.

My own personal take is that it depends. It depends on whether you are going to be processing XML most of the time, you have data in XML format or you need to interoperate between systems/applications. If your programs aren't going to do this then there probably isn't a need for XML at that time.

If you do decide to use XML/XSLT then you will need a good and fast library. For that I would recommend the LibXML and LibXSLT libraries from the Gnome project.

HTHServer Error (Error ID 6114738c2135418)

An error has occurred. The site administrators have been notified of the problem and will likely soon fix it. We thank you, for you're patients.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://399425]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-03-29 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found