Perl Template Toolkit: Scalable Templating for the Web

Among the many different approaches to "templating" with Perl--such as Embperl, Mason, HTML::Template, and hundreds of other lesser known systems--the Template Toolkit is widely recognized as one of the most versatile. Like other templating systems, the Template Toolkit allows programmers to embed Perl code and custom macros into HTML documents in order to create customized documents on the fly. But unlike the others, the Template Toolkit is as facile at producing HTML as it is at producing XML, PDF, or any other output format. And because it has its own simple templating language, templates can be written and edited by people who don't know Perl. In short, the Template Toolkit combines the best features of its competitors, with ease-of-use and flexibility, resulting in a technology that's fast, powerful and extensible, and ideally suited to the production and maintenance of web content and other dynamic document systems.In Perl Template Toolkit you'll find detailed coverage of this increasingly popular technology. Written by core members of the technology's development team, the book guides you through the entire process of installing, configuring, using, and extending the Template Toolkit. It begins with a fast-paced but thorough tutorial on building web content with the Template Toolkit, and then walks you through generating and using data files, particularly with XML. It also provides detailed information on the Template Toolkit's modules, libraries, and tools in addition to a complete reference manual.Topics in the book include:

  • Getting started with the template toolkit
  • The Template language
  • Template directives
  • Filters
  • Plugins
  • Extending the Template Toolkit
  • Accessing databases
  • XML
  • Advanced static web page techniques
  • Dynamic web content and web applications
The only book to cover this important tool, Perl Template Toolkit is essential reading for any Perl programmer who wants to create dynamic web content that is remarkably easy to maintain. This book is your surefire guide to implementing this fast, flexible, and powerful templating system.
1100352051
Perl Template Toolkit: Scalable Templating for the Web

Among the many different approaches to "templating" with Perl--such as Embperl, Mason, HTML::Template, and hundreds of other lesser known systems--the Template Toolkit is widely recognized as one of the most versatile. Like other templating systems, the Template Toolkit allows programmers to embed Perl code and custom macros into HTML documents in order to create customized documents on the fly. But unlike the others, the Template Toolkit is as facile at producing HTML as it is at producing XML, PDF, or any other output format. And because it has its own simple templating language, templates can be written and edited by people who don't know Perl. In short, the Template Toolkit combines the best features of its competitors, with ease-of-use and flexibility, resulting in a technology that's fast, powerful and extensible, and ideally suited to the production and maintenance of web content and other dynamic document systems.In Perl Template Toolkit you'll find detailed coverage of this increasingly popular technology. Written by core members of the technology's development team, the book guides you through the entire process of installing, configuring, using, and extending the Template Toolkit. It begins with a fast-paced but thorough tutorial on building web content with the Template Toolkit, and then walks you through generating and using data files, particularly with XML. It also provides detailed information on the Template Toolkit's modules, libraries, and tools in addition to a complete reference manual.Topics in the book include:

  • Getting started with the template toolkit
  • The Template language
  • Template directives
  • Filters
  • Plugins
  • Extending the Template Toolkit
  • Accessing databases
  • XML
  • Advanced static web page techniques
  • Dynamic web content and web applications
The only book to cover this important tool, Perl Template Toolkit is essential reading for any Perl programmer who wants to create dynamic web content that is remarkably easy to maintain. This book is your surefire guide to implementing this fast, flexible, and powerful templating system.
31.99 In Stock
Perl Template Toolkit: Scalable Templating for the Web

Perl Template Toolkit: Scalable Templating for the Web

Perl Template Toolkit: Scalable Templating for the Web

Perl Template Toolkit: Scalable Templating for the Web

eBook

$31.99 

Available on Compatible NOOK devices, the free NOOK App and in My Digital Library.
WANT A NOOK?  Explore Now

Related collections and offers


Overview

Among the many different approaches to "templating" with Perl--such as Embperl, Mason, HTML::Template, and hundreds of other lesser known systems--the Template Toolkit is widely recognized as one of the most versatile. Like other templating systems, the Template Toolkit allows programmers to embed Perl code and custom macros into HTML documents in order to create customized documents on the fly. But unlike the others, the Template Toolkit is as facile at producing HTML as it is at producing XML, PDF, or any other output format. And because it has its own simple templating language, templates can be written and edited by people who don't know Perl. In short, the Template Toolkit combines the best features of its competitors, with ease-of-use and flexibility, resulting in a technology that's fast, powerful and extensible, and ideally suited to the production and maintenance of web content and other dynamic document systems.In Perl Template Toolkit you'll find detailed coverage of this increasingly popular technology. Written by core members of the technology's development team, the book guides you through the entire process of installing, configuring, using, and extending the Template Toolkit. It begins with a fast-paced but thorough tutorial on building web content with the Template Toolkit, and then walks you through generating and using data files, particularly with XML. It also provides detailed information on the Template Toolkit's modules, libraries, and tools in addition to a complete reference manual.Topics in the book include:

  • Getting started with the template toolkit
  • The Template language
  • Template directives
  • Filters
  • Plugins
  • Extending the Template Toolkit
  • Accessing databases
  • XML
  • Advanced static web page techniques
  • Dynamic web content and web applications
The only book to cover this important tool, Perl Template Toolkit is essential reading for any Perl programmer who wants to create dynamic web content that is remarkably easy to maintain. This book is your surefire guide to implementing this fast, flexible, and powerful templating system.

Product Details

ISBN-13: 9781449313234
Publisher: O'Reilly Media, Incorporated
Publication date: 12/23/2003
Sold by: Barnes & Noble
Format: eBook
Pages: 592
File size: 2 MB

About the Author

Darren Chamberlain is an active member of the Template Toolkit development team.

David Cross is the owner of Magnum Solutions Ltd., a London-based Perl Consultancy, and is also the author of the well-respected Data Munging with Perl.

Andy Wardley is the author of several CPAN modules including the Template Toolkit. He is a software researcher at the Canon Research Centre Europe and specializes in web-related technologies including dynamic content generation, web application frameworks, and the customization and localization of user interfaces and web content.

Table of Contents

Prefaceix
1.Getting Started with the Template Toolkit1
What the Template Toolkit Does1
The Templating Ecosystem4
Installing the Template Toolkit8
Documentation and Support10
Using the Template Toolkit12
The Template Toolkit Language21
Template Variables22
Template Directives28
Integrating and Extending the Template Toolkit32
2.Building a Complete Web Site Using the Template Toolkit33
Getting Started34
Template Components36
Defining Variables39
Generating Many Pages43
Adding Headers and Footers Automatically49
More Template Components51
Wrapper and Layout Templates58
Menu Components66
Defining and Using Complex Data72
Assessment79
3.The Template Language81
Template Syntax82
Template Variables95
Virtual Methods119
4.Template Directives137
Accessing Variables137
Accessing External Templates and Files140
Defining Local Template Blocks147
Loops148
Conditionals153
Filters155
Plugins156
Macros158
Template Metadata161
Exception Handling163
Flow Control170
Debugging171
Perl Blocks172
5.Filters176
Using Filters178
Standard Template Toolkit Filters178
6.Plugins195
Using Plugins195
Standard Template Toolkit Plugins196
7.Anatomy of the Template Toolkit235
Template Modules235
The Runtime Engine245
Module Interfaces251
8.Extending the Template Toolkit286
Using and Implementing Noncore Components286
Creating Filters300
Creating Plugins311
Building a New Frontend338
Changing the Language347
9.Accessing Databases356
Using the DBI Plugin356
Using Class::DBI363
Using DBIx::Table2Hash367
10.XML375
Simple XML Processing375
Creating XML Documents377
Processing RSS Files with XML.RSS380
Processing XML Documents with XML.DOM383
Processing XML Documents with XML.XPath386
Processing XML Documents with XML.LibXML388
Using Views to Transform XML Content388
11.Advanced Static Web Page Techniques393
Getting Started393
Library Templates406
Content Templates414
Navigation Components422
Structuring Page Content440
Creating a New Skin455
12.Dynamic Web Content and Web Applications466
CGI Scripts466
CGI Templates486
Apache and mod_perl491
A Complete Web Application496
AppendixConfiguration Options517
Index557
From the B&N Reads Blog

Customer Reviews