Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Everytime someone announces their own pet templating project we advocate our favorite set of templating solutions. However, I find myself in the situation where I have to do exactly that.

My reasoning

Basically put, I'm the one of programmers in a web team of 6. The other guy sticks to ASP on win32 and is not interested in much else. The skills of our team revolve around Dreamweaver and after much patience, SSI has finally been fully understood by everyone.

I've had a set of very good chats with my line manager and I've got support for a more dynamic site and to use a full templating solution. This will mean I'll also be spending time writing a common API to perform simple data fetch tasks.

So far so good and in a pure Perl environment I'd be using the Template Toolkit (and I have in a previous project). But with the relative skills of the team in mind, I've been thinking that I can't really expect the team to learn more than one templating language. We maintain corporate content in ASP, Java, Jython, PHP and Perl (yay) and I'm stuck for a templating solution.

Currently I use Velocity, Smarty, XML/XSLT, HTML::Template and the Template::Toolkit (my personal favorite). I also do all the hard template bits rather than programming while someone watches.

For obvious reasons I want to consolidate these (keeping XML/XSLT as a suitable second when I need it). I also want to be able to give power to the content authors without me having to write all their templates for them while they watch - I don't have the time.

My *possible* solution

Based on the above and my previous experience of porting HTML::Template to other languages, it seems a natural choice. After all, I have successfully ported it to Java and VBScript.

Thinking about it though, I find that I've got to add in a whole new set of directives for handling API calls (that I create) as well as integrating with any XML processor.

Whilst this doesn't bother me it does leave me to wonder whether I should just start from scratch and release the same templating engine in all 4-6 languages or build on HTML::Template as I have indicated.

If I did the latter, I would certainly do this in my spare time so that I could release this solution into the public domain but then we have YATS (yet another templating solution).

So what do people think? Have you been in a similar situation and how did you solve it? Do you think modification and release of an existing module (say HTML::Template::Alternate) is a reasonable thing to do?

Thanks for reading if you made it this far!

SP

In reply to OT: Templating solutions - cross language rfc by simon.proctor

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2022-08-14 02:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?