Andy Wardley, Canon Research Centre Europe Ltd.
Track: Perl
Date: Tuesday, July 08
Time: 1:45pm - 5:15pm
Location: Salon H
Wardley's tutorial shows how the Template Toolkit can be used to help in
the construction and ongoing maintenance of a typical web site.
He begins with a general introduction to the Template Toolkit and shows
how web content can be constructed from simple, modular template
components in order to apply a consistent user interface to each of
the pages in a site. He demonstrates various components that generate
navigation elements, including multi-level menus, a "breadcrumb trail"
showing the current page position in the site structure, and a table
of contents for each page. Wardley then goes on to show techniques for
manipulating page content, giving examples of how non-HTML sources
such as XML, POD and plain text can be transformed into HTML pages and
integrated seamlessly into the web site.
The next section concentrates on various aspect of customization. He illustrates how
different user interface styles can be applied to a site in a process
known as "skinning," and looks at localization and other techniques
for generating alternate views of the same site content.
The final section covers web application programming using the Template Toolkit,
with an emphasis on creating a clear separation of concerns between
presentation templates and application code. Wardley gives examples of how
Perl code should be written in "back-end" scripts and/or "front-end"
plugin modules and discusses the relative strengths and weaknesses of
each approach. He concludes with examples of using the Template
Toolkit in the larger context of a web application framework.