Tapestry (programming)
Encyclopedia
Apache Tapestry is an open-source component-oriented Java
web application framework
to implement applications in accordance with the model-view-controller
architectural pattern
. Tapestry was created by Howard Lewis Ship independently, and was adopted by the Apache Software Foundation
as a top-level project. Tapestry emphasizes simplicity, ease of use, and developer productivity. Tapestry adheres to the Convention over Configuration
paradigm, eliminating almost all XML configuration. Tapestry uses a modular approach to web development, by having strong binding
between user interface
components (objects) on the web page and their corresponding Java
classes. This component-based architecture borrows many ideas from WebObjects
.
Component templates in Tapestry are XHTML
files, with an additional XML namespace for Tapestry-specific elements. Component templates act as the view; a corresponding Java class acts as the controller and model. Tapestry includes a large number of built-in components, but also encourages developers to create their own, application-specific components.
Page and component class are Plain Old Java Object
s; annotations and naming conventions are used to tie together the framework with user-created components (earlier versions of the framework used XML files to tie things together).
Tapestry embraces a technique called "live class reloading"; the running application picks up changes to classes and templates immediately, without a restart. This greatly enhances developer productivity.
The tight integration between the template and Java class, and the use of annotations and naming conventions, keeps Tapestry applications concise and readable.
Tapestry bundles the Prototype
and script.aculo.us
Javascript frameworks, along with a Tapestry-specific library, so as to support Ajax operations as first-class citizens.
Tapestry 5.1 improves performance and reduces memory consumption and adds other performance related features such as automatic GZIP compression and JavaScript library aggregation, but is still backwards compatible to Tapestry 5.
Tapestry 5.2 integrates the JSR 303 (Bean Validation)
specification into its validation mechanism.. It also extends live class reloading to service implementations (Tapestry 5.0 and 5.1 would only reload page and component classes) and removes the need for page pooling.
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
web application framework
Web application framework
A web application framework is a software framework that is designed to support the development of dynamic websites, web applications and web services. The framework aims to alleviate the overhead associated with common activities performed in Web development...
to implement applications in accordance with the model-view-controller
Model-view-controller
Model–view–controller is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" from the user interface , permitting independent development, testing and maintenance of each .Model View Controller...
architectural pattern
Architectural pattern (computer science)
An architectural pattern in software is a standard design in the field of software architecture. The concept of a software architectural pattern has a broader scope than the concept of a software design pattern...
. Tapestry was created by Howard Lewis Ship independently, and was adopted by the Apache Software Foundation
Apache Software Foundation
The Apache Software Foundation is a non-profit corporation to support Apache software projects, including the Apache HTTP Server. The ASF was formed from the Apache Group and incorporated in Delaware, U.S., in June 1999.The Apache Software Foundation is a decentralized community of developers...
as a top-level project. Tapestry emphasizes simplicity, ease of use, and developer productivity. Tapestry adheres to the Convention over Configuration
Convention over Configuration
Convention over configuration is a software design paradigm which seeks to decrease the number of decisions that developers need to make, gaining simplicity, but not necessarily losing flexibility....
paradigm, eliminating almost all XML configuration. Tapestry uses a modular approach to web development, by having strong binding
UI data binding
UI data binding is a software design pattern to simplify development of GUI applications. UI data binding binds UI elements to an application domain model. Most frameworks employ the Observer pattern as the underlying binding mechanism...
between user interface
User interface
The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...
components (objects) on the web page and their corresponding Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
classes. This component-based architecture borrows many ideas from WebObjects
WebObjects
WebObjects was a Java web application server from Apple Inc., and a web application framework that ran on the server. It was available at no additional cost. Its hallmark features were its object-orientation, database connectivity, and prototyping tools...
.
Component templates in Tapestry are XHTML
XHTML
XHTML is a family of XML markup languages that mirror or extend versions of the widely-used Hypertext Markup Language , the language in which web pages are written....
files, with an additional XML namespace for Tapestry-specific elements. Component templates act as the view; a corresponding Java class acts as the controller and model. Tapestry includes a large number of built-in components, but also encourages developers to create their own, application-specific components.
Page and component class are Plain Old Java Object
Plain Old Java Object
In computing software, POJO is an acronym for Plain Old Java Object. The name is used to emphasize that a given object is an ordinary Java Object, not a special object...
s; annotations and naming conventions are used to tie together the framework with user-created components (earlier versions of the framework used XML files to tie things together).
Tapestry embraces a technique called "live class reloading"; the running application picks up changes to classes and templates immediately, without a restart. This greatly enhances developer productivity.
The tight integration between the template and Java class, and the use of annotations and naming conventions, keeps Tapestry applications concise and readable.
Tapestry bundles the Prototype
Prototype Javascript Framework
The Prototype JavaScript Framework is a JavaScript framework created by Sam Stephenson in February 2005 as part of the foundation for Ajax support in Ruby on Rails. It is implemented as a single file of JavaScript code, usually named prototype.js...
and script.aculo.us
Script.aculo.us
script.aculo.us is a JavaScript library built on the Prototype JavaScript Framework, providing dynamic visual effects and user interface elements via the Document Object Model ....
Javascript frameworks, along with a Tapestry-specific library, so as to support Ajax operations as first-class citizens.
Tapestry 5.1 improves performance and reduces memory consumption and adds other performance related features such as automatic GZIP compression and JavaScript library aggregation, but is still backwards compatible to Tapestry 5.
Tapestry 5.2 integrates the JSR 303 (Bean Validation)
Bean Validation
Java Bean Validation is a framework that has been approved by the JCP as of 16 November 2009 and is accepted as part of the Java EE 6 specification. Bean Validation defines a metadata model and API for JavaBean validation. The metadata source is annotations, with the ability to override and extend...
specification into its validation mechanism.. It also extends live class reloading to service implementations (Tapestry 5.0 and 5.1 would only reload page and component classes) and removes the need for page pooling.
See also
- Model-view-controllerModel-view-controllerModel–view–controller is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" from the user interface , permitting independent development, testing and maintenance of each .Model View Controller...
- Jakarta ProjectJakarta ProjectThe Jakarta Project creates and maintains open source software for the Java platform. It operates as an umbrella project under the auspices of the Apache Software Foundation, and all of Jakarta products are released under the Apache License.-Subprojects:...
- Java EEJava Platform, Enterprise EditionJava Platform, Enterprise Edition or Java EE is widely used platform for server programming in the Java programming language. The Java platform differs from the Java Standard Edition Platform in that it adds libraries which provide functionality to deploy fault-tolerant, distributed, multi-tier...
- Comparison of web application frameworksComparison of web application frameworksThis is a comparison of notable web application frameworks.-Perl:-PHP:-Java:-Python:-Ruby:-CFML :-ASP.NET:-Other:-ASP.NET:-C++:-CFML:-Python:-Java:-PHP:-Ruby:-Others:...
- FaceletsFaceletsIn computing, Facelets is an open source Web template system under the Apache license and the default view handler technology for JavaServer Faces . The language requires valid input XML documents to work...
- Java: View Technologies and FrameworksJava: View Technologies and FrameworksVarious Java Web application frameworks have appeared in recent years. Some of them are in direct competition, while others are complementary technologies. It is therefore necessary to understand where exactly each technology/framework fits into the J2EE scheme of things. This page lists the View...