SlideShare a Scribd company logo
Cocoon Blocks Daniel Fagerström [email_address]
Motivation Cocoon is great but … Monolithic Huge download Complicated configuration Steep threshold Few third party applications and components ” Classloading hell”
Blocks A plugin architecture is needed Designed by Stefano and the rest of the community 3+ years ago Compile time blocks for a few years, but no external contracts Much work and discussion, but less progress until the last half year Essentially back compatible, a new integration level: package and reuse applications
Overview The big picture Architecture Examples Current state and next steps
What is a block? A packaged application (or part) containing: Libraries and resources Components Sitemap functionality Configurable at deploy time Might depend on other blocks Isolated internals
What is a Block? Classes,resources Components Sitemap Export packages Import packages Registered services Used services
Deployment architecture Cocoon platform Blocks Blocks repository (Maven 2) Blocks discovery Deployment service
Block Architecture Built upon OSGi (same as Eclipse 3+) A block is an OSGi bundle Class loader isolation Packaging format Services Security Hot deployment possible
OSGi
OSGi Standardized, component oriented, computing environment for networked services Since 1998 100+ members R4 10+ implementations Smart phones, home automation, BMW 5, Eclipse
OSGi Overview Secure execution environment Bundles (applications) Life cycle management Service architecture Standard services
Bundles Applications JAR containing Compiled code Resources JARs that the code depend on Meta information – manifest.mf
Class sharing Import-Package DynamicImport-Package Export-Package Bundle-Classpath
Activator OSGi Framework Activator BundleCtx Activator BundleCtx
Life cycle
Manifest.mf Manifest-Version: 1.0 Bundle-Name: cocoon_servlet Bundle-Version: 1.0.0 Bundle-Description: Cocoon servlet bundle Bundle-Vendor: Apache Bundle-DocURL: http://cocoon.apache.org Bundle-ContactAddress: http://cocoon.apache.org Bundle-Activator: org.apache.cocoon.service.servlet.impl.Activator Bundle-Category: servlet Import-Package: javax.servlet,javax.servlet.http, org.apache.cocoon.servlet, org.osgi.framework,org.osgi.service.http, org.osgi.service.log,org.osgi.util.tracker
Blocks
Block structure myblock/ META-INF/ MANIFEST.MF # bundle manifest BLOCK-INF/ block.xml # block configuration myblock.xconf # exported components classes/ lib/ src/ sitemap.xmap # block sitemap resources/ ...
Block configuration <block xmlns=&quot;http://apache.org/cocoon/blocks/cob/1.0&quot; id=&quot;http://cocoon.apache.org/blocks/blog-123&quot;> <name>blog</name> <sitemap src=&quot;sitemap.xmap&quot;/> <components> <include src=&quot;blog.xconf&quot;/> </components> <properties> <property name=“cmsURL&quot;> <default>http://mycms.com/test</default> </property> </properties> <requirements> <requires interface=&quot;http://cocoon.apache.org/blocks/editor/1.0&quot; name=“editor&quot;/> </requirements> </block>
Wiring blog editor: myeditor myblog super: cmsURL: http://mycms.com/... Uses Extends mountPath: /blog/danielf/
wiring.xml <wiring xmlns=&quot;http://apache.org/cocoon/blocks/wiring/1.0&quot;> <block id=&quot;blog-123&quot; location=&quot;file:/blocks/blog-1.4.jar&quot;> <connections> <connection name=&quot;editor&quot; block=&quot;editor-234&quot;/> </connections> <properties> <property name=&quot;cmsURL“ value=&quot;http://mycms.com/danielf/&quot;/> </properties> </block> <block id=&quot;editor-234&quot; location=&quot;file:/blocks/editor-1.4.jar&quot;/> <block id=&quot;myblog-345&quot; location=&quot;file:/blocks/myblog/&quot;> <mount path=&quot;/blog/danielf/&quot;/> <connections> <connection name=&quot;super&quot; block=&quot;blog-123&quot;/> </connections> </block> </wiring>
Components in blocks Components only available from the own block and connected blocks
Component bridge Cocoon component manager Cocoon component manager OSGi service
Sitemaps in blocks As usual Adds Call sitemaps in connected blocks Use block deploy time attributes Extend blocks (with polymorphism)
Block architecture Blocks /editor / wiring.xml settings Http Service Cocoon Servlet Webapp
Block protocol block:/foo.xml –  root sitemap in current block block:./bar.xml –  current sitemap in current block block:editor:/foo.xml –  root sitemap in editor block block:super:/foo.xml –  root sitemap in extended block
Block properties, paths {block-property:cmsURL} - Block property in sitemap (input module) {cmsURL} - Block property in component configuration {block-path:myblog:/start} --> /blog/danielf/start - “Absolutizes” block protocol URIs to mounted URIs, used in link transformer
Sitemap polymorphism blog myblog Extends “ skin.xsl” “ skin.xsl”     read “skin.xsl” Empty
Sitemap polymorphism blog myblog Extends “ skin.xsl” “ skin.xsl”     read “skin.xsl” Override “ skin.xsl”     read “myskin.xsl”
Sitemap polymorphism blog myblog Extends “ start.xml” “ skin.xsl”     read “skin.xsl” “ *.xml”     generate “{1}”   transform   “block:/skin.xsl”   serialize “ skin.xsl”     read “myskin.xsl”
Scenario Download blog block Deploy with parameters (or use default) Test Create empty extension (Maven archetype) Test Override some default or example rule Test …
Summary Blocks gives us: Binary application packages Classes & resources Components Sitemap functionality Parameterizable applications Reusability by extension Dependency handling between applications
Current state Cocoon runs under OSGi Sitemap blocks works Component bridge implemented Above parts are not yet integrated Maven 2 build on its way
Next steps 2.2 Binary distribution of all blocks in M2 repository Blocks architecture in experimental version, without OSGi 3.0 OSGi based class loader isolation partial hot plugablillity

More Related Content

What's hot (16)

PDF
Installation of LAMP Server with Ubuntu 14.10 Server Edition
Sammy Fung
 
TXT
Readme
Kineteco Inc.
 
PDF
톰캣 #09-쓰레드
GyuSeok Lee
 
PDF
Tlf2012
Dru Lavigne
 
ODP
An MXM-based Application for Sharing Protected Content
Alpen-Adria-Universität
 
PDF
Instalar MySQL CentOS
Moisés Elías Araya
 
PDF
Nycbsdcon14
Dru Lavigne
 
PPTX
บทที่3
Waritsara Sonchan
 
DOCX
ESXi PXE Server-Instructions/Documentation
Jeremy Dixon
 
ODP
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
aaroncouch
 
PPTX
Activemq installation and master slave setup using shared broker data
Ramakrishna Narkedamilli
 
KEY
Router と WebSocket
Kensaku Komatsu
 
PPTX
บทที่ 3 การเขียนโปรแกรมติดต่อฐานข้อมูล
Priew Chakrit
 
PPTX
Getting modular with OSGI
Andrii Krokhmalnyi
 
PDF
Manage Windows Like Linux via SSH using Ansible
Ompragash Viswanathan
 
Installation of LAMP Server with Ubuntu 14.10 Server Edition
Sammy Fung
 
톰캣 #09-쓰레드
GyuSeok Lee
 
Tlf2012
Dru Lavigne
 
An MXM-based Application for Sharing Protected Content
Alpen-Adria-Universität
 
Instalar MySQL CentOS
Moisés Elías Araya
 
Nycbsdcon14
Dru Lavigne
 
บทที่3
Waritsara Sonchan
 
ESXi PXE Server-Instructions/Documentation
Jeremy Dixon
 
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
aaroncouch
 
Activemq installation and master slave setup using shared broker data
Ramakrishna Narkedamilli
 
Router と WebSocket
Kensaku Komatsu
 
บทที่ 3 การเขียนโปรแกรมติดต่อฐานข้อมูล
Priew Chakrit
 
Getting modular with OSGI
Andrii Krokhmalnyi
 
Manage Windows Like Linux via SSH using Ansible
Ompragash Viswanathan
 

Viewers also liked (7)

PDF
Introduction tococoon2 (1)
Duong Duong
 
PPT
Greek Art and Architecture
Dhmoon1
 
PPT
Presentation G4
cesare
 
PDF
Introducing Mindquarry
Lars Trieloff
 
PPT
Cocoon Blocks CocoonGT2006
Daniel Fagerstrom
 
PDF
Cocoon Projects - Liquid Organizations: anti-fragility beyond design
Cocoon Pro
 
PDF
Cocoon Presents: How pitches affect the bottom line
Cocoon Group Branding
 
Introduction tococoon2 (1)
Duong Duong
 
Greek Art and Architecture
Dhmoon1
 
Presentation G4
cesare
 
Introducing Mindquarry
Lars Trieloff
 
Cocoon Blocks CocoonGT2006
Daniel Fagerstrom
 
Cocoon Projects - Liquid Organizations: anti-fragility beyond design
Cocoon Pro
 
Cocoon Presents: How pitches affect the bottom line
Cocoon Group Branding
 
Ad

Similar to Cocoon Blocks ApacheCon US 2005 (20)

KEY
OSGi in 5 minutes
Serge Huber
 
ODP
Frankenstein's IDE: NetBeans and OSGi
Toni Epple
 
PDF
Fuse technology-2015
Charles Moulliard
 
PPT
Osgi Webinar
WSO2
 
PDF
Kamailio World 2018 - Workshop: kamailio-tests
Giacomo Vacca
 
PPTX
Introduction to OSGGi
Marek Koniew
 
PPT
OSGi Enablement For Apache Tuscany
Raymond Feng
 
PPTX
Introduction to OSGi
pradeepfn
 
PPT
HTTP Session Replication with Oracle Coherence, GlassFish, WebLogic
Oracle
 
PPT
IJTC ServiceMix 4
Guillaume Nodet
 
PPT
Os gi introduction made by Ly MInh Phuong-SOC team
Thuy_Dang
 
PDF
SCSS Styleguide
Karthikeyan Rajendran
 
PDF
OSGi bootcamp - part 1
Jan Willem Janssen
 
PDF
Modular Architectures using Micro Services
Marcel Offermans
 
ODP
EXPath: the packaging system and the webapp framework
Florent Georges
 
PDF
AtoZ about TYPO3 v8 CMS
NITSAN Technologies Pvt Ltd
 
PPTX
Modular Java
Martin Toshev
 
PDF
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Gaetano Giunta
 
PPT
ServiceMix 4 -- Integrating OSGi with JBI
Gert Vanthienen
 
PPT
20100707 e z_rmll_gig_v1
Gilles Guirand
 
OSGi in 5 minutes
Serge Huber
 
Frankenstein's IDE: NetBeans and OSGi
Toni Epple
 
Fuse technology-2015
Charles Moulliard
 
Osgi Webinar
WSO2
 
Kamailio World 2018 - Workshop: kamailio-tests
Giacomo Vacca
 
Introduction to OSGGi
Marek Koniew
 
OSGi Enablement For Apache Tuscany
Raymond Feng
 
Introduction to OSGi
pradeepfn
 
HTTP Session Replication with Oracle Coherence, GlassFish, WebLogic
Oracle
 
IJTC ServiceMix 4
Guillaume Nodet
 
Os gi introduction made by Ly MInh Phuong-SOC team
Thuy_Dang
 
SCSS Styleguide
Karthikeyan Rajendran
 
OSGi bootcamp - part 1
Jan Willem Janssen
 
Modular Architectures using Micro Services
Marcel Offermans
 
EXPath: the packaging system and the webapp framework
Florent Georges
 
AtoZ about TYPO3 v8 CMS
NITSAN Technologies Pvt Ltd
 
Modular Java
Martin Toshev
 
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Gaetano Giunta
 
ServiceMix 4 -- Integrating OSGi with JBI
Gert Vanthienen
 
20100707 e z_rmll_gig_v1
Gilles Guirand
 
Ad

More from Daniel Fagerstrom (6)

ODP
Agile BI/DW - Aalborg 2009
Daniel Fagerstrom
 
PPT
Agile Bi Dw
Daniel Fagerstrom
 
PDF
SSVM07 Spatio-Temporal Scale-Spaces
Daniel Fagerstrom
 
PPT
Galilean Differential Geometry Of Moving Images
Daniel Fagerstrom
 
PPT
Temporal Scale-Spaces ScSp03
Daniel Fagerstrom
 
PPT
Cocoon OSGi CocoonGT2007
Daniel Fagerstrom
 
Agile BI/DW - Aalborg 2009
Daniel Fagerstrom
 
Agile Bi Dw
Daniel Fagerstrom
 
SSVM07 Spatio-Temporal Scale-Spaces
Daniel Fagerstrom
 
Galilean Differential Geometry Of Moving Images
Daniel Fagerstrom
 
Temporal Scale-Spaces ScSp03
Daniel Fagerstrom
 
Cocoon OSGi CocoonGT2007
Daniel Fagerstrom
 

Recently uploaded (20)

PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Français Patch Tuesday - Juillet
Ivanti
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PDF
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Français Patch Tuesday - Juillet
Ivanti
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 

Cocoon Blocks ApacheCon US 2005

  • 1. Cocoon Blocks Daniel Fagerström [email_address]
  • 2. Motivation Cocoon is great but … Monolithic Huge download Complicated configuration Steep threshold Few third party applications and components ” Classloading hell”
  • 3. Blocks A plugin architecture is needed Designed by Stefano and the rest of the community 3+ years ago Compile time blocks for a few years, but no external contracts Much work and discussion, but less progress until the last half year Essentially back compatible, a new integration level: package and reuse applications
  • 4. Overview The big picture Architecture Examples Current state and next steps
  • 5. What is a block? A packaged application (or part) containing: Libraries and resources Components Sitemap functionality Configurable at deploy time Might depend on other blocks Isolated internals
  • 6. What is a Block? Classes,resources Components Sitemap Export packages Import packages Registered services Used services
  • 7. Deployment architecture Cocoon platform Blocks Blocks repository (Maven 2) Blocks discovery Deployment service
  • 8. Block Architecture Built upon OSGi (same as Eclipse 3+) A block is an OSGi bundle Class loader isolation Packaging format Services Security Hot deployment possible
  • 10. OSGi Standardized, component oriented, computing environment for networked services Since 1998 100+ members R4 10+ implementations Smart phones, home automation, BMW 5, Eclipse
  • 11. OSGi Overview Secure execution environment Bundles (applications) Life cycle management Service architecture Standard services
  • 12. Bundles Applications JAR containing Compiled code Resources JARs that the code depend on Meta information – manifest.mf
  • 13. Class sharing Import-Package DynamicImport-Package Export-Package Bundle-Classpath
  • 14. Activator OSGi Framework Activator BundleCtx Activator BundleCtx
  • 16. Manifest.mf Manifest-Version: 1.0 Bundle-Name: cocoon_servlet Bundle-Version: 1.0.0 Bundle-Description: Cocoon servlet bundle Bundle-Vendor: Apache Bundle-DocURL: http://cocoon.apache.org Bundle-ContactAddress: http://cocoon.apache.org Bundle-Activator: org.apache.cocoon.service.servlet.impl.Activator Bundle-Category: servlet Import-Package: javax.servlet,javax.servlet.http, org.apache.cocoon.servlet, org.osgi.framework,org.osgi.service.http, org.osgi.service.log,org.osgi.util.tracker
  • 18. Block structure myblock/ META-INF/ MANIFEST.MF # bundle manifest BLOCK-INF/ block.xml # block configuration myblock.xconf # exported components classes/ lib/ src/ sitemap.xmap # block sitemap resources/ ...
  • 19. Block configuration <block xmlns=&quot;http://apache.org/cocoon/blocks/cob/1.0&quot; id=&quot;http://cocoon.apache.org/blocks/blog-123&quot;> <name>blog</name> <sitemap src=&quot;sitemap.xmap&quot;/> <components> <include src=&quot;blog.xconf&quot;/> </components> <properties> <property name=“cmsURL&quot;> <default>http://mycms.com/test</default> </property> </properties> <requirements> <requires interface=&quot;http://cocoon.apache.org/blocks/editor/1.0&quot; name=“editor&quot;/> </requirements> </block>
  • 20. Wiring blog editor: myeditor myblog super: cmsURL: http://mycms.com/... Uses Extends mountPath: /blog/danielf/
  • 21. wiring.xml <wiring xmlns=&quot;http://apache.org/cocoon/blocks/wiring/1.0&quot;> <block id=&quot;blog-123&quot; location=&quot;file:/blocks/blog-1.4.jar&quot;> <connections> <connection name=&quot;editor&quot; block=&quot;editor-234&quot;/> </connections> <properties> <property name=&quot;cmsURL“ value=&quot;http://mycms.com/danielf/&quot;/> </properties> </block> <block id=&quot;editor-234&quot; location=&quot;file:/blocks/editor-1.4.jar&quot;/> <block id=&quot;myblog-345&quot; location=&quot;file:/blocks/myblog/&quot;> <mount path=&quot;/blog/danielf/&quot;/> <connections> <connection name=&quot;super&quot; block=&quot;blog-123&quot;/> </connections> </block> </wiring>
  • 22. Components in blocks Components only available from the own block and connected blocks
  • 23. Component bridge Cocoon component manager Cocoon component manager OSGi service
  • 24. Sitemaps in blocks As usual Adds Call sitemaps in connected blocks Use block deploy time attributes Extend blocks (with polymorphism)
  • 25. Block architecture Blocks /editor / wiring.xml settings Http Service Cocoon Servlet Webapp
  • 26. Block protocol block:/foo.xml – root sitemap in current block block:./bar.xml – current sitemap in current block block:editor:/foo.xml – root sitemap in editor block block:super:/foo.xml – root sitemap in extended block
  • 27. Block properties, paths {block-property:cmsURL} - Block property in sitemap (input module) {cmsURL} - Block property in component configuration {block-path:myblog:/start} --> /blog/danielf/start - “Absolutizes” block protocol URIs to mounted URIs, used in link transformer
  • 28. Sitemap polymorphism blog myblog Extends “ skin.xsl” “ skin.xsl”  read “skin.xsl” Empty
  • 29. Sitemap polymorphism blog myblog Extends “ skin.xsl” “ skin.xsl”  read “skin.xsl” Override “ skin.xsl”  read “myskin.xsl”
  • 30. Sitemap polymorphism blog myblog Extends “ start.xml” “ skin.xsl”  read “skin.xsl” “ *.xml”  generate “{1}” transform “block:/skin.xsl” serialize “ skin.xsl”  read “myskin.xsl”
  • 31. Scenario Download blog block Deploy with parameters (or use default) Test Create empty extension (Maven archetype) Test Override some default or example rule Test …
  • 32. Summary Blocks gives us: Binary application packages Classes & resources Components Sitemap functionality Parameterizable applications Reusability by extension Dependency handling between applications
  • 33. Current state Cocoon runs under OSGi Sitemap blocks works Component bridge implemented Above parts are not yet integrated Maven 2 build on its way
  • 34. Next steps 2.2 Binary distribution of all blocks in M2 repository Blocks architecture in experimental version, without OSGi 3.0 OSGi based class loader isolation partial hot plugablillity