Title: Building XML Portals with Cocoon Matthew Langham S
1Building XML Portalswith CocoonMatthew
Langham SN AGmlangham_at_s-und-n.de
2Matthew Langham
- Technical Director Open Source Group
- SN AG, Paderborn Germany
- Co-Author
- Cocoon Building XML Applications
- SN donated Portal and authentication components
to Cocoon - Main development by Carsten Ziegeler
- Committer and Release Manager
3Agenda
- Starting with Apache Cocoon
- Adding Authentication
- Opening the Portal
- Building a Portal
- Examples and Outlook
4Cocoon
- Apache Open Source project
- http//xml.apache.org/cocoon
- 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
5Cocoon
- Document generation on the server
- Logical names used http//myserver/cocoon/hellowo
rld - Runs in different environments
- Servlet-Engine
- Command Line
6Cocoon
- 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
7Cocoon 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)
8Cocoon Architecture
- Pipelines
- Pipeline processes a request
- Request matched to pipeline with a Matcher
- Contains chain of Java components
- Generator
- Transformer
- Serializer
ltmapmatch patternwelcomegt ltmapgenerate
srcwelcome.xml/gt ltmaptransform
srcstylesheets/welcome-page2html.xsl/gt
ltmapserialize typehtml/gt lt/mapmatchgt
9ltmapsitemapgt ltmapcomponentsgt
ltmapgenerators/gt ltmaptransformers/gt
ltmapserializers/gt ltmapreaders/gt
ltmapselectors/gt ltmapmatchers/gt
ltmapactions/gt lt/mapcomponentsgt lt...gt
ltmappipelinesgt ltmappipeline/gt
ltmappipeline/gt lt...gt lt/mappipelinesgt lt/maps
itemapgt
S
T
T
G
10Cocoon Architecture
PDF
HTML
XSL Stylesheets
Personal News
Database
News Provider
11Building 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
12sunShine built on Cocoon
- Commercial product developed by SN
- 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
13Authentication (org.apache.cocoon.webapps.authenti
cation)
- Mission
- Authentication of Users
- Protect Documents
- Flexible Integration of User Databases
- Support for Web Applications
- Completely Designed using Cocoon-Concepts!
14Authentication (org.apache.cocoon.webapps.authenti
cation)
- 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
15Authentication (org.apache.cocoon.webapps.authenti
cation)
Document Protection - Flow
Authentication Framework
Request Document A
Document Protected ?
16Authentication (org.apache.cocoon.webapps.authenti
cation)
- Configuration
- Mapping Function ? Pipeline Call
- Flexible Integration of data-sources
- Simple Development of Management Tools
17Authentication (org.apache.cocoon.webapps.authenti
cation)
18Authentication (org.apache.cocoon.webapps.authenti
cation)
19Portal (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!
20Portal (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
21Portal (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 ...
22Portal
- Everything is configurable
- Available coplets and their features
- Layout information
- User rights
- Example features of a coplet
- Minimizing / Maximizing
- Hiding
- Configuration
23Portal
Portal Generator
Get User Profile
24Portal
- Flexible Presentation
- Stylesheets for multi-channel
- Coplets can be channel-dependent
- Flexible Integration of
- Authentication
- Data-sources
- Management Tools
25Portal
26Portal
27Portal
28Building 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
29Coplet Pipelines
ltmapmatch pattern"sunbanksunlet-onlinesundn.xml"
gt ltmapgenerate src"http//www.s-und-n.de/aktue
lles/news.xml"/gt ltmaptransform
src"sunbank/styles/sunLet_sundnNews.xsl"/gt
ltmapserialize type"xml"/gt lt/mapmatchgt ltmapmat
ch pattern"sunbanksunlet-account.xml"gt
ltmapgenerate src"sunbank/resources/auth/sunlet-a
ccount.xml"/gt ltmaptransform src"sunbank/styles
/sunlet-account.xsl"/gt ltmapserialize
type"xml"/gt lt/mapmatchgt ltmapmatch
pattern"sunbanksunlet-online-.xml"gt
ltmapgenerate src"http//p.moreover.com/cgi-local
/page?index_1xml"/gt ltmaptransform
src"sunbank/styles/sunLet_MoreoverDotCom.xsl"/gt
ltmapserialize type"xml"/gt lt/mapmatchgt
30Building 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
-
31A News Portal
32Outlook
- 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
33From a bank
34to 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!!!
35and 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 SN 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.
36Closing the Portal
- XML Portal available in Cocoon today!
- Tried and trusted
- Used by NASA, BASF-IT Services and others
- Its open source
- You dont like it? help us make it better!
- Example portal included
- Show your customers!
- Change the stylesheet for more Wows!
- Documentation is available
37Cleaning Up
- The Company
- http//www.s-und-n.de
- Email me
- mlangham_at_s-und-n.de
- Cocoon Authentication and Portal
- http//xml.apache.org/cocoon
- CVS checkout and build
- Contains documentation
- Contains tools
38Q A