Building XML Portals with Cocoon M atthew Langham S&N AG
Matthew Langham, S&N AG Matthew Langham Technical Director Open Source Group –S&N AG, Paderborn Germany Co-Author: –Cocoon: Building XML Applications S&N donated Portal and authentication components to Cocoon –Main development by Carsten Ziegeler Committer and Release Manager
Matthew Langham, S&N AG Agenda Starting with Apache Cocoon Adding Authentication Opening the Portal Building a Portal Examples and Outlook
Matthew Langham, S&N AG Cocoon Apache Open Source project – Originally Started by Stefano Mazzocchi –Original goal: Redesign Apache.org XML Publishing Platform –Makes extensive use of XML and XSL Aim: To Separate Concerns (SoC) –Site Administrator, Content Deployer, Layout Deployer
Matthew Langham, S&N AG Cocoon Document generation on the server –Logical names used „ Runs in different environments –Servlet-Engine –Command Line
Matthew Langham, S&N AG Cocoon Used for various Web application scenarios –From Web sites to complete XML Portals –XML processing systems Extensible Architecture –Based on Apache Avalon –Integrates other open source projects Xalan, Xerces, FOP, Batik –Add new components written in Java
Matthew Langham, S&N AG Cocoon Architecture Sitemap –Centralized Configuration File in XML Sub-sitemaps possible –Contains set of ready-to-use components Use them to build functions Write and „drop-in“ your own –Contains collection of Pipelines (Functions)
Matthew Langham, S&N AG Cocoon Architecture Pipelines –Pipeline processes a request Request matched to pipeline with a Matcher –Contains chain of Java components Generator Transformer Serializer
Matthew Langham, S&N AG Request G T T S Sitemap Request XSL HTML XML DB
Matthew Langham, S&N AG HTML PDF Cocoon Architecture XSL Stylesheets XSL Stylesheets XML Pipeline Configuration XSL Layout generation XML Processing XML Processing Database News Provider Personal News XML SQL Login Weather Stocks
Matthew Langham, S&N AG Building XML Applications Cocoon is great.. for … –Publishing, Data source integration, multi- channel But we wanted to do more! –Build XML Applications with additional functionality While evaluating existing portal solutions –We decided that what was really needed was an integrated Cocoon XML portal
Matthew Langham, S&N AG sunShine – built on Cocoon Commercial product developed by S&N –Based on Cocoon –Additional components and project specific additions sunRise (auth) and sunSpot (portal) –Cocoon components –Completed in mid 2001 –Used in various projects (production!) –Donated to Cocoon in Feb. 2002
Matthew Langham, S&N AG Authentication (org.apache.cocoon.webapps.authentication) Mission –Authentication of Users –Protect Documents –Flexible Integration of User Databases –Support for Web Applications –Completely Designed using Cocoon- Concepts!
Matthew Langham, S&N AG Authentication (org.apache.cocoon.webapps.authentication) Solution –New Cocoon components for Common Session Handling Actions for Authentication –Everything configurable in Sitemap Flexibility through pipelines Mapping: Function Pipeline Call Documents grouped by Handlers
Matthew Langham, S&N AG Authentication (org.apache.cocoon.webapps.authentication) Authentication Framework Request Document A Document Protected ? YES Get handler User Authenticated? YES: Respond with ANO: Respond with A Redirect Document NORespond with Redirect-to Document Document Protection - Flow
Matthew Langham, S&N AG Authentication (org.apache.cocoon.webapps.authentication) Configuration –Mapping: Function Pipeline Call –Flexible Integration of data-sources –Simple Development of Management Tools
Matthew Langham, S&N AG Authentication (org.apache.cocoon.webapps.authentication)
Matthew Langham, S&N AG Authentication (org.apache.cocoon.webapps.authentication)
Matthew Langham, S&N AG Portal (org.apache.cocoon.webapps.portal) Mission –Flexible integration of User Databases –Profiles and Configuration completely defined in XML –Integration of “data-feeds” (portlets) –Portal user functionality –Multi-Channel –Completely designed using Cocoon-Concepts!
Matthew Langham, S&N AG Portal (org.apache.cocoon.webapps.portal) Solution –Use “sunRise” for User Management –New Cocoon components for Portal generation Portal configuration –Everything configurable in Sitemap Mapping Function Pipeline Call –Coplets can be A URI A Cocoon Pipeline A Java Class
Matthew Langham, S&N AG Portal (org.apache.cocoon.webapps.portal) Portal Profile in XML per User –Selected Information Blocks (coplets) –Ordering and Configuration of coplets –Selected Layout (Colors etc) Profile Hierarchy for flexible maintenance –Changes reflected on next login –Profile Caching Profiles can be stored in files, databases...
Matthew Langham, S&N AG Portal Everything is configurable –Available coplets and their features –Layout information –User rights Example features of a coplet –Minimizing / Maximizing –Hiding –Configuration
Matthew Langham, S&N AG Portal Portal Generator Get User Profile Add content of each coplet XSLT Transformer Layout Portal HTML Serializer Generate Response
Matthew Langham, S&N AG Portal Flexible Presentation –Stylesheets for multi-channel –Coplets can be channel-dependent Flexible Integration of –Authentication –Data-sources –Management Tools
Matthew Langham, S&N AG Portal
Matthew Langham, S&N AG Portal
Matthew Langham, S&N AG Portal
Matthew Langham, S&N AG Building A Portal Download the Cocoon distribution –Build from CVS Use the included example Portal as a base Choose some feeds –Standard format such as RSS helps News, Weblogs, … –Other formats via Pipeline Define the coplet pipeline –Just a regular Cocoon pipeline
Matthew Langham, S&N AG Coplet Pipelines
Matthew Langham, S&N AG Building A Portal Configure the coplets –Edit coplet definition file or use provided tools Add new coplet to profile –Edit profile definition file or use provided tools Define your Portal Layout –Just change the stylesheet –Use a Selector to have a “night” portal
Matthew Langham, S&N AG A News Portal
Matthew Langham, S&N AG Outlook Merging other Cocoon portal ideas Flexible architecture –Different pluggable Portal Managers Flexible Presentation –Not limited to tables JSR 168 support –Evaluation if and when available
Matthew Langham, S&N AG From a bank…
Matthew Langham, S&N AG …to the moon Andrew J Lewis, NASA: Cocoon 2.x is being used as the core of a new portal that is being built at NASA Kennedy Space Center. Thanks you all for making my job SOOO much easier!!!
Matthew Langham, S&N AG …and other fans Bert Van Kets, The Vision Web Belgium NV Although I'm working in a Microsoft adept environment, where people install every Microsoft Server Product available, it took only 1 little 20 minute demonstration of the S&N Cocoon Portal to convince everybody the company needs this.... the portal was up and running and ready to be filled with content in 1 day, including presentation adjustments. The underlying technology of XML, XSLT and the implemented Java components make the portal very easy to manage and adjust.
Matthew Langham, S&N AG Closing the Portal XML Portal available in Cocoon today! –Tried and trusted Used by NASA, BASF-IT Services and others –It‘s open source You don‘t like it? – help us make it better! Example portal included –Show your customers! –Change the stylesheet for more Wows! Documentation is available
Matthew Langham, S&N AG Cleaning Up The Company – me Cocoon Authentication and Portal – –CVS checkout and build –Contains documentation –Contains tools