Chapter 1. Introduction

Table of Contents

Pages and Components
Engines, Services and the Visit

Tapestry is a component-based web application framework, written in Java. Tapestry is more than a simple templating system; Tapestry builds on the Java Servlet API to build a platform for creating dynamic, interactive web sites. More than just another templating language, Tapestry is a real framework for building complex applications from simple, reusable components. Tapestry offloads much of the error-prone work in creating web applications into the framework itself, taking over mundane tasks such as dispatching incoming requests, constructing and interpretting URLs encoded with information, handling localization and internationalization and much more besides.

The "mantra" of Tapestry is "objects, methods and properties". That is, rather than have developers concerned about the paraphanlia of the Servlet API: requests, responses, sessions, attributes, parameters, URLs and so on, Tapestry focuses the developer on objects (including Tapestry pages and components, but also including the domain objects of the application), methods on those objects, and JavaBeans properties of those objects. That is, in a Tapestry application, the actions of the user (clicking links and submitting forms) results in changes to object properties combined with the invocation of user-supplied methods (containing application logic). Tapestry takes care of the plumbing necessary to connect these user actions with the objects.

This is not to say the Servlet API is inaccessible; it is simply not relevant to a typical Tapestry user.

This document describes many of the internals of Tapestry. It is not a tutorial, that is available as a separate document. Instead, this document is a guide to some of the internals of Tapestry, and is intended for experienced developers who wish to leverage Tapestry fully.

Tapestry is currently in release 3.0, and has come a long way in the last couple of years. Tapestry's focus is still on generating dynamic HTML pages.

Nearly all of Tapestry's API is described in terms of interfaces, with default implementations supplied. By substituting new objects with the correct interfaces, the behavior of the framework can be changed significantly. This allows for changes to where Tapestry specifications and templates originate from, and how server-side state is persisted (for example).

Finally, Tapestry boasts extremely complete JavaDoc API documentation. This document exists to supplement that documentation, to fill in gaps that may not be obvious. The JavaDoc is often the best reference.