Apache Cocoon

Apache Cocoon

Infobox Software
name = Apache Cocoon



caption =
developer = Apache Software Foundation
latest release version = 2.2.0
latest release date = release date|2008|05|15
operating system = Cross-platform
programming language = Java
genre = web application framework
license = Apache License 2.0
website = http://cocoon.apache.org

Apache Cocoon, usually just called Cocoon, is a web application framework built around the concepts of pipeline, separation of concerns and component-based web development. The framework focuses on XML and XSLT publishing and is built using the Java programming language. The flexibility afforded by relying heavily on XML allows rapid content publishing in a variety of formats including HTML, PDF, and WML. The content management systems Apache Lenya and Daisy have been created on top of the framework. Cocoon is also commonly used as a data warehousing ETL tool or as middleware for transporting data between systems.

itemap

The sitemap is at the core of Cocoon. It's here that the web site developer configures the different Cocoon components, and defines the Client/Server interactions in what Cocoon refers to as the "Pipelines".

Components

The components within Cocoon are grouped by function.

Matchers

Matchers are used to match user requests such as URLs or cookies against wildcard or regular expression patterns. Each user request is tested against matchers in the sitemap until a match is made. It is within a matcher that the response to a particular request is specified.

Generators

Generators create a stream of data for further processing. This stream can be generated from an existing XML document or there are generators that can create XML from scratch to represent something on the server, such as a directory structure or image data.

XSP Pages

One type of generator is an XML Server Page (XSP page [http://cocoon.apache.org/1.x/xsp.html] ), an XML document containing tag-based directives that specify how to generate dynamic content at request time. Upon Cocoon processing, these directives are replaced by generated content so that the resulting, augmented XML document can be subject to further processing (typically an XSLT transformation). XSP pages are transformed into Cocoon producers, typically as Java classes, though any scripting language for which a Java-based processor exists could also be used.

Directives can be either built-in ("XSP") or user-defined processing tags, both of which are defined in "logicsheets". Tags are defined using XSLT templates that describe how the tags (represented as XML nodes) are transformed into other XML nodes or into procedural code such as Java. The tags are used to embed procedural logic, substitute expressions, retrieve information from the web server environment, and other operations.

Note that XSP is deprecated in recent releases of Cocoon.

Transformers

Transformers take a stream of data and change it in some way. The most common transformations are performed with XSLT to change one xml format into another. But there are also transformers that take other forms of data (SQL commands for example).

erializers

A serializer turns an XML event stream into a sequence of bytes (such as HTML) that can be returned to the client. There are serializers that allow you to send the data in many different formats including HTML, XHTML, PDF, RTF, SVG, WML and plain text, for example.

electors

Selectors offer the same capabilities as a switch statement. They are able to select particular elements of a request and choose the correct pipeline part to use.

Views

Views are mainly used for testing. A view is an exit point in a pipeline. You can put out the XML-Stream which is produced till this point. So you can see if the application is working right.

Readers

Publish content without parsing it (no XML processing). Used for images and such.

Actions

Actions are Java classes that execute some business logic or manage new content production.

The Pipeline

A "pipeline" is used to specify how the different Cocoon components interact with a given request to produce a response. A typical pipeline consists of a generator, followed by zero or more transformers, and finally a serializer.

See also [http://xproc.org/ XProc] models and standardization.

ee also

* Reactor pattern - the design pattern that Cocoon is based on.
* XML pipeline - XML pipelines, operations, standards and history.
* XSLT - an XML transformation language that Cocoon uses to specify transformations.

External links

* [http://cocoon.apache.org/ The Apache Cocoon Project]
* [http://cocoon.apache.org/2.1/ Cocoon 2.1 Documentation]
* [http://www.apache.org/ The Apache Software Foundation]
* [http://code.google.com/p/pycoon/ Pycoon] - A Python port of cocoon.
* [http://cocoon.zones.apache.org/demos/release/samples/ Cocoon Sample programs]


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Apache Cocoon — Cocoon Maintainer Reinhard Pötz et.al. Aktuelle Version 2.2.0 (15. Mai 2008[1]) Aktuelle Vorabversion 3.0.0 alpha 2 (7. Januar 2010[2]) …   Deutsch Wikipedia

  • Apache Cocoon — Saltar a navegación, búsqueda Cocoon Desarrollador Apache Software Foundation http://cocoon.apache.org/ Información general …   Wikipedia Español

  • Apache Cocoon — est un framework de développement web. Il s agit d un projet libre de la Fondation Apache. Cocoon met en œuvre un système de pipeline de composants pour le développement d applications Web. Le principe est de partir de documents au format XML,… …   Wikipédia en Français

  • Apache Cocoon — У этого термина существуют и другие значения, см. Апач. Apache Cocoon Тип Веб фреймворк Разработчик Apache Software Foundation Написана на Java Операционная система Кроссплатформенное программное обеспечение Последняя версия …   Википедия

  • Apache Lenya — Saltar a navegación, búsqueda Apache Lenya es un sistema de gestión de contenido (content management system en inglés, abreviado CMS) libre escrito en Java, manejando el formato de representación XML. Apache Lenya está basado en Apache Cocoon.… …   Wikipedia Español

  • Apache (Software) — Apache Webserver Entwickler: Apache Software Foundation Aktuelle Version: 2.2.11 (14. Dezember 2008) (weiterhin gepflegte Vorgängerversionen: 2.0.63 und 1.3.41) …   Deutsch Wikipedia

  • Apache (Webserver) — Apache Webserver Entwickler: Apache Software Foundation Aktuelle Version: 2.2.11 (14. Dezember 2008) (weiterhin gepflegte Vorgängerversionen: 2.0.63 und 1.3.41) …   Deutsch Wikipedia

  • Apache HTTPD — Apache Webserver Entwickler: Apache Software Foundation Aktuelle Version: 2.2.11 (14. Dezember 2008) (weiterhin gepflegte Vorgängerversionen: 2.0.63 und 1.3.41) …   Deutsch Wikipedia

  • Apache Server — Apache Webserver Entwickler: Apache Software Foundation Aktuelle Version: 2.2.11 (14. Dezember 2008) (weiterhin gepflegte Vorgängerversionen: 2.0.63 und 1.3.41) …   Deutsch Wikipedia

  • Apache WWW Server — Apache Webserver Entwickler: Apache Software Foundation Aktuelle Version: 2.2.11 (14. Dezember 2008) (weiterhin gepflegte Vorgängerversionen: 2.0.63 und 1.3.41) …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”