ZTemplates
Encyclopedia
ztemplates is an open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 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...

 based on the Java platform 1.5 or later. It is licensed under the Apache 2.0
Apache License
The Apache License is a copyfree free software license authored by the Apache Software Foundation . The Apache License requires preservation of the copyright notice and disclaimer....

 License.

ztemplates runs in any standard java web application container like Apache Tomcat.

ztemplates extensively uses annotations and so requires almost no configuration. It is centered around urls and allows the definition of url-variables and url-references so the programmer can extract more information from the url than is usually possible.

The active part of a ztemplates application is located in callbacks. The callbacks and the sequence in which they are called are defined by the url. The programmer can define before and after callbacks for all actions, url-variables and url-references. They are called in the order in which the corresponding url-variable and url-reference are defined in the url.

The web-page rendering is done with standard technology, like JSP
JavaServer Pages
JavaServer Pages is a Java technology that helps software developers serve dynamically generated web pages based on HTML, XML, or other document types...

, Apache Velocity or FreeMarker
FreeMarker
FreeMarker is a Java-based template engine focusing on the MVC software architecture. Although it's mostly used for Servlet-based Web Application development, it can be used for any other kind of text output, such as generating CSS, Java source code, etc. Unlike JSP, it is not dependent on the...

. ztemplates chooses the correct rendering technology and template from the annotation the programmer attaches to a plain old java object.

ztemplates integrates with maven
Maven
A maven is a trusted expert in a particular field, who seeks to pass knowledge on to others. The word maven comes from Hebrew, via Yiddish, and means one who understands, based on an accumulation of knowledge.-History:...

 and is available from the maven central repository.

ztemplates also integrates with Spring and exposes its services as spring beans.

Since 0.9.9 ztemplates comes with support for AJAX frameworks and a sample Yahoo UI (YUI) and Google Search integration. The AJAX libraries are included by dropping a jar file into the applications WEB-INF/lib directory. When using predefined components, the programmer does not need to know which JavaScript libraries are needed, the framework chooses the needed ones from annotations on the pojos used.

Since version 2.3.0 ztemplates contains a javascript component model to support AJAX programming.

The rendering part and the actions are completely independent of each other.

Features

  • JSP, Apache Velocity and FreeMarker compatible. This can be extended by implementing a simple interface.
  • Annotation based AJAX support. The required JavaScript libraries and css files are declared in annotations on pojos and automatically included by the system, thus hiding the implementation.
  • Support for selfcontained components that can be included by dropping a jar file into WEB-INF/lib.
  • state-free. ztemplates does not keep server-side state.
  • technology agnostic urls. There are no constraints on the urls by the framework.
  • invisible to the web-client. ztemplates is not visible to the web client, so it could be replaced by other technologies without breaking your application.
  • extensible through services. ztemplates extensively uses interfaces and annotations, making it possible to replace every part of ztemplates with a custom implementation.
  • security with annotations. ztemplates provides support for security by annotations.
  • Spring support is available for action pojos.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK