SlideShare a Scribd company logo
Introducing Alfresco Surf Platform Jean Barmash Director, Technical Services
Agenda Introduction to Surf Single Tier Surf Applications Templates Pages Components Demo - Create New Page Two Tier Surf Applications Remote Connectors Demo – Remote Component (Little bit) Share and Future of Surf Q & A
What is Surf? Page Layout and Component Framework for Creating Web Apps Highly Extensible & Customizable Many Programming Options, but  Plays Nicely with Web Scripts Separate Application No Dependencies On Alfresco Repository However, Allows Two Tiered Applications Ability to Call Remote Web Services (i.e. REST) Alfresco Repository as Backend "Model" Mashup
Take a Page navigation
Split it Up Into Template + Components box1 box2 box2 content navigation footer  global scope
Alfresco Surf Design Objectives Lightweight and Scriptable Web Scripts for User Interface Easy to Customize XML Configuration files Works with Alfresco WCM Read and write from AVM stores Site Construction Model / Component model Provided out-of-the-box and extensible Site Dispatcher Provided out-of-the-box and extensible Developer API
Single Tier Architecture Presentation Tier Alfresco Surf-Powered Application Web Script Runtime FreeMarker Processor Spring Some 3 rd  party libraries Model View Controller Model Objects  Template Page Component Other – Theme, Site Coniguration, Page Associations, etc.
Model-View-Controller Two Levels Template (Page) Component  Both Have Renderers Page Renderer Renderer Renderer Renderer
Renderers Different Methods to Generate Output Typically HTML Markup based on the Model Out of the Box Renderers FreeMarker Templates Web Script Java Bean JSP Web Scripts The most common and most powerful rendering facility No Java coding, no server restarts Rich underlying API for easy extension Most Surf Components will be written using Web Scripts! Can Build Your Own Renderers
Renderer Root Scoped Objects To Access the Model, Renderers Have These Objects Exposed context The request context user The current user content The content object being rendered  instance The renderer instance (equivalent of "this") sitedata Site Construction helper remote Connection management helper
Page Dispatching Logic Execute the Template Renderer for path:  /surf/home FreeMarker renderer /WEB-INF/classes/alfresco/templates/sample/home.ftl Regions have Scopes Page Template Global  Execute the region tag and find matching components /WEB-INF/classes/alfresco/site-data/components Search for components in  page  scope, bound to home page for the region ‘ test ’ page.test.home.xml <html> <body> <@region id=“ test ” scope=“ page ” /> </body> </html>
Site Data /WEB-INF/classes/alfresco /site-data   /chrome   /components   /component-types   /configurations   /content-associations   /page-associations   /pages   /page-types   /template-instances   /template-types   /themes Note:  bolded  elements are the ones where developers spend most of their time
Walk Through
Page Dispatching LifeCycle Example: Hitting the home page http://testserver:8080/sample/page?p=home Look up Page Home (in /site-data/pages) Page XML has a template reference Look up Template (in /site-data/templates) Look up Renderer for Template – FTL file Process FTL, and Regions in Template by Id Find Component Bindings for those region ids based on scope Component Definitions (in /site-data/components) Component XMLs Define Component Renderers
Additional Elements Associations Page Association Content Association Site Configuration Theme Chrome
Demo - Create a Page - 1 Use Existing Page Template Newpage.xml in site-data\pages\ <?xml version='1.0' encoding='UTF-8'?> <page> <title>New Page</title> <template-instance>landing</template-instance> <authentication>none</authentication> </page> View New Page  http://localhost:8080/surf/page?f=default&p=newpage
Demo - Create a Page - 2 &quot;Landing&quot; Template has Region &quot;Content&quot; that's not defined Add New Components that haven't been added page.content.newpage.xml site-data\components\ <?xml version='1.0' encoding='UTF-8'?> <component> <scope>page</scope> <region-id>content</region-id> <source-id>newpage</source-id> <url>/blocks/image</url> <properties> <src>${url.context}/images/age/palanga.jpg</src> </properties> </component> Using OOB Web Script /blocks/image /blocks/include
Demo - Create a Page - 3 Now Let's Add this to Navigation – Page Association Add home-newpage.xml in site-data\page-associations <?xml version='1.0' encoding='UTF-8'?> <page-association> <source-id>home</source-id> <dest-id>newpage</dest-id> <assoc-type>child</assoc-type> <order-id>5</order-id> </page-association>
Additional Surf Capabilities Infrastructure Elements – Site Dispatcher Site Configuration Page Dispatching Link Builders Page Mappers I18N Remote Connections
Agenda Introduction to Surf Single Tier Surf Applications Templates Pages Components Demo - Create New Page Two Tier Surf Applications Remote Connectors Demo – Remote Component (Little bit) Share and Future of Surf Q & A
Two Tier Architecture Presentation Tier Alfresco Surf-Powered Application Web Script Runtime FreeMarker Processor Spring Some 3 rd  party libraries Repository (Data) Tier Alfresco Repository REST Interface to outside world Web Script Runtime FreeMarker Processor Spring Hibernate 3 rd  party libraries
Uses Web Scripts Web Scripts Lightweight scriptable REST framework Multiple uses Roll your own API Create new UI components Create portlets/widgets Expose WCM/AVM features Script-based implementation Server-side JavaScript Freemarker Limited only by your imagination Integration: Create a mashup Search: Exposed to other systems. Rich Internet Applications Cross-language Cross-platform JavaScript (Controller) Freemarker (View) Alfresco Repository (Model) Consumer / Client
Surf - Two Tiers Remote Repository (Model) JavaScript (Controller) Freemarker (View) Alfresco Repository (Model) JavaScript (Controller) Freemarker (View) Remote Data Model Data (Repository) Tier Consumer / Client
Two Tier Architecture Connectors Model Objects Pages Templates Components Themes Associations JSON Web Scripts Repository CMIS Social UI JSON Content Graph Documents Folders Associations Aspects Presentation Tier Repository Tier Spring REST Web Scripts FreeMarker Dispatcher Surf
Web Scripts Presentation Web Scripts Web Scripts on the Presentation Tier Responsible for generating markup (HTML) Isolated from Alfresco Repository Model context purely derived from framework (no “document”) Can call over to Alfresco using “remote” variable Data Web Scripts Web Scripts on the Repository Tier Responsible for generating JSON, XML (ATOM) or other serialized data format Wired into the Alfresco Repository Context includes Alfresco Repository elements (“document”)
Root-scoped: remote ScriptRemote A remote connection helper Access to Alfresco Web Framework remoting faciltiies Stateless Connections Stateful Connections (scoped to user) Credential Management and Binding (stateful) Credential Vault (persistent and non-persistent) Customizable (XML config driven)
Remoting Configurations Get a connector for a given endpoint Endpoints any arbitrary id defines connection information to the remote location Connector knows how to “talk” with specific types of back end servers Authenticator knows how to “handshake” for authentication with back end servers Alfresco Ticket, MediaWiki, WordPress, etc. Endpoint Authenticator Connector
Remoting Configurations Endpoint Connectors Authenticators HTTP alfresco RMI Alfresco www.wikipedia.org mediawiki wordpress alfresco.com
Remote Configuration Endpoints Endpoints Properties id  Defines the endpoint ID to be “alfresco” connector-id The id of the connector to use when connecting endpoint-url The base URL for the connection identity How to manage user connection state (user, none) <config evaluator=&quot;string-compare&quot; condition=&quot;Remote&quot;> <remote> <endpoint> <id> alfresco </id> <name>Alfresco - user access</name> <connector-id> alfresco </connector-id> <endpoint-url> http://localhost:8080/alfresco/s </endpoint-url> <identity> user </identity> </endpoint> </remote> </config>
Remote Configuration Connectors Connectors Properties id  Defines the connector ID to be “alfresco” class The Java implementation class name authenticator-id The id of the authenticator to use when authenticating <config evaluator=&quot;string-compare&quot; condition=&quot;Remote&quot;> <remote> <connector> <id> alfresco </id> <name>Alfresco Connector</name> <class> org.alfresco.connector.AlfrescoConnector </class> <authenticator-id> alfresco-ticket </authenticator-id> </connector> </remote> </config>
Walk Through  Remote Weather Component
Remote Weather Component Web Script Uses HTTP EndPoint to Connect to Yahoo Weather Service No Authentication Required  Page Weather calls the Web Script
Advantages of Surf Based on Best Practices from the Field No need for presentation framework i.e. Portal Container Working on Web Studio – IDE for Surf Expected Soon No Java Coding Requires All lightweight scripting – Freemarker and JavaScript Ability to manage this in AVM Alfresco Share Build on Surf Platform Uses Alfresco Repository as Storage In Alfresco Labs 3B – Available Now
Learning Alfresco Surf Renderers Build a component Learn about remoting Site Dispatching Build a site Learn about site composition Put it all together See if we can do something cool
Further Info Overview -  http://wiki.alfresco.com/wiki/Surf_Platform Developer's Guide - http://wiki.alfresco.com/wiki/Surf_Platform_-_Developers_Guide Surf FreeMarker & JavaScript API http://wiki.alfresco.com/wiki/Surf_Platform_-_Freemarker_Template_and_JavaScript_API A few Dashlets http://drquyong.com/myblog Web Scripts Review http://wiki.alfresco.com/wiki/Web_Scripts

More Related Content

PDF
Tech talk live alfresco web editor [compatibility mode]
PDF
Alfresco Tech Talk Live-Web Editor - 3.3
PDF
Spring In Alfresco Ecm
PDF
Developing html5 mobile applications using cold fusion 11
PDF
DOC
Tutorial asp.net
PPSX
ASP.NET Web form
PPTX
New Features of ASP.NET 4.0
Tech talk live alfresco web editor [compatibility mode]
Alfresco Tech Talk Live-Web Editor - 3.3
Spring In Alfresco Ecm
Developing html5 mobile applications using cold fusion 11
Tutorial asp.net
ASP.NET Web form
New Features of ASP.NET 4.0

What's hot (20)

PPTX
Asp.net presentation by gajanand bohra
PPTX
Building ColdFusion And AngularJS Applications
PPT
Asp.net
PDF
Externalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIs
PDF
Hidden Gems in ColdFusion 2016
PDF
The future of web development write once, run everywhere with angular js an...
PPTX
Integrate any Angular Project into WebSphere Portal
PPTX
JavaScript on HP webOS: Enyo and Node.js
PDF
Joe Staner Zend Con 2008
PPT
Concepts of Asp.Net
PPTX
1 app 2 developers 3 servers
PDF
Low-Code Testing Tool
PDF
BP-7 Share Customization Best Practices
PPTX
Developing an aspnet web application
PDF
Building Mobile Friendly APIs in Rails
PDF
Oracle ADF Task Flows for Beginners
PPTX
Learning ASP.NET 5 and MVC 6
PDF
CUST-2 New Client Configuration & Extension Points in Share
PDF
CUST-10 Customizing the Upload File(s) dialog in Alfresco Share
PPTX
PHP on Windows
Asp.net presentation by gajanand bohra
Building ColdFusion And AngularJS Applications
Asp.net
Externalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIs
Hidden Gems in ColdFusion 2016
The future of web development write once, run everywhere with angular js an...
Integrate any Angular Project into WebSphere Portal
JavaScript on HP webOS: Enyo and Node.js
Joe Staner Zend Con 2008
Concepts of Asp.Net
1 app 2 developers 3 servers
Low-Code Testing Tool
BP-7 Share Customization Best Practices
Developing an aspnet web application
Building Mobile Friendly APIs in Rails
Oracle ADF Task Flows for Beginners
Learning ASP.NET 5 and MVC 6
CUST-2 New Client Configuration & Extension Points in Share
CUST-10 Customizing the Upload File(s) dialog in Alfresco Share
PHP on Windows
Ad

Viewers also liked (8)

PPTX
Presentation2
PPTX
Alfresco architecture-overview
PPT
Alfresco Architecture
PDF
Alfresco Day Amsterdam 2015 - Alfresco One Product Suite Update + Demo
PPT
Alfresco As SharePoint Alternative - Architecture Overview
PDF
Developer’s intro to the alfresco platform
PPTX
Sizing your alfresco platform
PDF
Alfresco one 5.1_on-premises_reference_architecture
Presentation2
Alfresco architecture-overview
Alfresco Architecture
Alfresco Day Amsterdam 2015 - Alfresco One Product Suite Update + Demo
Alfresco As SharePoint Alternative - Architecture Overview
Developer’s intro to the alfresco platform
Sizing your alfresco platform
Alfresco one 5.1_on-premises_reference_architecture
Ad

Similar to Introduction to Alfresco Surf Platform (20)

PPTX
Spring Surf 101
PPT
CAF & Portlet Development Notes
PPT
Creating Yahoo Mobile Widgets
PPT
Intro To Asp Net And Web Forms
PPT
Asp.net architecture
PPT
Flex_rest_optimization
PPT
Web services - REST and SOAP
PPT
Websites Unlimited - Pay Monthly Websites
PPT
Fundamentals of web_design_v2
PPTX
Introduction to ASP.NET
PPT
Decoding the Web
PPT
Ibm
PPT
Internet Explorer 8 for Developers by Christian Thilmany
PPTX
SharePoint 2010 Application Development Overview
PPT
Silver Light By Nyros Developer
PPT
Red5 - PHUG Workshops
PPT
Spring MVC
PPT
Ajax to the Moon
PPT
Aspnet2 Overview
Spring Surf 101
CAF & Portlet Development Notes
Creating Yahoo Mobile Widgets
Intro To Asp Net And Web Forms
Asp.net architecture
Flex_rest_optimization
Web services - REST and SOAP
Websites Unlimited - Pay Monthly Websites
Fundamentals of web_design_v2
Introduction to ASP.NET
Decoding the Web
Ibm
Internet Explorer 8 for Developers by Christian Thilmany
SharePoint 2010 Application Development Overview
Silver Light By Nyros Developer
Red5 - PHUG Workshops
Spring MVC
Ajax to the Moon
Aspnet2 Overview

More from Alfresco Software (20)

PPTX
Alfresco Day Benelux Inholland studentendossier
PPTX
Alfresco Day Benelux Hogeschool Inholland Records Management application
PPTX
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
PPTX
Alfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
PPTX
Alfresco Day BeNelux: The success of Alfresco
PDF
Alfresco Day BeNelux: Customer Success Showcase - Credendo Group
PDF
Alfresco Day BeNelux: Digital Transformation - It's All About Flow
PDF
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
PDF
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
PDF
Alfresco Day Vienna 2016: Alfrescos neue Rest API
PDF
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
PDF
Alfresco Day Vienna 2016: Entwickeln mit Alfresco
PDF
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
PDF
Alfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
PDF
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
PDF
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novum
PDF
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
PDF
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
PDF
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
PDF
Alfresco Day Warsaw 2016: Advancing the Flow of Digital Business
Alfresco Day Benelux Inholland studentendossier
Alfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
Alfresco Day BeNelux: The success of Alfresco
Alfresco Day BeNelux: Customer Success Showcase - Credendo Group
Alfresco Day BeNelux: Digital Transformation - It's All About Flow
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
Alfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Alfresco Day Vienna 2016: Entwickeln mit Alfresco
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
Alfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novum
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
Alfresco Day Warsaw 2016: Advancing the Flow of Digital Business

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
sap open course for s4hana steps from ECC to s4
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
KodekX | Application Modernization Development
PDF
Approach and Philosophy of On baking technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Electronic commerce courselecture one. Pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Cloud computing and distributed systems.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation theory and applications.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
sap open course for s4hana steps from ECC to s4
The AUB Centre for AI in Media Proposal.docx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine learning based COVID-19 study performance prediction
Diabetes mellitus diagnosis method based random forest with bat algorithm
Programs and apps: productivity, graphics, security and other tools
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
KodekX | Application Modernization Development
Approach and Philosophy of On baking technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Electronic commerce courselecture one. Pdf
Chapter 3 Spatial Domain Image Processing.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Cloud computing and distributed systems.
20250228 LYD VKU AI Blended-Learning.pptx
Digital-Transformation-Roadmap-for-Companies.pptx

Introduction to Alfresco Surf Platform

  • 1. Introducing Alfresco Surf Platform Jean Barmash Director, Technical Services
  • 2. Agenda Introduction to Surf Single Tier Surf Applications Templates Pages Components Demo - Create New Page Two Tier Surf Applications Remote Connectors Demo – Remote Component (Little bit) Share and Future of Surf Q & A
  • 3. What is Surf? Page Layout and Component Framework for Creating Web Apps Highly Extensible & Customizable Many Programming Options, but Plays Nicely with Web Scripts Separate Application No Dependencies On Alfresco Repository However, Allows Two Tiered Applications Ability to Call Remote Web Services (i.e. REST) Alfresco Repository as Backend &quot;Model&quot; Mashup
  • 4. Take a Page navigation
  • 5. Split it Up Into Template + Components box1 box2 box2 content navigation footer global scope
  • 6. Alfresco Surf Design Objectives Lightweight and Scriptable Web Scripts for User Interface Easy to Customize XML Configuration files Works with Alfresco WCM Read and write from AVM stores Site Construction Model / Component model Provided out-of-the-box and extensible Site Dispatcher Provided out-of-the-box and extensible Developer API
  • 7. Single Tier Architecture Presentation Tier Alfresco Surf-Powered Application Web Script Runtime FreeMarker Processor Spring Some 3 rd party libraries Model View Controller Model Objects Template Page Component Other – Theme, Site Coniguration, Page Associations, etc.
  • 8. Model-View-Controller Two Levels Template (Page) Component Both Have Renderers Page Renderer Renderer Renderer Renderer
  • 9. Renderers Different Methods to Generate Output Typically HTML Markup based on the Model Out of the Box Renderers FreeMarker Templates Web Script Java Bean JSP Web Scripts The most common and most powerful rendering facility No Java coding, no server restarts Rich underlying API for easy extension Most Surf Components will be written using Web Scripts! Can Build Your Own Renderers
  • 10. Renderer Root Scoped Objects To Access the Model, Renderers Have These Objects Exposed context The request context user The current user content The content object being rendered instance The renderer instance (equivalent of &quot;this&quot;) sitedata Site Construction helper remote Connection management helper
  • 11. Page Dispatching Logic Execute the Template Renderer for path: /surf/home FreeMarker renderer /WEB-INF/classes/alfresco/templates/sample/home.ftl Regions have Scopes Page Template Global Execute the region tag and find matching components /WEB-INF/classes/alfresco/site-data/components Search for components in page scope, bound to home page for the region ‘ test ’ page.test.home.xml <html> <body> <@region id=“ test ” scope=“ page ” /> </body> </html>
  • 12. Site Data /WEB-INF/classes/alfresco /site-data /chrome /components /component-types /configurations /content-associations /page-associations /pages /page-types /template-instances /template-types /themes Note: bolded elements are the ones where developers spend most of their time
  • 14. Page Dispatching LifeCycle Example: Hitting the home page http://testserver:8080/sample/page?p=home Look up Page Home (in /site-data/pages) Page XML has a template reference Look up Template (in /site-data/templates) Look up Renderer for Template – FTL file Process FTL, and Regions in Template by Id Find Component Bindings for those region ids based on scope Component Definitions (in /site-data/components) Component XMLs Define Component Renderers
  • 15. Additional Elements Associations Page Association Content Association Site Configuration Theme Chrome
  • 16. Demo - Create a Page - 1 Use Existing Page Template Newpage.xml in site-data\pages\ <?xml version='1.0' encoding='UTF-8'?> <page> <title>New Page</title> <template-instance>landing</template-instance> <authentication>none</authentication> </page> View New Page http://localhost:8080/surf/page?f=default&p=newpage
  • 17. Demo - Create a Page - 2 &quot;Landing&quot; Template has Region &quot;Content&quot; that's not defined Add New Components that haven't been added page.content.newpage.xml site-data\components\ <?xml version='1.0' encoding='UTF-8'?> <component> <scope>page</scope> <region-id>content</region-id> <source-id>newpage</source-id> <url>/blocks/image</url> <properties> <src>${url.context}/images/age/palanga.jpg</src> </properties> </component> Using OOB Web Script /blocks/image /blocks/include
  • 18. Demo - Create a Page - 3 Now Let's Add this to Navigation – Page Association Add home-newpage.xml in site-data\page-associations <?xml version='1.0' encoding='UTF-8'?> <page-association> <source-id>home</source-id> <dest-id>newpage</dest-id> <assoc-type>child</assoc-type> <order-id>5</order-id> </page-association>
  • 19. Additional Surf Capabilities Infrastructure Elements – Site Dispatcher Site Configuration Page Dispatching Link Builders Page Mappers I18N Remote Connections
  • 20. Agenda Introduction to Surf Single Tier Surf Applications Templates Pages Components Demo - Create New Page Two Tier Surf Applications Remote Connectors Demo – Remote Component (Little bit) Share and Future of Surf Q & A
  • 21. Two Tier Architecture Presentation Tier Alfresco Surf-Powered Application Web Script Runtime FreeMarker Processor Spring Some 3 rd party libraries Repository (Data) Tier Alfresco Repository REST Interface to outside world Web Script Runtime FreeMarker Processor Spring Hibernate 3 rd party libraries
  • 22. Uses Web Scripts Web Scripts Lightweight scriptable REST framework Multiple uses Roll your own API Create new UI components Create portlets/widgets Expose WCM/AVM features Script-based implementation Server-side JavaScript Freemarker Limited only by your imagination Integration: Create a mashup Search: Exposed to other systems. Rich Internet Applications Cross-language Cross-platform JavaScript (Controller) Freemarker (View) Alfresco Repository (Model) Consumer / Client
  • 23. Surf - Two Tiers Remote Repository (Model) JavaScript (Controller) Freemarker (View) Alfresco Repository (Model) JavaScript (Controller) Freemarker (View) Remote Data Model Data (Repository) Tier Consumer / Client
  • 24. Two Tier Architecture Connectors Model Objects Pages Templates Components Themes Associations JSON Web Scripts Repository CMIS Social UI JSON Content Graph Documents Folders Associations Aspects Presentation Tier Repository Tier Spring REST Web Scripts FreeMarker Dispatcher Surf
  • 25. Web Scripts Presentation Web Scripts Web Scripts on the Presentation Tier Responsible for generating markup (HTML) Isolated from Alfresco Repository Model context purely derived from framework (no “document”) Can call over to Alfresco using “remote” variable Data Web Scripts Web Scripts on the Repository Tier Responsible for generating JSON, XML (ATOM) or other serialized data format Wired into the Alfresco Repository Context includes Alfresco Repository elements (“document”)
  • 26. Root-scoped: remote ScriptRemote A remote connection helper Access to Alfresco Web Framework remoting faciltiies Stateless Connections Stateful Connections (scoped to user) Credential Management and Binding (stateful) Credential Vault (persistent and non-persistent) Customizable (XML config driven)
  • 27. Remoting Configurations Get a connector for a given endpoint Endpoints any arbitrary id defines connection information to the remote location Connector knows how to “talk” with specific types of back end servers Authenticator knows how to “handshake” for authentication with back end servers Alfresco Ticket, MediaWiki, WordPress, etc. Endpoint Authenticator Connector
  • 28. Remoting Configurations Endpoint Connectors Authenticators HTTP alfresco RMI Alfresco www.wikipedia.org mediawiki wordpress alfresco.com
  • 29. Remote Configuration Endpoints Endpoints Properties id Defines the endpoint ID to be “alfresco” connector-id The id of the connector to use when connecting endpoint-url The base URL for the connection identity How to manage user connection state (user, none) <config evaluator=&quot;string-compare&quot; condition=&quot;Remote&quot;> <remote> <endpoint> <id> alfresco </id> <name>Alfresco - user access</name> <connector-id> alfresco </connector-id> <endpoint-url> http://localhost:8080/alfresco/s </endpoint-url> <identity> user </identity> </endpoint> </remote> </config>
  • 30. Remote Configuration Connectors Connectors Properties id Defines the connector ID to be “alfresco” class The Java implementation class name authenticator-id The id of the authenticator to use when authenticating <config evaluator=&quot;string-compare&quot; condition=&quot;Remote&quot;> <remote> <connector> <id> alfresco </id> <name>Alfresco Connector</name> <class> org.alfresco.connector.AlfrescoConnector </class> <authenticator-id> alfresco-ticket </authenticator-id> </connector> </remote> </config>
  • 31. Walk Through Remote Weather Component
  • 32. Remote Weather Component Web Script Uses HTTP EndPoint to Connect to Yahoo Weather Service No Authentication Required Page Weather calls the Web Script
  • 33. Advantages of Surf Based on Best Practices from the Field No need for presentation framework i.e. Portal Container Working on Web Studio – IDE for Surf Expected Soon No Java Coding Requires All lightweight scripting – Freemarker and JavaScript Ability to manage this in AVM Alfresco Share Build on Surf Platform Uses Alfresco Repository as Storage In Alfresco Labs 3B – Available Now
  • 34. Learning Alfresco Surf Renderers Build a component Learn about remoting Site Dispatching Build a site Learn about site composition Put it all together See if we can do something cool
  • 35. Further Info Overview - http://wiki.alfresco.com/wiki/Surf_Platform Developer's Guide - http://wiki.alfresco.com/wiki/Surf_Platform_-_Developers_Guide Surf FreeMarker & JavaScript API http://wiki.alfresco.com/wiki/Surf_Platform_-_Freemarker_Template_and_JavaScript_API A few Dashlets http://drquyong.com/myblog Web Scripts Review http://wiki.alfresco.com/wiki/Web_Scripts

Editor's Notes