Original author(s) | Howard Lewis Ship |
---|---|
Developer(s) | Apache Software Foundation |
Stable release | 5.8.3 / 16 July 2023 [1] |
Repository | Tapestry Repository |
Written in | Java |
Operating system | Cross-platform (Java Virtual Machine) |
Type | Web application framework |
License | Apache License 2.0 |
Website | tapestry |
Apache Tapestry is an open-source component-oriented Java web application framework conceptually similar to JavaServer Faces and Apache Wicket. [2] Tapestry was created by Howard Lewis Ship,[ when? ] and was adopted by the Apache Software Foundation as a top-level project in 2006. [3]
Tapestry emphasizes simplicity, ease of use, and developer productivity. It adheres to the Convention over Configuration paradigm, eliminating almost all XML configuration. [4] Tapestry uses a modular approach to web development by having a strong binding between each user interface component (object) on the web page and its corresponding Java class. This component-based architecture borrows many ideas from WebObjects. [5]
A minimal, templated Tapestry application needs only three files:
<!DOCTYPE html><htmlxmlns="http://www.w3.org/1999/xhtml"xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"><body><p>Hello,${username}</p></body></html>
packageorg.example.demo.pages;/** A page class (automatically associated with the template file of the same name) */publicclassHelloWorld{/** An ordinary getter */publicStringgetUsername(){return"World";}}
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"><web-app><display-name>TapestryExample</display-name><context-param><!-- Tell Tapestry 5 where to look for pages, components and mixins --><param-name>tapestry.app-package</param-name><param-value>org.example.demo</param-value></context-param><filter><!-- Define the Tapestry servlet filter --><filter-name>app</filter-name><filter-class>org.apache.tapestry5.TapestryFilter</filter-class></filter><filter-mapping><!-- Tell the servlet container which requests to send to the Tapestry servlet filter --><filter-name>app</filter-name><url-pattern>/*</url-pattern></filter-mapping></web-app>
Tapestry uses bytecode manipulation to transform page and component classes at runtime. This approach allows the page and component classes to be written as simple POJOs, with a few naming conventions and annotations potentially triggering substantial additional behavior at class load time. Tapestry versions 5.0, 5.1 and 5.2 used the Javassist bytecode manipulation library. Subsequent versions replaced Javassist with a new bytecode manipulation layer called Plastic that is based on ObjectWeb ASM. [11] [12]
Tapestry 5 versions up through 5.3 bundled the Prototype and script.aculo.us JavaScript frameworks, along with a Tapestry-specific library, so as to support Ajax operations as first-class citizens. Third party modules are available to integrate jQuery instead of, or in addition to, Prototype/Scriptaculous.
Starting with version 5.4, Tapestry includes a new JavaScript layer that removes built-in components' reliance on Prototype, allowing jQuery or another JavaScript framework to be plugged in. [13]
Version 5.4 also introduces support for JavaScript modules using the RequireJS module loading system.
The Tapestry project documentation cites four "principles" that govern all development decisions for Tapestry, starting with version 5 in 2008: [14]
Tapestry has been criticized as not being backward-compatible across major versions, especially noted in the transition from version 4 to version 5, where no clean migration path was available for existing applications. [15] Project team members have acknowledged this as a major problem for Tapestry's users in the past, and backward compatibility was made a major design goal for Tapestry going forward. From early on in the development of version 5, backward compatibility was listed as one of Tapestry's four new "Core Principles", and two of the other three were intended to make the evolution of the framework possible without sacrificing backward compatibility. Project team members claim that all Tapestry releases since 5.0 have been highly backward compatible.
Early criticisms of Tapestry 5 also mentioned documentation as a shortcoming. Project members now claim that this deficiency has been largely addressed with a thoroughly revised and updated User's Guide and other documentation.
Since version 5.0, Tapestry has bundled the Prototype and Scriptaculous JavaScript libraries. According to Howard Lewis Ship, in the 2008-2009 timeframe these were reasonable choices. Since then, however, Prototype's popularity has declined, and jQuery's has risen dramatically. In response, the Tapestry community developed modules that allowed jQuery to be used in addition to, or instead of, Prototype. Meanwhile, the current version of Tapestry, 5.4, removes the dependency on Prototype entirely, replacing it with a compatibility layer into which either jQuery or Prototype (or potentially any other JavaScript framework) can be plugged.
According to Howard Lewis Ship, Tapestry was initially conceived as an attempt to implement in Java some of the general concepts and approaches found in WebObjects, which was at that time written in Objective-C and closed-source. [16]
Apache Wicket was developed as a response to the complexity of early versions of Tapestry, according to Wicket originator Jonathan Locke. [17]
Facelets, the default view technology in JavaServer Faces, was reportedly inspired by early versions of Tapestry, as an attempt to fill the need for "a framework like Tapestry, backed by JavaServer Faces as the industry standard". [18] [19]
Version | Date | Description |
---|---|---|
1.0 | 2000 | Developed by Howard Lewis Ship for internal use |
2.0 | 2002-04 | First made available on SourceForge under the GNU Lesser General Public License. [20] |
3.0 | 2004-04 | The first release under Apache, as a Jakarta sub-project. [21] |
4.0 | 2006-01 | Introduced support for JDK 1.5 annotations, a new input validation subsystem, and improved error reporting [22] |
5.0 | 2008-12 | A nearly complete rewrite from Tapestry 4, introducing a new POJO-based component model emphasizing convention over configuration, and replaced Hivemind with a new no-XML Inversion of Control layer. |
5.1 | 2009-04 | Performance and memory improvements, automatic GZIP compression, JavaScript aggregation, but remained backwards compatible to Tapestry 5.0. |
5.2 | 2010-12 | Added JSR 303 Bean Validation. [23] Extended live class reloading to service implementations. Removed page pooling. [24] |
5.3 | 2011-11 | Added support for HTML5 doctype, JSR-330 annotations for injection, [25] performance and memory improvements, new components, switched from JavaAssist to ASM bytecode manipulation |
5.3.1 - 5.3.8 | 2012-2014 | Bug fixes and minor enhancements |
5.4-5.4.5 | 2015-2019 | Major client-side enhancements. New JavaScript layer for switchable jQuery/Prototype support, uses Require.js for its JavaScript module system, Twitter Bootstrap for its default styling. [26] |
5.5 | 2020-03 | Current stable version. Support for Java 12 bytecode, Typescript, and Bootstrap 4. |
Jakarta EE, formerly Java Platform, Enterprise Edition and Java 2 Platform, Enterprise Edition (J2EE), is a set of specifications, extending Java SE with specifications for enterprise features such as distributed computing and web services. Jakarta EE applications are run on reference runtimes, that can be microservices or application servers, which handle transactions, security, scalability, concurrency and management of the components they are deploying.
The Jakarta Project created and maintained open source software for the Java platform. It operated as an umbrella project under the auspices of the Apache Software Foundation, and all Jakarta products are released under the Apache License. As of December 21, 2011 the Jakarta project was retired because no subprojects were remaining.
NetBeans is an integrated development environment (IDE) for Java. NetBeans allows applications to be developed from a set of modular software components called modules. NetBeans runs on Windows, macOS, Linux and Solaris. In addition to Java development, it has extensions for other languages like PHP, C, C++, HTML5, and JavaScript. Applications based on NetBeans, including the NetBeans IDE, can be extended by third party developers.
WebObjects was a Java web application server and a server-based web application framework originally developed by NeXT Software, Inc.
Jakarta Faces, formerly Jakarta Server Faces and JavaServer Faces (JSF) is a Java specification for building component-based user interfaces for web applications and was formalized as a standard through the Java Community Process being part of the Java Platform, Enterprise Edition. It is also an MVC web framework that simplifies the construction of user interfaces (UI) for server-based applications by using reusable UI components in a page.
Apache Wicket, commonly referred to as Wicket, is a component-based web application framework for the Java programming language conceptually similar to JavaServer Faces and Tapestry. It was originally written by Jonathan Locke in April 2004. Version 1.0 was released in June 2005. It graduated into an Apache top-level project in June 2007.
Apache Velocity first released in April 2001, is a Java-based template engine that provides a template language to reference objects defined in Java code. It aims to ensure clean separation between the presentation tier and business tiers in a Web application.
TurboGears is a Python web application framework consisting of several WSGI components such as WebOb, SQLAlchemy, Kajiki template language and Repoze.
Eclipse Jetty is a Java web server and Java Servlet container. While web servers are usually associated with serving documents to people, Jetty is now often used for machine to machine communications, usually within larger software frameworks. Jetty is developed as a free and open source project as part of the Eclipse Foundation. The web server is used in products such as Apache ActiveMQ, Alfresco, Scalatra, Apache Geronimo, Apache Maven, Apache Spark, Google App Engine, Eclipse, FUSE, iDempiere, Twitter's Streaming API and Zimbra. Jetty is also the server in open source projects such as Lift, Eucalyptus, OpenNMS, Red5, Hadoop and I2P. Jetty supports the latest Java Servlet API as well as protocols HTTP/2 and WebSocket.
Apache MyFaces is an Apache Software Foundation project that creates and maintains an open-source JavaServer Faces implementation, along with several libraries of JSF components that can be deployed on the core implementation. The project is divided into several sub-projects:
The front controller software design pattern is listed in several pattern catalogs and is related to the design of web applications. It is "a controller that handles all requests for a website," which is a useful structure for web application developers to achieve flexibility and reuse without code redundancy.
Apache Sling is an open source Web framework for the Java platform designed to create content-centric applications on top of a JSR-170-compliant content repository such as Apache Jackrabbit. Apache Sling allows developers to deploy their application components as OSGi bundles or as scripts and templates in the content repository. Supported scripting languages are JSP, server-side JavaScript, Ruby, Velocity. The goal of Apache Sling is to expose content in the content repository as HTTP resources, fostering a RESTful style of application architecture.
In computing, Facelets is an open-source Web template system under the Apache license and the default view handler technology for Jakarta Server Faces. The language requires valid input XML documents to work. Facelets supports all of the JSF UI components and focuses completely on building the JSF component tree, reflecting the view for a JSF application.
Apache Click is a page and component oriented web application framework for the Java language and is built on top of the Java Servlet API.
Java view technologies and frameworks are web-based software libraries that provide the user interface, or "view-layer", of Java web applications. Such application frameworks are used for defining web pages and handling the HTTP requests (clicks) generated by those web pages. As a sub-category of web frameworks, view-layer frameworks often overlap to varying degrees with web frameworks that provide other functionality for Java web applications.
Jakarta RESTful Web Services, is a Jakarta EE API specification that provides support in creating web services according to the Representational State Transfer (REST) architectural pattern. JAX-RS uses annotations, introduced in Java SE 5, to simplify the development and deployment of web service clients and endpoints.
AngularJS is a discontinued free and open-source JavaScript-based web framework for developing single-page applications. It was maintained mainly by Google and a community of individuals and corporations. It aimed to simplify both the development and the testing of such applications by providing a framework for client-side model–view–controller (MVC) and model–view–viewmodel (MVVM) architectures, along with components commonly used in web applications and progressive web applications.
Foundation is a free responsive front-end framework, providing a responsive grid and HTML and CSS UI components, templates, and code snippets, including typography, forms, buttons, navigation and other interface elements, as well as optional functionality provided by JavaScript extensions. Foundation is an open source project, and was formerly maintained by ZURB. Since 2019, Foundation has been maintained by volunteers.