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