SiteMesh
Encyclopedia
SiteMesh is a Java web application
Web application
A web application is an application that is accessed over a network such as the Internet or an intranet. The term may also mean a computer software application that is coded in a browser-supported language and reliant on a common web browser to render the application executable.Web applications are...

 development framework developed by OpenSymphony
OpenSymphony
OpenSymphony was an Open Source computer software project dedicated to providing enterprise class Java EE components. OpenSymphony shut down sometime around 2009-2010, but some of the subprojects are now maintained elsewhere...

.

According to OpenSymphony, SiteMesh:
  • Is a web-page layout and decoration framework and web application integration framework to aid in creating large sites consisting of many pages for which a consistent look/feel, navigation and layout scheme is required
  • Intercepts requests to any static or dynamically generated HTML
    HTML
    HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

     page requested through the web server, parses the page, obtains properties and data from content, and generates appropriate final page with modifications to original—based on Decorator design pattern
    Decorator pattern
    In object-oriented programming, the decorator pattern is a design pattern that allows behaviour to be added to an existing object dynamically.-Introduction:...

  • Can also include entire HTML
    HTML
    HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

     pages as a Panel within another page—similar to Server Side Includes
    Server Side Includes
    Server Side Includes is a simple interpreted server-side scripting language used almost exclusively for the Web.The most frequent use of SSI is to include the contents of one or more files into a web page on a web server...

    , except HTML document modified to create a visual window (using document's Meta-data as aid) within a page. Using this feature, Portal type web sites can be built very quickly and effectively. This is based upon the well-known Composite design pattern
    Composite pattern
    In software engineering, the composite pattern is a partitioning design pattern. The composite pattern describes that a group of objects are to be treated in the same way as a single instance of an object. The intent of a composite is to "compose" objects into tree structures to represent...

    .
  • Built on Java 2 with Servlet, 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...

     and XML
    XML
    Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

     technologies. This makes it good for use with Java EE applications, however it can be integrated with non-Java server-side web architectures, like CGI
    Common Gateway Interface
    The Common Gateway Interface is a standard method for web servers software to delegate the generation of web pages to executable files...

     (Perl
    Perl
    Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular...

    /Python
    Python (programming language)
    Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

    /C
    C (programming language)
    C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

    /C++
    C++
    C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

    /etc), PHP
    PHP
    PHP is a general-purpose server-side scripting language originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document...

    , and ColdFusion
    ColdFusion
    In computing, ColdFusion is the name of a commercial rapid application development platform invented by Jeremy and JJ Allaire in 1995. ColdFusion was originally designed to make it easier to connect simple HTML pages to a database, by version 2 it had...

    .
  • Very extensible, designed for easy extension for custom needs

License

SiteMesh uses the OpenSymphony Software License which is modified from, and fully compatible with the Apache Software License.

How it works

SiteMesh uses a Servlet Filter that intercepts the HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 being returned to the web browser, extracting the relevant content and merging it into a template known as the decorator.

History

SiteMesh was originally developed in 1999 by Joe Walnes. At the time it used Servlet Chains, a feature not part of the standard Servlet specification but supported by some Servlet containers such as Orion Application Server
Orion Application Server
Orion Application Server is a Java EE application server developed by Swedish company IronFlare AB, founded by Magnus Stenman and Karl Avedal. First released in 1999, Orion claims to be the first commercially available application server with full Java EE support...

.

In 2000, the first public review of version 2.3 of the Servlet Specification was released, which contained the addition of Servlet Filters. These provided a standardized alternatives to Servlet Chains and SiteMesh was adapted to make use of these instead.

Shortly after this, the decision was made to release SiteMesh as open source software. Joe Walnes and Mike Cannon-Brookes formed the OpenSymphony
OpenSymphony
OpenSymphony was an Open Source computer software project dedicated to providing enterprise class Java EE components. OpenSymphony shut down sometime around 2009-2010, but some of the subprojects are now maintained elsewhere...

 project to provide a source of Java EE components - the first two consisting of SiteMesh and OSCache
OSCache
OSCache is "a Java framework" developed by OpenSymphony that makes it easy to cache content in Web applications.According to OpenSymphony, OSCache...

.

At this time, SiteMesh had a very small set of users, many of whom got involved in the development of the project. Not long after SiteMesh was originally open sourced, Victor Salaman rewrote the internal HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 parser to produce a 1200% performance increase.

External links

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