SlideShare a Scribd company logo
1 of 20
Download to read offline
Portals in OpenCms
Building JSF and portlet applications in openCms

                               Presented by: Dipl.-Ing. Helmut Manck
                                        OpenCms conference 2012
                                                 25. September 2012

                                                   (c) 2012 eonas GmbH
Agenda


What are Portals good for?
 • Scenarios, Market Players
 • Common Architectural Issues

Portals in OpenCms
 • How to build a portal

JSF and Portlets
 • How to build a portlet




                                 (c) 2012 eonas GmbH
Scenario: Company Intranet
Typically a mix of content and web applications




                                                        Navigation



                                              Content

             Content
                                              Process



                                                    (c) 2012 eonas GmbH
Architectural approaches


•       Method I: Don't use a CMS = All programmatic
    •   Editors hand over articles to programmers
    •   Programmers integrate, test and release
    •   Good for Programmers, Bad for Editors
•       Method II: Separate CMS and Applications
    •   Two independent parts: one CMS-driven, one programmatic driven.
    •   Clean and sweet until navigation and deep links are an issue.




                                                               (c) 2012 eonas GmbH
Architectural approaches


•       Method III: Develop within CMS
    •   Each piece of code is a formatter, JSP-fragment, Template or similar
    •   Development within (Open)CMS
    •   Pro: Single location of code
    •   Con: IDE support, independent testing, technological freedom
    •   Or you use Portals...




                                                                   (c) 2012 eonas GmbH
Method IV: Portals



                                     Navigation


                       Content


                       Portlet
             Portlet
             Content
                       Portlet

                                 (c) 2012 eonas GmbH
Portal Issues


               POST /cms/test      HTTP/1.1
               Host: server

               select=7

•    There are 3 Portlets on the Page. Who handles this POST-Request?




• Portals must provide:
    • Name spacing
    • Link Generation
    • (with in HTML-Space and the generated URLs)



                                                             (c) 2012 eonas GmbH
Java Portlets: JSR-286


•   Portlets are like Servlets
      • own J2EE-Webapp (.war)

      • own data source, jars, configuration, version

      • plus a portlet.xml

•   Portlets extend GenericPortlet
      • “render”: Deliver HTML-Snippet

      • “action”: Process POST

      • “resource”: Deliver CSS, JS, Ajax




                                                        (c) 2012 eonas GmbH
Portlet example




                  - The Portlet plus some logic classes

                  - Some JSPs to render the HTML-Snipplets



                  - J2EE-Configuration plus Portlet-Config


                  - Build recipe based on maven
                  - Additional Libs

                  - Can be developed, tested, debugged locally
                    with full IDE support (e.g. hot code replace)

                                                (c) 2012 eonas GmbH
Example: Request Flow


1. A HTML-Snippet generates a POST-URL:
   <p:actionURL var="target" name="choosemode"/>
   <form name="form" action="${target}“ method="post">


2. Form-Submit triggers URL, then redirect to

   processAction(request, response)
3. New HTML-Snipplet is rendered.
   render(request,response)




                                                (c) 2012 eonas GmbH
Market View




  redhat




              (c) 2012 eonas GmbH
OpenCms as Portal Server




                                            Pluto Portal
         OpenCms 7/8                 (Reference implementation
                                             for JSR286)




                       OpenCms Portal    Portal Driver
                       - Maven Overlay    (glue logic)




                                                         (c) 2012 eonas GmbH
Anatomy of the Portal




                        - Storage location of the base wars




                        - context.xml: the portal needs enhanced
                        privileges




                        - web.xml must be heavily modified, spring
                        support is required by pluto, add some filters
                        - the driver ( = glue logic ) is referenced here

                        - Maven overlays the base wars, builds the
                        final war, Pluto requires a certain Spring
                        version.
                                                         (c) 2012 eonas GmbH
Using the Portlet Support


1. Create an opencmsportal.war
     • Usual Setup-Process necessary

     • Portlet support enabled, but no templates, formatters or
       document types contained.

2. Create an OpenCms Module
     • Define Look & Feel, CSS etc.

3. The selected portlet is rendered using API-Calls within the
   formatter (usually)

     PortletTag tag = new PortletTag();
     tag.setPortletId(id);
     tag.setPageContext(copy);
     tag.doStartTag();




                                                                  (c) 2012 eonas GmbH
Creating the Portlet Module



OpenCms 8 Module




- Rest of the Module not affected


- Formatter for a Portlet


- Document Type Definition for a Portlet



- Maven Pom to build the Module


                                           (c) 2012 eonas GmbH
JSF and Rich Client Widgets


•       Several JSF Libraries provide nice, easy to use widgets
    •   Primefaces, Richfaces, ICEfaces
    •   Lots of widgets, mostly easy to use
    •   Ajax support “built in”, Partial updates, Push-Support
    •   E.g. Primefaces Datatable
•       JSF is gaining traction
    •   Application development gets much faster
    •   Applications get a “rich client” look & feel
•       How to integrate into a portlet?




                                                                  (c) 2012 eonas GmbH
JSR 301 and JSR329


•       JSR301 and JSR329:
    •   Transparent bridge between JSF and Portals
    •   A JSF Application can be made Portlet just by adding a few Jars and
        some configuration (portlet.xml)
•       Portal vendors are pushing this technology
    •   RedHat (Jboss)
    •   Liferay
•       The Liferay-JSF-Bridge can be used with OpenCms/Pluto!




                                                                  (c) 2012 eonas GmbH
Component Overview

                     Tomcat 6


                                    OpenCms         Pluto with
      HTTP GET                       Portal        Portal Driver


                                                    dispatch()
                                                    - Render or Action

                                    Portlet B
                      JSF Bridge    Webapp
                                   Primefaces


                                     Portlet A
                                     Webapp
                                   Plain Portlet


                                                     (c) 2012 eonas GmbH
Real world example


Example: A simple voting portlet
 • Backend: Spring/Hibernate/AOP
 • Frontend: Primefaces




                                   (c) 2012 eonas GmbH
Fragen?




          Dipl. Ing. Helmut Manck
          Geschäftsführer

          eonas IT-Beratung und Entwicklung GmbH
          Pascalstr. 10A
          10587 Berlin
          Germany

          helmut.manck@eonas.de
          Telefon +49-30-3980 522 – 10
                                         (c) 2012 eonas GmbH
                                                               20

More Related Content

What's hot

Share point 2010 administration & development
Share point 2010 administration & developmentShare point 2010 administration & development
Share point 2010 administration & development
MJ Ferdous
 

What's hot (15)

HTML5 vs Flash : Term paper at VGSOM, IIT Kharagpur
HTML5 vs Flash : Term paper at VGSOM, IIT KharagpurHTML5 vs Flash : Term paper at VGSOM, IIT Kharagpur
HTML5 vs Flash : Term paper at VGSOM, IIT Kharagpur
 
Are You Ready for an Alternative in Application Development?
Are You Ready for an Alternative in Application Development?Are You Ready for an Alternative in Application Development?
Are You Ready for an Alternative in Application Development?
 
Whats new in alfresco community 3.4
Whats new in alfresco community 3.4Whats new in alfresco community 3.4
Whats new in alfresco community 3.4
 
Check
CheckCheck
Check
 
Simile Exhibit @ VGSom : A tutorial
Simile Exhibit @ VGSom : A tutorialSimile Exhibit @ VGSom : A tutorial
Simile Exhibit @ VGSom : A tutorial
 
Html5
Html5Html5
Html5
 
Putting *Sparkle* in Your Social Applications! Customization and Branding wit...
Putting *Sparkle* in Your Social Applications! Customization and Branding wit...Putting *Sparkle* in Your Social Applications! Customization and Branding wit...
Putting *Sparkle* in Your Social Applications! Customization and Branding wit...
 
IBM Connections 4.5 CR2 Installation - From Zero To Social Hero - 2.02 - with...
IBM Connections 4.5 CR2 Installation - From Zero To Social Hero - 2.02 - with...IBM Connections 4.5 CR2 Installation - From Zero To Social Hero - 2.02 - with...
IBM Connections 4.5 CR2 Installation - From Zero To Social Hero - 2.02 - with...
 
SharePoint 2010 Upgrade Chalk Talk with Joel Oleson and Muhanad Omar - Teched...
SharePoint 2010 Upgrade Chalk Talk with Joel Oleson and Muhanad Omar - Teched...SharePoint 2010 Upgrade Chalk Talk with Joel Oleson and Muhanad Omar - Teched...
SharePoint 2010 Upgrade Chalk Talk with Joel Oleson and Muhanad Omar - Teched...
 
Customer FX Technical Reference Sheet
Customer FX Technical Reference SheetCustomer FX Technical Reference Sheet
Customer FX Technical Reference Sheet
 
IBM WebSphere Portal
IBM WebSphere PortalIBM WebSphere Portal
IBM WebSphere Portal
 
Share point 2010 administration & development
Share point 2010 administration & developmentShare point 2010 administration & development
Share point 2010 administration & development
 
Installing community surveys in connections 5.5
Installing community surveys in connections 5.5Installing community surveys in connections 5.5
Installing community surveys in connections 5.5
 
HTML5
HTML5HTML5
HTML5
 
WebSphere Portal Business Overview
WebSphere Portal Business OverviewWebSphere Portal Business Overview
WebSphere Portal Business Overview
 

Viewers also liked

Viewers also liked (7)

OpenCms Days 2015 Creating Apps for the OpenCms 10 workplace
OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace
OpenCms Days 2015 Creating Apps for the OpenCms 10 workplace
 
OpenCms Days 2015 Workflow using Docker and Jenkins
OpenCms Days 2015 Workflow using Docker and JenkinsOpenCms Days 2015 Workflow using Docker and Jenkins
OpenCms Days 2015 Workflow using Docker and Jenkins
 
OpenCms Days 2016: OpenCms at the swiss seismological service
OpenCms Days 2016: OpenCms at the swiss seismological serviceOpenCms Days 2016: OpenCms at the swiss seismological service
OpenCms Days 2016: OpenCms at the swiss seismological service
 
OpenCms Days 2016: Participation and transparency portals with OpenCms
OpenCms Days 2016: Participation and transparency portals with OpenCmsOpenCms Days 2016: Participation and transparency portals with OpenCms
OpenCms Days 2016: Participation and transparency portals with OpenCms
 
OpenCms Days 2016: Keynote - Introducing OpenCms 10.5
OpenCms Days 2016:   Keynote - Introducing OpenCms 10.5OpenCms Days 2016:   Keynote - Introducing OpenCms 10.5
OpenCms Days 2016: Keynote - Introducing OpenCms 10.5
 
OpenCms Days 2016: Next generation content repository
OpenCms Days 2016: Next generation content repository OpenCms Days 2016: Next generation content repository
OpenCms Days 2016: Next generation content repository
 
Manual Jsf
Manual JsfManual Jsf
Manual Jsf
 

Similar to OpenCms Days 2012 - OpenCms 8 as a JSR-286 compliant portlet server

Meteor - Codemotion Rome 2015
Meteor - Codemotion Rome 2015Meteor - Codemotion Rome 2015
Meteor - Codemotion Rome 2015
Codemotion
 

Similar to OpenCms Days 2012 - OpenCms 8 as a JSR-286 compliant portlet server (20)

Java EE 7 - Embracing the Cloud and HTML 5
Java EE 7 - Embracing the Cloud and HTML 5Java EE 7 - Embracing the Cloud and HTML 5
Java EE 7 - Embracing the Cloud and HTML 5
 
HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)
 
Switch to alfresco with wasaaiq [compatibility mode]
Switch to alfresco with wasaaiq [compatibility mode]Switch to alfresco with wasaaiq [compatibility mode]
Switch to alfresco with wasaaiq [compatibility mode]
 
Switch to Alfresco with Seed in Australia and New Zealand
Switch to Alfresco with Seed in Australia and New ZealandSwitch to Alfresco with Seed in Australia and New Zealand
Switch to Alfresco with Seed in Australia and New Zealand
 
HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersHTML5 Intoduction for Web Developers
HTML5 Intoduction for Web Developers
 
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCamelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
 
Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
Web Components: Introduction and Practical Use Cases
Web Components: Introduction and Practical Use CasesWeb Components: Introduction and Practical Use Cases
Web Components: Introduction and Practical Use Cases
 
JBoss Architect Forum London - October 2013 - Platform as a What?
JBoss Architect Forum London - October 2013 - Platform as a What?JBoss Architect Forum London - October 2013 - Platform as a What?
JBoss Architect Forum London - October 2013 - Platform as a What?
 
Stateful mock servers to the rescue on REST ecosystems
Stateful mock servers to the rescue on REST ecosystemsStateful mock servers to the rescue on REST ecosystems
Stateful mock servers to the rescue on REST ecosystems
 
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
 
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
 
T2 Web Framework
T2 Web FrameworkT2 Web Framework
T2 Web Framework
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
 
soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5
 
Meteor - Codemotion Rome 2015
Meteor - Codemotion Rome 2015Meteor - Codemotion Rome 2015
Meteor - Codemotion Rome 2015
 
Meteor + Polymer
Meteor + PolymerMeteor + Polymer
Meteor + Polymer
 
RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
 RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
 
Open Cloud Computing Interface Presentation
Open Cloud Computing Interface PresentationOpen Cloud Computing Interface Presentation
Open Cloud Computing Interface Presentation
 

More from Alkacon Software GmbH & Co. KG

More from Alkacon Software GmbH & Co. KG (20)

OpenCms Days 2016: Multilingual websites with OpenCms
OpenCms Days 2016:   Multilingual websites with OpenCmsOpenCms Days 2016:   Multilingual websites with OpenCms
OpenCms Days 2016: Multilingual websites with OpenCms
 
OpenCms Days 2015 OpenCms X marks the spot
OpenCms Days 2015 OpenCms X marks the spotOpenCms Days 2015 OpenCms X marks the spot
OpenCms Days 2015 OpenCms X marks the spot
 
OpenCms Days 2015 Next generation repository
OpenCms Days 2015  Next generation repositoryOpenCms Days 2015  Next generation repository
OpenCms Days 2015 Next generation repository
 
OpenCms Days 2015 OCEE explained
OpenCms Days 2015 OCEE explainedOpenCms Days 2015 OCEE explained
OpenCms Days 2015 OCEE explained
 
OpenCms Days 2015 Modern templates with nested containers
OpenCms Days 2015 Modern templates with nested containersOpenCms Days 2015 Modern templates with nested containers
OpenCms Days 2015 Modern templates with nested containers
 
OpenCms Days 2015 Hidden features of OpenCms
OpenCms Days 2015 Hidden features of OpenCmsOpenCms Days 2015 Hidden features of OpenCms
OpenCms Days 2015 Hidden features of OpenCms
 
OpenCms Days 2015 Advanced Solr Searching
OpenCms Days 2015 Advanced Solr SearchingOpenCms Days 2015 Advanced Solr Searching
OpenCms Days 2015 Advanced Solr Searching
 
OpenCms Days 2015 OpenGovernment
OpenCms Days 2015 OpenGovernmentOpenCms Days 2015 OpenGovernment
OpenCms Days 2015 OpenGovernment
 
OpenCms Days 2015 OpenCms at erarta
OpenCms Days 2015 OpenCms at erarta OpenCms Days 2015 OpenCms at erarta
OpenCms Days 2015 OpenCms at erarta
 
OpenCms Days 2015 How do you develop for OpenCms?
OpenCms Days 2015 How do you develop for OpenCms?OpenCms Days 2015 How do you develop for OpenCms?
OpenCms Days 2015 How do you develop for OpenCms?
 
OpenCms Days 2015 Arkema, a leading chemicals company
OpenCms Days 2015 Arkema, a leading chemicals companyOpenCms Days 2015 Arkema, a leading chemicals company
OpenCms Days 2015 Arkema, a leading chemicals company
 
OpenCms Days 2014 - How Techem handles international customer portals
OpenCms Days 2014 - How Techem handles international customer portalsOpenCms Days 2014 - How Techem handles international customer portals
OpenCms Days 2014 - How Techem handles international customer portals
 
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and GruntOpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
 
OpenCms Days 2014 - OpenCms cloud setup with the FI-TS
OpenCms Days 2014 - OpenCms cloud setup with the FI-TSOpenCms Days 2014 - OpenCms cloud setup with the FI-TS
OpenCms Days 2014 - OpenCms cloud setup with the FI-TS
 
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
 
OpenCms Days 2014 - OpenCms 9 - A video tube?
OpenCms Days 2014 - OpenCms 9 - A video tube?OpenCms Days 2014 - OpenCms 9 - A video tube?
OpenCms Days 2014 - OpenCms 9 - A video tube?
 
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
 
OpenCms Days 2014 - Updating to OpenCms 9.5
OpenCms Days 2014 - Updating to OpenCms 9.5OpenCms Days 2014 - Updating to OpenCms 9.5
OpenCms Days 2014 - Updating to OpenCms 9.5
 
OpenCms Days 2014 - Using the SOLR collector
OpenCms Days 2014 - Using the SOLR collectorOpenCms Days 2014 - Using the SOLR collector
OpenCms Days 2014 - Using the SOLR collector
 
OpenCms Days 2014 - Responsive bootstrap templates reloaded
OpenCms Days 2014 - Responsive bootstrap templates reloadedOpenCms Days 2014 - Responsive bootstrap templates reloaded
OpenCms Days 2014 - Responsive bootstrap templates reloaded
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 

OpenCms Days 2012 - OpenCms 8 as a JSR-286 compliant portlet server

  • 1. Portals in OpenCms Building JSF and portlet applications in openCms Presented by: Dipl.-Ing. Helmut Manck OpenCms conference 2012 25. September 2012 (c) 2012 eonas GmbH
  • 2. Agenda What are Portals good for? • Scenarios, Market Players • Common Architectural Issues Portals in OpenCms • How to build a portal JSF and Portlets • How to build a portlet (c) 2012 eonas GmbH
  • 3. Scenario: Company Intranet Typically a mix of content and web applications Navigation Content Content Process (c) 2012 eonas GmbH
  • 4. Architectural approaches • Method I: Don't use a CMS = All programmatic • Editors hand over articles to programmers • Programmers integrate, test and release • Good for Programmers, Bad for Editors • Method II: Separate CMS and Applications • Two independent parts: one CMS-driven, one programmatic driven. • Clean and sweet until navigation and deep links are an issue. (c) 2012 eonas GmbH
  • 5. Architectural approaches • Method III: Develop within CMS • Each piece of code is a formatter, JSP-fragment, Template or similar • Development within (Open)CMS • Pro: Single location of code • Con: IDE support, independent testing, technological freedom • Or you use Portals... (c) 2012 eonas GmbH
  • 6. Method IV: Portals Navigation Content Portlet Portlet Content Portlet (c) 2012 eonas GmbH
  • 7. Portal Issues POST /cms/test HTTP/1.1 Host: server select=7 • There are 3 Portlets on the Page. Who handles this POST-Request? • Portals must provide: • Name spacing • Link Generation • (with in HTML-Space and the generated URLs) (c) 2012 eonas GmbH
  • 8. Java Portlets: JSR-286 • Portlets are like Servlets • own J2EE-Webapp (.war) • own data source, jars, configuration, version • plus a portlet.xml • Portlets extend GenericPortlet • “render”: Deliver HTML-Snippet • “action”: Process POST • “resource”: Deliver CSS, JS, Ajax (c) 2012 eonas GmbH
  • 9. Portlet example - The Portlet plus some logic classes - Some JSPs to render the HTML-Snipplets - J2EE-Configuration plus Portlet-Config - Build recipe based on maven - Additional Libs - Can be developed, tested, debugged locally with full IDE support (e.g. hot code replace) (c) 2012 eonas GmbH
  • 10. Example: Request Flow 1. A HTML-Snippet generates a POST-URL: <p:actionURL var="target" name="choosemode"/> <form name="form" action="${target}“ method="post"> 2. Form-Submit triggers URL, then redirect to processAction(request, response) 3. New HTML-Snipplet is rendered. render(request,response) (c) 2012 eonas GmbH
  • 11. Market View redhat (c) 2012 eonas GmbH
  • 12. OpenCms as Portal Server Pluto Portal OpenCms 7/8 (Reference implementation for JSR286) OpenCms Portal Portal Driver - Maven Overlay (glue logic) (c) 2012 eonas GmbH
  • 13. Anatomy of the Portal - Storage location of the base wars - context.xml: the portal needs enhanced privileges - web.xml must be heavily modified, spring support is required by pluto, add some filters - the driver ( = glue logic ) is referenced here - Maven overlays the base wars, builds the final war, Pluto requires a certain Spring version. (c) 2012 eonas GmbH
  • 14. Using the Portlet Support 1. Create an opencmsportal.war • Usual Setup-Process necessary • Portlet support enabled, but no templates, formatters or document types contained. 2. Create an OpenCms Module • Define Look & Feel, CSS etc. 3. The selected portlet is rendered using API-Calls within the formatter (usually) PortletTag tag = new PortletTag(); tag.setPortletId(id); tag.setPageContext(copy); tag.doStartTag(); (c) 2012 eonas GmbH
  • 15. Creating the Portlet Module OpenCms 8 Module - Rest of the Module not affected - Formatter for a Portlet - Document Type Definition for a Portlet - Maven Pom to build the Module (c) 2012 eonas GmbH
  • 16. JSF and Rich Client Widgets • Several JSF Libraries provide nice, easy to use widgets • Primefaces, Richfaces, ICEfaces • Lots of widgets, mostly easy to use • Ajax support “built in”, Partial updates, Push-Support • E.g. Primefaces Datatable • JSF is gaining traction • Application development gets much faster • Applications get a “rich client” look & feel • How to integrate into a portlet? (c) 2012 eonas GmbH
  • 17. JSR 301 and JSR329 • JSR301 and JSR329: • Transparent bridge between JSF and Portals • A JSF Application can be made Portlet just by adding a few Jars and some configuration (portlet.xml) • Portal vendors are pushing this technology • RedHat (Jboss) • Liferay • The Liferay-JSF-Bridge can be used with OpenCms/Pluto! (c) 2012 eonas GmbH
  • 18. Component Overview Tomcat 6 OpenCms Pluto with HTTP GET Portal Portal Driver dispatch() - Render or Action Portlet B JSF Bridge Webapp Primefaces Portlet A Webapp Plain Portlet (c) 2012 eonas GmbH
  • 19. Real world example Example: A simple voting portlet • Backend: Spring/Hibernate/AOP • Frontend: Primefaces (c) 2012 eonas GmbH
  • 20. Fragen? Dipl. Ing. Helmut Manck Geschäftsführer eonas IT-Beratung und Entwicklung GmbH Pascalstr. 10A 10587 Berlin Germany helmut.manck@eonas.de Telefon +49-30-3980 522 – 10 (c) 2012 eonas GmbH 20