10m Talk on TT
10m Talk on TT
This workshop is aimed at beginners. No knowledge of Template::Toolkit is assumed. You can probably get away with little or no knowledge of Perl, but I think you'll struggle if you haven't got any knowledge of programming at all.
The Template::Toolkit is a presentation language which allows you to separate the presentation aspects from the rest of the application. In web development this normally means separating the HTML and the styling from the heavy database accessing and data manipulation.
In the first 10 minute taught section I'll go through some slides. I'll take a simple mail-merge type letter with a few placeholders for "name" and the like. Then I'll gradually add some flow control, some boolean logic and show how to embed templates within other templates.
In the 15 minute "lab" section I'll give you some exercises which illustrate the points covered. I'll provide semi-completed Perl scripts so that you can concentrate on the templating.
In the second taught session, I'll show how to use a wrapper to add a standard header and footer. I'll show some slightly more complex data structures. I show how filters can be used for encoding HTML and vmethods to sort lists or count elements.
In the final lab session I'll provide some more exercises.
That's all we'll have time for. We'll have only scratched the surface of Template::Toolkit. There is an excellent O'Reilly book, http://search.oreilly.com/?q=Template%3A%3AToolkit&x=0&y=0, and a wealth of documentation on CPAN, http://search.cpan.org/search?mode=all&query=Template%3A%3AToolkit.