Implementing portlets using WebScripts
Piergiorgio Lucidi
Open Source ECM Specialist
Alfresco Trainer / Wiki Gardener / Contributor
Author / Technical Reviewer @ Packt Publishing
PMC Member @ Apache Software Foundation
Project Leader / Committer @ JBoss
What is a portal?
What is a portal?
• A portal is an application focused on
• Aggregating apps based on different technologies
• Creating user oriented and dynamic websites
• Page-centric approach
• Portlets / Apps / Gadgets
• Enterprise services
• Authentication
• Authorization
• Personalization
• Export / Import
• APIs for integrations
What is a portlet?
A portlet is an application that
•Contains specific business logic
•Provides a fragment of content
•Potentially the output fragment can be dynamic for each
user
•A permission can be given for
•The entire portal
•Page
•Portlet
•Can be implemented using bridging and
wrappers
Why exposing WebScripts as portlets?
• Agile and quick approach
• Reuse of existing components
• Modularization
• It’s fun ^__^
Exposing WebScripts as portlets
WebScriptPortlet
• alfresco.war
• WebScripts
Pure Spring
WebScripts
ProxyPortlet
• share.war
• Surf pages
• Surf components
• WebScripts
Spring Surf
Spring WebScripts framework
WebScriptPortlet – Deployment scenario
WebScriptPortlet
• JVM
• Portal
• alfresco.war
• portlet.xml
• Presentation
• Take contents directly
from the local Alfresco
• Single tier architecture
JVM
Portal
Alfresco
WebScriptPortlet – Parameters
• scriptUrl
• URL of the WebScript
• Authenticator factory
• jsr168.webclient
• Cookie
• jsr168
• Portal session
WebScriptPortlet – Portlet descriptor
WebScriptPortlet – Rendering in the portal
WebScriptPortlet – How it works
Rendering phases:
1. The portal starts to render the page
1. Alfresco starts to render the WebScript
1. Alfresco will authenticate user
1. WebScript is executed using the user permissions
1. The controller will return results in the FTL
1. Alfresco ends to render the WebScript in the portlet
1. The portal finishes to render the page
WebScriptPortlet – Best Practices
• Divide all the functionalities in simple views
• Each atomic feature matched with a WebScript
• Use Ajax calls with the ticket session
• Any other interaction needed for the WebScript UI
• Don’t overload the WebScript
• Keep it simple!!!
ProxyPortlet – Spring Surf architecture
ProxyPortlet – Deployment scenario
ProxyPortlet
• JVM
• Portal
• share.war
• portlet.xml
• 2-tiers architecture
• Presentation tier
• Share.war
• Data tier
• alfresco.war
• Remote calls against the
remote repository
JVM
Portal
Share
JVM
Alfresco
ProxyPortlet – Parameters
viewScriptUrl
• URL related to
• Surf page
• Surf component
ProxyPortlet – Rendering in the portal
ProxyPortlet – How it works
Rendering phases:
1. The portal starts to render the page
1. Share starts to render the Surf page
1. Surf starts to render the component
1. Share invokes Alfresco using external authentication
1. Alfresco executes the Data WebScript
1. The returned JSON will be used in the FTL
1. Share ends to render the Surf page
1. The portal finishes to render the portlet
ProxyPortlet – Best Practices
• Configure SSO between Alfresco and the portal
• External authentication
• Each request from Share will have an HTTP header
• Alfresco will delegate the portal for authentication
• Divide each functionality thinking about usability
• Use Ajax calls for creating dynamic UI
• Don’t overload Surf pages and components
• Keep it simple!!!
Thank you!
@pjlucidi
p.lucidi@sourcesense.com

More Related Content

PPTX
Alfresco Summit 2014 - Crafter CMS - Case European Bank
PDF
Alfresco WebScript Connector for Apache ManifoldCF
PPTX
Integrating Alfresco with Portals
PPTX
The next step from Microsoft - Vnext (Srdjan Poznic)
PDF
Drupal 8 - Quick bites
PPTX
Hire laravel-php-developers- Hire Laravel Programmers
PPTX
ASP.NET - Introduction to Web Forms and MVC
PPTX
Tarabica 2019 - Migration from ASP.NET MVC to ASP.NET Core
Alfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco WebScript Connector for Apache ManifoldCF
Integrating Alfresco with Portals
The next step from Microsoft - Vnext (Srdjan Poznic)
Drupal 8 - Quick bites
Hire laravel-php-developers- Hire Laravel Programmers
ASP.NET - Introduction to Web Forms and MVC
Tarabica 2019 - Migration from ASP.NET MVC to ASP.NET Core

What's hot (20)

PDF
Laravel and CodeIgniter: pros & cons
PPTX
Mule components
PPTX
Ruby on rails
PDF
From PHP monolith to polyglot microservices
PPTX
Mule agent architecture
PDF
PHP Web Development Frameworks & Advantages
PDF
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
PPTX
They why behind php frameworks
PPTX
Kibana globalization at the RTP meetup
PPTX
4. introduction to Asp.Net MVC - Part II
PPTX
Design-Time Properties in Custom Pipeline Components
PDF
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
PPSX
ASP.NET Web form
PPTX
Polyglot Mule Transformers
PDF
OSGi and Java 9+ - BJ Hargrave (IBM)
PDF
Extending JBoss EPP and Site Publisher your way
PPTX
Alfresco 5.0 Technology Review
PPT
Basic web application development with Apache Cocoon 2.1
PDF
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
PDF
Spring Boot
Laravel and CodeIgniter: pros & cons
Mule components
Ruby on rails
From PHP monolith to polyglot microservices
Mule agent architecture
PHP Web Development Frameworks & Advantages
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
They why behind php frameworks
Kibana globalization at the RTP meetup
4. introduction to Asp.Net MVC - Part II
Design-Time Properties in Custom Pipeline Components
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
ASP.NET Web form
Polyglot Mule Transformers
OSGi and Java 9+ - BJ Hargrave (IBM)
Extending JBoss EPP and Site Publisher your way
Alfresco 5.0 Technology Review
Basic web application development with Apache Cocoon 2.1
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
Spring Boot
Ad

Viewers also liked (8)

PDF
Alfresco Enterprise 3.4 ita
PDF
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
PDF
The new ehcache 2.0 and hibernate spi
PDF
Alfresco Day Milano 2016 - Demo Data
PDF
Alfresco Day Vienna 2016: Alfrescos neue Rest API
PPTX
Alfresco Day Benelux Hogeschool Inholland Records Management application
PPTX
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
PPTX
Alfresco Day Benelux Inholland studentendossier
Alfresco Enterprise 3.4 ita
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
The new ehcache 2.0 and hibernate spi
Alfresco Day Milano 2016 - Demo Data
Alfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day Benelux Inholland studentendossier
Ad

Similar to Implementing portlets using Web Scripts (20)

PPT
Portlet
PDF
Portets to composite applications
PPT
Portal Presention
PDF
WCM Roadmap Versions 3 3 And 4 0
PDF
PDF
Extending Alfresco Share 3.3
PDF
Developer’s intro to the alfresco platform
PDF
Optaros Surf Code Camp Introduction
PDF
PLAT-7 Spring Web Scripts and Spring Surf
PDF
PLAT-7 Spring Web Scripts and Spring Surf
PPTX
Amplexor alfresco-mini-2012-01-26
PDF
A portlet-API based approach for application integration
PPT
2 Magma Introduction
PDF
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
PPT
Working with Portlets in ADF and Webcenter
PDF
Getting to Know Alfresco 4
PDF
Getting to know alfresco 4
KEY
Portlets
PPTX
Introduction to java standard portlets
PDF
PLAT-8 Spring Web Scripts and Spring Surf
Portlet
Portets to composite applications
Portal Presention
WCM Roadmap Versions 3 3 And 4 0
Extending Alfresco Share 3.3
Developer’s intro to the alfresco platform
Optaros Surf Code Camp Introduction
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
Amplexor alfresco-mini-2012-01-26
A portlet-API based approach for application integration
2 Magma Introduction
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Working with Portlets in ADF and Webcenter
Getting to Know Alfresco 4
Getting to know alfresco 4
Portlets
Introduction to java standard portlets
PLAT-8 Spring Web Scripts and Spring Surf

More from Piergiorgio Lucidi (15)

PDF
Embracing InnerSource for your adaptive Digital Transformation
PDF
Introducing the ASF at Microsoft Build 2020 - Italian Dev Community
PDF
Smart Alfresco ECM Program Strategy for Your New Success Story
PDF
Design your own BPM Program Strategy with Alfresco Process Services
PDF
Smart Content Migration using Apache ManifoldCF
PDF
Alfresco Process Services Live Demo @ Red Hat Open Source Day 2017 Italy
PDF
The Journey of Apache ManifoldCF: Learning from ASF's Successes
PPTX
Alfresco Day Roma 2015 - Sourcesense
PPTX
Super Size Your Search
PDF
The ECM world from the point of view of Alfresco - Linux Day 2013 - Rome
PDF
Apache ManifoldCF @ Linux Day 2012
PDF
Apache ManifoldCF
PPT
Hippo CMS - A first look
PDF
Spring Ldap
PDF
Spring In Alfresco Ecm
Embracing InnerSource for your adaptive Digital Transformation
Introducing the ASF at Microsoft Build 2020 - Italian Dev Community
Smart Alfresco ECM Program Strategy for Your New Success Story
Design your own BPM Program Strategy with Alfresco Process Services
Smart Content Migration using Apache ManifoldCF
Alfresco Process Services Live Demo @ Red Hat Open Source Day 2017 Italy
The Journey of Apache ManifoldCF: Learning from ASF's Successes
Alfresco Day Roma 2015 - Sourcesense
Super Size Your Search
The ECM world from the point of view of Alfresco - Linux Day 2013 - Rome
Apache ManifoldCF @ Linux Day 2012
Apache ManifoldCF
Hippo CMS - A first look
Spring Ldap
Spring In Alfresco Ecm

Recently uploaded (20)

PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PDF
Flame analysis and combustion estimation using large language and vision assi...
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PPTX
The various Industrial Revolutions .pptx
DOCX
search engine optimization ppt fir known well about this
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPT
Geologic Time for studying geology for geologist
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Five Habits of High-Impact Board Members
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PPTX
2018-HIPAA-Renewal-Training for executives
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
sustainability-14-14877-v2.pddhzftheheeeee
A proposed approach for plagiarism detection in Myanmar Unicode text
Flame analysis and combustion estimation using large language and vision assi...
OpenACC and Open Hackathons Monthly Highlights July 2025
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
1 - Historical Antecedents, Social Consideration.pdf
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
The various Industrial Revolutions .pptx
search engine optimization ppt fir known well about this
Enhancing emotion recognition model for a student engagement use case through...
sbt 2.0: go big (Scala Days 2025 edition)
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Geologic Time for studying geology for geologist
Zenith AI: Advanced Artificial Intelligence
Five Habits of High-Impact Board Members
NewMind AI Weekly Chronicles – August ’25 Week III
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
2018-HIPAA-Renewal-Training for executives
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
sustainability-14-14877-v2.pddhzftheheeeee

Implementing portlets using Web Scripts

  • 1. Implementing portlets using WebScripts Piergiorgio Lucidi Open Source ECM Specialist Alfresco Trainer / Wiki Gardener / Contributor Author / Technical Reviewer @ Packt Publishing PMC Member @ Apache Software Foundation Project Leader / Committer @ JBoss
  • 2. What is a portal?
  • 3. What is a portal? • A portal is an application focused on • Aggregating apps based on different technologies • Creating user oriented and dynamic websites • Page-centric approach • Portlets / Apps / Gadgets • Enterprise services • Authentication • Authorization • Personalization • Export / Import • APIs for integrations
  • 4. What is a portlet? A portlet is an application that •Contains specific business logic •Provides a fragment of content •Potentially the output fragment can be dynamic for each user •A permission can be given for •The entire portal •Page •Portlet •Can be implemented using bridging and wrappers
  • 5. Why exposing WebScripts as portlets? • Agile and quick approach • Reuse of existing components • Modularization • It’s fun ^__^
  • 6. Exposing WebScripts as portlets WebScriptPortlet • alfresco.war • WebScripts Pure Spring WebScripts ProxyPortlet • share.war • Surf pages • Surf components • WebScripts Spring Surf
  • 8. WebScriptPortlet – Deployment scenario WebScriptPortlet • JVM • Portal • alfresco.war • portlet.xml • Presentation • Take contents directly from the local Alfresco • Single tier architecture JVM Portal Alfresco
  • 9. WebScriptPortlet – Parameters • scriptUrl • URL of the WebScript • Authenticator factory • jsr168.webclient • Cookie • jsr168 • Portal session
  • 12. WebScriptPortlet – How it works Rendering phases: 1. The portal starts to render the page 1. Alfresco starts to render the WebScript 1. Alfresco will authenticate user 1. WebScript is executed using the user permissions 1. The controller will return results in the FTL 1. Alfresco ends to render the WebScript in the portlet 1. The portal finishes to render the page
  • 13. WebScriptPortlet – Best Practices • Divide all the functionalities in simple views • Each atomic feature matched with a WebScript • Use Ajax calls with the ticket session • Any other interaction needed for the WebScript UI • Don’t overload the WebScript • Keep it simple!!!
  • 14. ProxyPortlet – Spring Surf architecture
  • 15. ProxyPortlet – Deployment scenario ProxyPortlet • JVM • Portal • share.war • portlet.xml • 2-tiers architecture • Presentation tier • Share.war • Data tier • alfresco.war • Remote calls against the remote repository JVM Portal Share JVM Alfresco
  • 16. ProxyPortlet – Parameters viewScriptUrl • URL related to • Surf page • Surf component
  • 17. ProxyPortlet – Rendering in the portal
  • 18. ProxyPortlet – How it works Rendering phases: 1. The portal starts to render the page 1. Share starts to render the Surf page 1. Surf starts to render the component 1. Share invokes Alfresco using external authentication 1. Alfresco executes the Data WebScript 1. The returned JSON will be used in the FTL 1. Share ends to render the Surf page 1. The portal finishes to render the portlet
  • 19. ProxyPortlet – Best Practices • Configure SSO between Alfresco and the portal • External authentication • Each request from Share will have an HTTP header • Alfresco will delegate the portal for authentication • Divide each functionality thinking about usability • Use Ajax calls for creating dynamic UI • Don’t overload Surf pages and components • Keep it simple!!!