SlideShare a Scribd company logo
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
Ad

Recommended

Alfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European Bank
Piergiorgio Lucidi
 
Alfresco WebScript Connector for Apache ManifoldCF
Alfresco WebScript Connector for Apache ManifoldCF
Piergiorgio Lucidi
 
Integrating Alfresco with Portals
Integrating Alfresco with Portals
Piergiorgio Lucidi
 
The next step from Microsoft - Vnext (Srdjan Poznic)
The next step from Microsoft - Vnext (Srdjan Poznic)
Geekstone
 
Drupal 8 - Quick bites
Drupal 8 - Quick bites
Brahampal Singh
 
Hire laravel-php-developers- Hire Laravel Programmers
Hire laravel-php-developers- Hire Laravel Programmers
Summation IT
 
ASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVC
Bilal Amjad
 
Tarabica 2019 - Migration from ASP.NET MVC to ASP.NET Core
Tarabica 2019 - Migration from ASP.NET MVC to ASP.NET Core
Miroslav Popovic
 
Laravel and CodeIgniter: pros & cons
Laravel and CodeIgniter: pros & cons
ElenorWisozk
 
Mule components
Mule components
Krishna_in
 
Ruby on rails
Ruby on rails
Batzorigt Rentsen
 
From PHP monolith to polyglot microservices
From PHP monolith to polyglot microservices
Kazki Matsumoto
 
Mule agent architecture
Mule agent architecture
Krishna_in
 
PHP Web Development Frameworks & Advantages
PHP Web Development Frameworks & Advantages
AditMicrosys Australia
 
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
VMware Tanzu
 
They why behind php frameworks
They why behind php frameworks
Kirk Madera
 
Kibana globalization at the RTP meetup
Kibana globalization at the RTP meetup
Shikha Srivastava
 
4. introduction to Asp.Net MVC - Part II
4. introduction to Asp.Net MVC - Part II
Rohit Rao
 
Design-Time Properties in Custom Pipeline Components
Design-Time Properties in Custom Pipeline Components
Daniel Toomey
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
mfrancis
 
ASP.NET Web form
ASP.NET Web form
Md. Mahedee Hasan
 
Polyglot Mule Transformers
Polyglot Mule Transformers
Sulthony Hartanto
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
mfrancis
 
Extending JBoss EPP and Site Publisher your way
Extending JBoss EPP and Site Publisher your way
rafaelliu
 
Alfresco 5.0 Technology Review
Alfresco 5.0 Technology Review
Zia Consulting
 
Basic web application development with Apache Cocoon 2.1
Basic web application development with Apache Cocoon 2.1
Jeroen Reijn
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
mfrancis
 
Spring Boot
Spring Boot
Shubham Aggarwal
 
Alfresco Enterprise 3.4 ita
Alfresco Enterprise 3.4 ita
SoftInstigate
 
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
Alfresco Software
 

More Related Content

What's hot (20)

Laravel and CodeIgniter: pros & cons
Laravel and CodeIgniter: pros & cons
ElenorWisozk
 
Mule components
Mule components
Krishna_in
 
Ruby on rails
Ruby on rails
Batzorigt Rentsen
 
From PHP monolith to polyglot microservices
From PHP monolith to polyglot microservices
Kazki Matsumoto
 
Mule agent architecture
Mule agent architecture
Krishna_in
 
PHP Web Development Frameworks & Advantages
PHP Web Development Frameworks & Advantages
AditMicrosys Australia
 
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
VMware Tanzu
 
They why behind php frameworks
They why behind php frameworks
Kirk Madera
 
Kibana globalization at the RTP meetup
Kibana globalization at the RTP meetup
Shikha Srivastava
 
4. introduction to Asp.Net MVC - Part II
4. introduction to Asp.Net MVC - Part II
Rohit Rao
 
Design-Time Properties in Custom Pipeline Components
Design-Time Properties in Custom Pipeline Components
Daniel Toomey
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
mfrancis
 
ASP.NET Web form
ASP.NET Web form
Md. Mahedee Hasan
 
Polyglot Mule Transformers
Polyglot Mule Transformers
Sulthony Hartanto
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
mfrancis
 
Extending JBoss EPP and Site Publisher your way
Extending JBoss EPP and Site Publisher your way
rafaelliu
 
Alfresco 5.0 Technology Review
Alfresco 5.0 Technology Review
Zia Consulting
 
Basic web application development with Apache Cocoon 2.1
Basic web application development with Apache Cocoon 2.1
Jeroen Reijn
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
mfrancis
 
Spring Boot
Spring Boot
Shubham Aggarwal
 
Laravel and CodeIgniter: pros & cons
Laravel and CodeIgniter: pros & cons
ElenorWisozk
 
Mule components
Mule components
Krishna_in
 
From PHP monolith to polyglot microservices
From PHP monolith to polyglot microservices
Kazki Matsumoto
 
Mule agent architecture
Mule agent architecture
Krishna_in
 
PHP Web Development Frameworks & Advantages
PHP Web Development Frameworks & Advantages
AditMicrosys Australia
 
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
VMware Tanzu
 
They why behind php frameworks
They why behind php frameworks
Kirk Madera
 
Kibana globalization at the RTP meetup
Kibana globalization at the RTP meetup
Shikha Srivastava
 
4. introduction to Asp.Net MVC - Part II
4. introduction to Asp.Net MVC - Part II
Rohit Rao
 
Design-Time Properties in Custom Pipeline Components
Design-Time Properties in Custom Pipeline Components
Daniel Toomey
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
mfrancis
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
mfrancis
 
Extending JBoss EPP and Site Publisher your way
Extending JBoss EPP and Site Publisher your way
rafaelliu
 
Alfresco 5.0 Technology Review
Alfresco 5.0 Technology Review
Zia Consulting
 
Basic web application development with Apache Cocoon 2.1
Basic web application development with Apache Cocoon 2.1
Jeroen Reijn
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
mfrancis
 

Viewers also liked (8)

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

Similar to Implementing portlets using Web Scripts (20)

Portlet
Portlet
patinijava
 
Portets to composite applications
Portets to composite applications
Serge Huber
 
Portal Presention
Portal Presention
JayaPrakash.m
 
WCM Roadmap Versions 3 3 And 4 0
WCM Roadmap Versions 3 3 And 4 0
Alfresco Software
 
B13922
B13922
Gustavo Medina
 
Extending Alfresco Share 3.3
Extending Alfresco Share 3.3
Will Abson
 
Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platform
Alfresco Software
 
Optaros Surf Code Camp Introduction
Optaros Surf Code Camp Introduction
Jeff Potts
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
Alfresco Software
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
Alfresco Software
 
Amplexor alfresco-mini-2012-01-26
Amplexor alfresco-mini-2012-01-26
Amplexor
 
A portlet-API based approach for application integration
A portlet-API based approach for application integration
whabicht
 
2 Magma Introduction
2 Magma Introduction
vegamario
 
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Perficient, Inc.
 
Working with Portlets in ADF and Webcenter
Working with Portlets in ADF and Webcenter
DataNext Solutions
 
Getting to Know Alfresco 4
Getting to Know Alfresco 4
Alfresco Software
 
Getting to know alfresco 4
Getting to know alfresco 4
Paul Hampton
 
Portlets
Portlets
ssetem
 
Introduction to java standard portlets
Introduction to java standard portlets
Rohan Faye
 
PLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring Surf
Alfresco Software
 
Portets to composite applications
Portets to composite applications
Serge Huber
 
WCM Roadmap Versions 3 3 And 4 0
WCM Roadmap Versions 3 3 And 4 0
Alfresco Software
 
Extending Alfresco Share 3.3
Extending Alfresco Share 3.3
Will Abson
 
Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platform
Alfresco Software
 
Optaros Surf Code Camp Introduction
Optaros Surf Code Camp Introduction
Jeff Potts
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
Alfresco Software
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
Alfresco Software
 
Amplexor alfresco-mini-2012-01-26
Amplexor alfresco-mini-2012-01-26
Amplexor
 
A portlet-API based approach for application integration
A portlet-API based approach for application integration
whabicht
 
2 Magma Introduction
2 Magma Introduction
vegamario
 
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Perficient, Inc.
 
Working with Portlets in ADF and Webcenter
Working with Portlets in ADF and Webcenter
DataNext Solutions
 
Getting to know alfresco 4
Getting to know alfresco 4
Paul Hampton
 
Portlets
Portlets
ssetem
 
Introduction to java standard portlets
Introduction to java standard portlets
Rohan Faye
 
PLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring Surf
Alfresco Software
 
Ad

More from Piergiorgio Lucidi (15)

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

Recently uploaded (20)

Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
 
UserCon Belgium: Honey, VMware increased my bill
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
The Future of Technology: 2025-2125 by Saikat Basu.pdf
The Future of Technology: 2025-2125 by Saikat Basu.pdf
Saikat Basu
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
Fwdays
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
digitaljignect
 
Curietech AI in action - Accelerate MuleSoft development
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
 
Lessons Learned from Developing Secure AI Workflows.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
Safe Software
 
The Future of Product Management in AI ERA.pdf
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 
Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
 
UserCon Belgium: Honey, VMware increased my bill
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
The Future of Technology: 2025-2125 by Saikat Basu.pdf
The Future of Technology: 2025-2125 by Saikat Basu.pdf
Saikat Basu
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
Fwdays
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
digitaljignect
 
Curietech AI in action - Accelerate MuleSoft development
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
 
Lessons Learned from Developing Secure AI Workflows.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
Safe Software
 
The Future of Product Management in AI ERA.pdf
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 

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!!!