The Apache Cocoon Project - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

The Apache Cocoon Project

Description:

Mix and match java components in a pipeline. interacts with many data sources, ... Workflow events such as publishing or deactivating a page can be scheduled. ... – PowerPoint PPT presentation

Number of Views:86
Avg rating:3.0/5.0
Slides: 16
Provided by: pet89
Category:

less

Transcript and Presenter's Notes

Title: The Apache Cocoon Project


1
(No Transcript)
2
The Apache Cocoon Project
  • The Apache Cocoon Project is the open source
    community project developing Apache Cocoon and
    Cocoon-based application frameworks.
  • The Apache Cocoon project currently consists of
    Apache Cocoon itself and the Lenya CMS

3
What Is Cocoon
  • Web development framework built around the
    concepts of separation of concerns and
    component-based web development.
  • Mix and match java components in a pipeline
  • interacts with many data sources, including
    filesystems, RDBMS, LDAP, native XML databases,
    SAP systems and network-based data sources.
  • It adapts content delivery to the capabilities of
    different devices like HTML, WML, PDF, SVG, and
    RTF, to name just a few

4
Separation of content, style, logic and
management functions
5
Data Mapping
6
Basic Mechanisms
7
Pipeline Example XML to html
  • ltmappipelinegt
  • ltmapmatch pattern"lodges/."gt
  • ltmapgenerate src"lodges/1.xml"/gt
  • ltmaptransform src"styles/Lxml2htm.xslt"/gt
  • ltmapserialize type"xhtml"/gt
  • lt/mapmatchgt
  • lt/mappipelinegt
  • http//www.wl-dev.co.uk/lodges/7990.xml
    http//www.wl-dev.co.uk/lodges/7990.htm
    http//www.wl-dev.co.uk/lodges/7990.html

8
Pipeline Example XML to PDF
  • ltmapmatch pattern"lodges/.pdf"gt
  • ltmapgenerate src"lodges/1.xml"/gt
  • ltmaptransform src"styles/2fo.xsl"/gt
  • ltmapserialize type"fo2pdf"/gt
  • lt/mapmatchgt
  • ltmapmatch pattern/.jpg"gt
  • ltmapread mime-type"images/jpg
    src1/2.jpg"/gt
  • lt/mapmatchgt

9
Search Engine ExampleBuild Index
  • Uses Apache Lucene - high-performance,
    full-featured text search engine library written
    entirely in Java
  • ltmapmatch pattern"buildIndex"gt
  • ltmapgenerate src"lucene/doc-files.xsp"
    type"serverpages"/gt
  • ltmaptransform src"lucene/stylesheets/files2con
    tent.xsl"/gt
  • ltmaptransform type"cinclude"/gt
  • ltmaptransform src"lucene/stylesheets/content2l
    ucene.xsl"/gt
  • ltmaptransform type"index"/gt
  • ltmaptransform src"lucene/stylesheets/lucene2ht
    ml.xsl"/gt
  • ltmapserialize/gt
  • lt/mapmatchgt

10
Search Engine ExampleSearch Index
  • ltmapmatch pattern"search.htm"gt
  • ltmapgenerate type"search"gt
  • ltmapparameter name"index" value"index2"/gt
  • lt/mapgenerategt
  • ltmaptransform type"log"/gt
  • ltmaptransform src"lucene/seachxml2htm.xsl"/gt
  • ltmapserialize/gt
  • lt/mapmatchgt

11
  • Java
  • Error handling
  • Control Flow
  • continuations
  • CForms (XForms)
  • Cache
  • Internationalization
  • Sendmail Action
  • database read write to
  • relational database
  • Native XML databases

12
  • function main()
  • var random Math.round( Math.random() 9 )
    1
  • var hint "No hint for you!"
  • var guesses 0
  • while (true)
  • cocoon.sendPageAndWait("guess.jxt", "random"
    random, "hint" hint,
  • "guesses" guesses )
  • var guess parseInt( cocoon.request.get("g
    uess") )
  • guesses
  • if (guess)
  • if (guess gt random)
  • hint "Nope, lower!"
  • else if (guess lt random)
  • hint "Nope, higher!"
  • else
  • break

13
Lenya CMS
  • Cocoon Based
  • Open Source Java/XML Content Management System
  • WYSIWYG editors, BXE and Kupu
  • Workflow
  • Internationalization
  • revision control
  • site management
  • Scheduling
  • Search, Lucene

14
Links
  • http//cocoon.apache.org/2.1/
  • http//lucene.apache.org/
  • http//lenya.apache.org/

15
  • Authoring
  • Browser-based WYSIWYG Editors - Relax NG
    Schema.
  • Pages that are being edited are automatically
    locked for other users
  • Each edit of a page creates a new revision. It is
    possible to revert to any previous revision of a
    page.
  • Workflow
  • A customizable workflow engine that uses an easy
    XML format to define workflows. Standard one- and
    two-stage workflows are included. Users can be
    notified by email about pending approvals.
  • Workflow events such as publishing or
    deactivating a page can be scheduled.
  • Supports separate authoring, staging and live
    areas. For convenience, the staging area is
    disabled by default.
  • All workflow steps are logged, providing an audit
    trail.
  • Internationalization
  • Pages can be created in multiple languages with
    no impact on your site structure. Lenya
    automatically displays your page in the default
    languge if it is not available in a specific
    language.
  • The user interface is currently localized in
    spanish, italian, french, german, english, dutch
    and japanese.
  • Layout
  • The publications concept allows reuse of the
    information architecture of a site and brings
    modularity to the content level. Different
    publications can share content and business
    logic, and new publications can be created with a
    cloning process.
  • Supports XHTMLCSS templating, eliminating the
    need to learn yet another templating language.
    Wherever possible, uses CSS for styling,
    therefore enforcing the separation of content and
    layout.
  • The navigation framework automatically creates
    navigation items such as menus, breadcrumb paths
    and tabs. A sitemap can be easily created.
  • Produces clean URLs without request parameters
    and is thus optimally accessible for search
    engines.
  • There are no restrictions on the nesting of
    templates. You can use any template you have
    defined at any level of your site structure
    thanks to the URI parametrizer.
  • Site Management
Write a Comment
User Comments (0)
About PowerShow.com