SlideShare uma empresa Scribd logo
1 de 34
Baixar para ler offline
Spring Surf & Web Scripts!
Dave Draper – UI Engineer - @_DaveDraper!
History lesson...
2007
  • Alfresco 2.0 introduces first REST API (early WebScripts concepts)!
  • Alfresco 2.1 introduces WebScripts!
     • REST framework, JSR-311 (Jax-RS) URI Index!
     • Scriptable controllers (or backed by Spring Java Beans)!
     • FreeMarker template output (or Java output stream)!
2008
  • Alfresco Web Framework demo-ware (model objects, JSP, FTL)!
  • Alfresco Page Render (WebScripts as components on a page)!
  • Combined, productised and renamed to Surf!
  • Alfresco Share 3.0, 3.1 – Alfresco collaboration and DM – modern
   XHTML and Ajax based interface!
History lesson (cont)...
Early 2009
  • Alfresco Share 3.2!
  • First contact between Alfresco and Spring Source!
Late 2009
  • Alfresco Surf and WebScripts integrated with Spring MVC!
  • Alfresco Surf and WebScripts contributed as Spring Extension –
   Spring WebScripts and Spring Surf!
  • Alfresco Share 3.3 – refactored onto Spring WebScripts and Spring
   Surf!!
2010
  • 3 Milestones and RC1 release!
  • Alfresco Share 3.4 – using SpringSurf RC1!
History lesson (cont)...
2011
 • Alfresco Team!
 • New extensibility capabilities added!
 • Version 1.0.0 releases!
 • Alfresco Share 4.0!
What Are WebScripts?
• Services bound to a URIs which respond to
 HTTP methods such as GET, POST, PUT and
 DELETE!
• Support multiple formats (HTML, JSON & XML)!
• A framework for creating a REST API!
• Made up of descriptor, controller, properties,
 configuration and presentation files!
WebScripts!
• Descriptor (XML)
• Controller (JavaScript/Java Spring Bean)
• Response Formats (FreeMarker)
• I18N properties (Text)
• Configuration (XML)
Response Formats!
•  Available formats
 • HTML!
 • Text!
 • XML!
 • ATOM!
 • RSS!
 • JSON!
•  Set default in Descriptor (if more than one available)
•  Request by:
 • Extension (e.g. /script1.html, /script1.json, etc)!
 • Format request parameter (e.g. /script1?format=xml)!
Why Use Web Scripts?
•    Rapid development (no server restarts)
•    Separation of concerns (MVC)
•    Localization
•    Extensibility
•    FreeMarker and JavaScript
But What Is Spring Surf ?
•  An extension to Spring MVC
•  A set of controllers, resolvers and views
•  A way of breaking an HTML page into re-
   usable composite parts
•  An interface to the Alfresco Repository
•  The framework that underpins Alfresco
   Share
Example Spring Surf Objects
•    Pages
•    Template Instances
•    Regions
•    Chrome
•    Components
•    Sub-Components
Sub-­‐
  Component	
  
   Component	
  
     Region	
  
 Region-­‐Chrome	
  
  Components	
  
    Chrome	
  


Template-­‐Instance	
  
      Page	
  
Mistakes were made…
•    Chrome
•    Scopes
•    No Component nesting
•    1-1 Region/Component binding
•    Spring Roo
•    Tools
•    Difficult to match output to source
…but there is lots of good stuff !
•     Themes
•     Model Object stores (file system, classpath, remote,
      etc)
•     Presets / object creation
•     URI templates
•     Remote connections
•     Authentication
•     Extensibility
•     Endlessly configurable
What can you do with it?
• Rapid web-tier view composition – Spring MVC
 View Resolver!
• FreeMarker, JSP, Groovy, PHP pages!
• WebScript, FTL, JSP, Groovy, PHP components!
• Simple JavaScript, Groovy controllers!
• Remote API – REST request/response
 processing!
• WebScripts – standalone REST API tier!
• Portlets!
What you SHOULD do with it?!

 • Customize Alfresco Share!
 • Use WebScripts and FreeMarker!
 • Use JavaScript controllers!
 • Use Endpoints to contact an Alfresco Repository
  in standalone applications!
SOME USEFUL INFORMATION!
WebScript and Surf Object lookup!
Authentication (WebScripts & Surf Pages)!

•  Use <authentication> element
•  Available types:
 • “none”!
 • “guest”!
 • “user”!
 • “admin”!
•  Authenticates against Alfresco Repository
•  Can use “runas” property with WebScripts only
URI Templates (WebScripts)!

•  Use tokens in URL
 • e.g. “/x/{token1}/y/{token2}/z”!
•  Can define multiple URLs in single descriptor
•  Use “url.templateArgs” to access
 • ${url.templateArgs.token1}!
URI Templates (Surf Pages)!

•  Define “uri-template” in <alfresco-config> (e.g. “share-config-
   custom.xml)
  • Include {pageid} token for Page mapping!
  • Or ensure Page exists (e.g. Created through Preset)!
•  Use page.url.templateArgs to access tokens
  • e.g. ${page.url.templateArgs.token1}!
Surf Configuration!

•  Configuration object
   • Site home page!
   • Site theme!
•  Surf.xml
   • Object type implementations (e.g. AdvancedComponent)!
   • User factories!
   • Site configuration!
   • Chrome!
   • Page type (e.g. Login)!
   • Module Deployment!
•  Spring Application Context
   • Services (configuration loading, user factories, persistence, remote access, etc)!
   • Controllers (login controllers, etc)!
   • Interceptors!
Custom Home Page!

•  From:
   http://blogs.alfresco.com/wp/ddraper/2011/11/01/advanced-
   share-customization-part-1/
•  Optionally override <site-configuration> in “surf.xml”
  • Default is “slingshot.site.configuration”!
•  Set <root-page> property in Configuration object
Custom Login Page!
•  From:
   http://blogs.alfresco.com/wp/ddraper/2011/11/03/advanced-
   share-customization-part-2/
•  Create Page and Template-Instance objects for custom
   login page
•  Define new default “login” Page-Type object
Regions and Components
•         Regions define location into which Components can
          be bound
•         Binding done through region-id, source-id and
          scope
     o      Forced 1-1 bindings
     o      Flawed concept for Component switching
•         Sub-Components introduced as a workaround
•         Components SHOULD use ComponentType or
          Processor but are “optimized” to use WebScript
          URL
Remote API
• Connectors & Authenticators!
• XML configure access to “endpoints” – obtained
 by id!
• Access HTTP methods through JavaScript
 controller or Ajax via proxy controller!
• Endpoints hide the URL stem from scripts –
 authentication encapsulated by connectors and
 authenticators!
• Connect to multiple REST sources; alfresco,
 wiki, search!
Remote API – Example!
var conn = remote.connect("alfresco");
var json = conn.get("/api/products/" + args.filter);
if (json.status == 200)
{
   // Create JavaScript objects from the response
   var obj = eval('(' + json + ')');
   if (obj)
   {
      // Perform processing on the js objects
      // set results into the model for the template
      model.results = somearray;
   }
}
Model Object Stores
• Persisters – read model object definitions from
 classpath, WEB-INF, JARs!
• Alfresco legacy locations and Spring “friendly”
 locations!
  o Migration of Alfresco Surf 3.2 apps!
  o New locations require less files, folders!
• Read and write to remote location and local file
 system!
• Example - Alfresco Share stores pages and
 components for dynamic dashboards in the
 repository!
Component .head.ftl template!

•      Allow WebScripts to add JavaScript and CSS dependencies into
       HTML <head>
•      Use ${head} in Template Instance to output dependencies into
       <head>
•      Use <@script> to automatically switch between .js and –min.js



     <link rel="stylesheet" type="text/css" href="${page.url.context}/
       products/products.css" />
     <script src="${page.url.context}/products/products.js"></script>
Useful Runtime Tools
•  /service/index
 o    Browse WebScripts

 o    WebScript refresh

 o    SurfBug toggle
Roadmap!

•  Forking from Spring back into Alfresco
•  Continued development (more extensibility
   features, performance improvements)
•  Continued use in Alfresco projects
•  More blogging, forums and documentation
How do I use it?!

 • You CAN SVN checkout, maven build:
  https://src.springframework.org/svn/se-surf/trunk!
 • You SHOULD use Alfresco Community JARs
  when available!
Learn More!

•  Blog posts:
 • http://blogs.alfresco.com/wp/ewinlof/!
 • http://blogs.alfresco.com/wp/kevinr/!
 • http://blogs.alfresco.com/wp/ddraper/!
 • http://mindthegab.com/!
•  Alfresco Forum: “Surf Development”
Questions?!
PLAT-7 Spring Web Scripts and Spring Surf

Mais conteúdo relacionado

Mais procurados

An Intense Overview of the React Ecosystem
An Intense Overview of the React EcosystemAn Intense Overview of the React Ecosystem
An Intense Overview of the React EcosystemRami Sayar
 
CUST-10 Customizing the Upload File(s) dialog in Alfresco Share
CUST-10 Customizing the Upload File(s) dialog in Alfresco ShareCUST-10 Customizing the Upload File(s) dialog in Alfresco Share
CUST-10 Customizing the Upload File(s) dialog in Alfresco ShareAlfresco Software
 
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)daylerees
 
Oak, the architecture of Apache Jackrabbit 3
Oak, the architecture of Apache Jackrabbit 3Oak, the architecture of Apache Jackrabbit 3
Oak, the architecture of Apache Jackrabbit 3Jukka Zitting
 
SilverStripe From a Developer's Perspective
SilverStripe From a Developer's PerspectiveSilverStripe From a Developer's Perspective
SilverStripe From a Developer's Perspectiveajshort
 
LatJUG. JSF2.0 - The JavaEE6 Standard
LatJUG. JSF2.0 - The JavaEE6 StandardLatJUG. JSF2.0 - The JavaEE6 Standard
LatJUG. JSF2.0 - The JavaEE6 Standarddenis Udod
 
Webcomponents are your frameworks best friend
Webcomponents are your frameworks best friendWebcomponents are your frameworks best friend
Webcomponents are your frameworks best friendFilip Bruun Bech-Larsen
 
Web Application Frameworks (WAF)
Web Application Frameworks (WAF)Web Application Frameworks (WAF)
Web Application Frameworks (WAF)Ako Kaman
 

Mais procurados (19)

RESTful Services
RESTful ServicesRESTful Services
RESTful Services
 
WCM-7 Surfing with CMIS
WCM-7 Surfing with CMISWCM-7 Surfing with CMIS
WCM-7 Surfing with CMIS
 
An Intense Overview of the React Ecosystem
An Intense Overview of the React EcosystemAn Intense Overview of the React Ecosystem
An Intense Overview of the React Ecosystem
 
Node and Azure
Node and AzureNode and Azure
Node and Azure
 
Introduction to Monsoon PHP framework
Introduction to Monsoon PHP frameworkIntroduction to Monsoon PHP framework
Introduction to Monsoon PHP framework
 
RESTful Rails2
RESTful Rails2RESTful Rails2
RESTful Rails2
 
CUST-10 Customizing the Upload File(s) dialog in Alfresco Share
CUST-10 Customizing the Upload File(s) dialog in Alfresco ShareCUST-10 Customizing the Upload File(s) dialog in Alfresco Share
CUST-10 Customizing the Upload File(s) dialog in Alfresco Share
 
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
 
Agile sites2
Agile sites2Agile sites2
Agile sites2
 
Agile sites @ telmore
Agile sites @ telmore Agile sites @ telmore
Agile sites @ telmore
 
Building a spa_in_30min
Building a spa_in_30minBuilding a spa_in_30min
Building a spa_in_30min
 
Oracle APEX Nitro
Oracle APEX NitroOracle APEX Nitro
Oracle APEX Nitro
 
Oak, the architecture of Apache Jackrabbit 3
Oak, the architecture of Apache Jackrabbit 3Oak, the architecture of Apache Jackrabbit 3
Oak, the architecture of Apache Jackrabbit 3
 
SilverStripe From a Developer's Perspective
SilverStripe From a Developer's PerspectiveSilverStripe From a Developer's Perspective
SilverStripe From a Developer's Perspective
 
LatJUG. JSF2.0 - The JavaEE6 Standard
LatJUG. JSF2.0 - The JavaEE6 StandardLatJUG. JSF2.0 - The JavaEE6 Standard
LatJUG. JSF2.0 - The JavaEE6 Standard
 
A Day of REST
A Day of RESTA Day of REST
A Day of REST
 
Webcomponents are your frameworks best friend
Webcomponents are your frameworks best friendWebcomponents are your frameworks best friend
Webcomponents are your frameworks best friend
 
Laravel Meetup
Laravel MeetupLaravel Meetup
Laravel Meetup
 
Web Application Frameworks (WAF)
Web Application Frameworks (WAF)Web Application Frameworks (WAF)
Web Application Frameworks (WAF)
 

Semelhante a PLAT-7 Spring Web Scripts and Spring Surf

Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platformDeveloper’s intro to the alfresco platform
Developer’s intro to the alfresco platformAlfresco Software
 
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...J V
 
BP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesBP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesAlfresco Software
 
BP-7 Share Customization Best Practices
BP-7 Share Customization Best PracticesBP-7 Share Customization Best Practices
BP-7 Share Customization Best PracticesAlfresco Software
 
Rapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxRapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxMichael Hackstein
 
Alfresco overview EDM
Alfresco overview EDMAlfresco overview EDM
Alfresco overview EDMsang nguyen
 
Spring 3 - An Introduction
Spring 3 - An IntroductionSpring 3 - An Introduction
Spring 3 - An IntroductionThorsten Kamann
 
Share point development 101
Share point development 101Share point development 101
Share point development 101Becky Bertram
 
Advanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoAdvanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoFu Cheng
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformAntonio Peric-Mazar
 
PLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in GrailsPLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in GrailsAlfresco Software
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and ActivatorKevin Webber
 
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...Nicole Szigeti
 
Integrating Alfresco with Portals
Integrating Alfresco with PortalsIntegrating Alfresco with Portals
Integrating Alfresco with PortalsPiergiorgio Lucidi
 
WebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page AppsWebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page AppsPop Apps
 
Web Technologies in Java EE 7
Web Technologies in Java EE 7Web Technologies in Java EE 7
Web Technologies in Java EE 7Lukáš Fryč
 
CUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareCUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareAlfresco Software
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and ReactMike Melusky
 

Semelhante a PLAT-7 Spring Web Scripts and Spring Surf (20)

Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platformDeveloper’s intro to the alfresco platform
Developer’s intro to the alfresco platform
 
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
 
BP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesBP-9 Share Customization Best Practices
BP-9 Share Customization Best Practices
 
BP-7 Share Customization Best Practices
BP-7 Share Customization Best PracticesBP-7 Share Customization Best Practices
BP-7 Share Customization Best Practices
 
Rapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxRapid API Development ArangoDB Foxx
Rapid API Development ArangoDB Foxx
 
Alfresco overview EDM
Alfresco overview EDMAlfresco overview EDM
Alfresco overview EDM
 
Spring 3 - An Introduction
Spring 3 - An IntroductionSpring 3 - An Introduction
Spring 3 - An Introduction
 
Share point development 101
Share point development 101Share point development 101
Share point development 101
 
Advanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoAdvanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojo
 
Introduction to Flask Micro Framework
Introduction to Flask Micro FrameworkIntroduction to Flask Micro Framework
Introduction to Flask Micro Framework
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Laravel 4 presentation
Laravel 4 presentationLaravel 4 presentation
Laravel 4 presentation
 
PLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in GrailsPLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in Grails
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
 
Integrating Alfresco with Portals
Integrating Alfresco with PortalsIntegrating Alfresco with Portals
Integrating Alfresco with Portals
 
WebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page AppsWebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page Apps
 
Web Technologies in Java EE 7
Web Technologies in Java EE 7Web Technologies in Java EE 7
Web Technologies in Java EE 7
 
CUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareCUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in Share
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and React
 

Mais de Alfresco Software

Alfresco Day Benelux Inholland studentendossier
Alfresco Day Benelux Inholland studentendossierAlfresco Day Benelux Inholland studentendossier
Alfresco Day Benelux Inholland studentendossierAlfresco Software
 
Alfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day Benelux Hogeschool Inholland Records Management applicationAlfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day Benelux Hogeschool Inholland Records Management applicationAlfresco Software
 
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day BeNelux: Customer Success Showcase - Saxion HogescholenAlfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day BeNelux: Customer Success Showcase - Saxion HogescholenAlfresco Software
 
Alfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
Alfresco Day BeNelux: Customer Success Showcase - Gemeente AmsterdamAlfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
Alfresco Day BeNelux: Customer Success Showcase - Gemeente AmsterdamAlfresco Software
 
Alfresco Day BeNelux: The success of Alfresco
Alfresco Day BeNelux: The success of AlfrescoAlfresco Day BeNelux: The success of Alfresco
Alfresco Day BeNelux: The success of AlfrescoAlfresco Software
 
Alfresco Day BeNelux: Customer Success Showcase - Credendo Group
Alfresco Day BeNelux: Customer Success Showcase - Credendo GroupAlfresco Day BeNelux: Customer Success Showcase - Credendo Group
Alfresco Day BeNelux: Customer Success Showcase - Credendo GroupAlfresco Software
 
Alfresco Day BeNelux: Digital Transformation - It's All About Flow
Alfresco Day BeNelux: Digital Transformation - It's All About FlowAlfresco Day BeNelux: Digital Transformation - It's All About Flow
Alfresco Day BeNelux: Digital Transformation - It's All About FlowAlfresco Software
 
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...Alfresco Software
 
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...Alfresco Software
 
Alfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Vienna 2016: Alfrescos neue Rest APIAlfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Vienna 2016: Alfrescos neue Rest APIAlfresco Software
 
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Alfresco Day Vienna 2016: Support Tools für die Admin-KonsoleAlfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Alfresco Day Vienna 2016: Support Tools für die Admin-KonsoleAlfresco Software
 
Alfresco Day Vienna 2016: Entwickeln mit Alfresco
Alfresco Day Vienna 2016: Entwickeln mit AlfrescoAlfresco Day Vienna 2016: Entwickeln mit Alfresco
Alfresco Day Vienna 2016: Entwickeln mit AlfrescoAlfresco Software
 
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...Alfresco Software
 
Alfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
Alfresco Day Vienna 2016: Partner Lightning Talk: WesternacherAlfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
Alfresco Day Vienna 2016: Partner Lightning Talk: WesternacherAlfresco Software
 
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 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
 
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novum
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novumAlfresco Day Vienna 2016: Partner Lightning Talk - it-novum
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novumAlfresco Software
 
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...Alfresco Software
 
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...Alfresco Software
 
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - SafranAlfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - SafranAlfresco Software
 
Alfresco Day Warsaw 2016: Advancing the Flow of Digital Business
Alfresco Day Warsaw 2016: Advancing the Flow of Digital BusinessAlfresco Day Warsaw 2016: Advancing the Flow of Digital Business
Alfresco Day Warsaw 2016: Advancing the Flow of Digital BusinessAlfresco Software
 

Mais de Alfresco Software (20)

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

Último

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 

Último (20)

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 

PLAT-7 Spring Web Scripts and Spring Surf

  • 1. Spring Surf & Web Scripts! Dave Draper – UI Engineer - @_DaveDraper!
  • 2. History lesson... 2007 • Alfresco 2.0 introduces first REST API (early WebScripts concepts)! • Alfresco 2.1 introduces WebScripts! • REST framework, JSR-311 (Jax-RS) URI Index! • Scriptable controllers (or backed by Spring Java Beans)! • FreeMarker template output (or Java output stream)! 2008 • Alfresco Web Framework demo-ware (model objects, JSP, FTL)! • Alfresco Page Render (WebScripts as components on a page)! • Combined, productised and renamed to Surf! • Alfresco Share 3.0, 3.1 – Alfresco collaboration and DM – modern XHTML and Ajax based interface!
  • 3. History lesson (cont)... Early 2009 • Alfresco Share 3.2! • First contact between Alfresco and Spring Source! Late 2009 • Alfresco Surf and WebScripts integrated with Spring MVC! • Alfresco Surf and WebScripts contributed as Spring Extension – Spring WebScripts and Spring Surf! • Alfresco Share 3.3 – refactored onto Spring WebScripts and Spring Surf!! 2010 • 3 Milestones and RC1 release! • Alfresco Share 3.4 – using SpringSurf RC1!
  • 4. History lesson (cont)... 2011 • Alfresco Team! • New extensibility capabilities added! • Version 1.0.0 releases! • Alfresco Share 4.0!
  • 5. What Are WebScripts? • Services bound to a URIs which respond to HTTP methods such as GET, POST, PUT and DELETE! • Support multiple formats (HTML, JSON & XML)! • A framework for creating a REST API! • Made up of descriptor, controller, properties, configuration and presentation files!
  • 6. WebScripts! • Descriptor (XML) • Controller (JavaScript/Java Spring Bean) • Response Formats (FreeMarker) • I18N properties (Text) • Configuration (XML)
  • 7. Response Formats! •  Available formats • HTML! • Text! • XML! • ATOM! • RSS! • JSON! •  Set default in Descriptor (if more than one available) •  Request by: • Extension (e.g. /script1.html, /script1.json, etc)! • Format request parameter (e.g. /script1?format=xml)!
  • 8. Why Use Web Scripts? •  Rapid development (no server restarts) •  Separation of concerns (MVC) •  Localization •  Extensibility •  FreeMarker and JavaScript
  • 9. But What Is Spring Surf ? •  An extension to Spring MVC •  A set of controllers, resolvers and views •  A way of breaking an HTML page into re- usable composite parts •  An interface to the Alfresco Repository •  The framework that underpins Alfresco Share
  • 10. Example Spring Surf Objects •  Pages •  Template Instances •  Regions •  Chrome •  Components •  Sub-Components
  • 11. Sub-­‐ Component   Component   Region   Region-­‐Chrome   Components   Chrome   Template-­‐Instance   Page  
  • 12. Mistakes were made… •  Chrome •  Scopes •  No Component nesting •  1-1 Region/Component binding •  Spring Roo •  Tools •  Difficult to match output to source
  • 13. …but there is lots of good stuff ! •  Themes •  Model Object stores (file system, classpath, remote, etc) •  Presets / object creation •  URI templates •  Remote connections •  Authentication •  Extensibility •  Endlessly configurable
  • 14. What can you do with it? • Rapid web-tier view composition – Spring MVC View Resolver! • FreeMarker, JSP, Groovy, PHP pages! • WebScript, FTL, JSP, Groovy, PHP components! • Simple JavaScript, Groovy controllers! • Remote API – REST request/response processing! • WebScripts – standalone REST API tier! • Portlets!
  • 15. What you SHOULD do with it?! • Customize Alfresco Share! • Use WebScripts and FreeMarker! • Use JavaScript controllers! • Use Endpoints to contact an Alfresco Repository in standalone applications!
  • 17. WebScript and Surf Object lookup!
  • 18. Authentication (WebScripts & Surf Pages)! •  Use <authentication> element •  Available types: • “none”! • “guest”! • “user”! • “admin”! •  Authenticates against Alfresco Repository •  Can use “runas” property with WebScripts only
  • 19. URI Templates (WebScripts)! •  Use tokens in URL • e.g. “/x/{token1}/y/{token2}/z”! •  Can define multiple URLs in single descriptor •  Use “url.templateArgs” to access • ${url.templateArgs.token1}!
  • 20. URI Templates (Surf Pages)! •  Define “uri-template” in <alfresco-config> (e.g. “share-config- custom.xml) • Include {pageid} token for Page mapping! • Or ensure Page exists (e.g. Created through Preset)! •  Use page.url.templateArgs to access tokens • e.g. ${page.url.templateArgs.token1}!
  • 21. Surf Configuration! •  Configuration object • Site home page! • Site theme! •  Surf.xml • Object type implementations (e.g. AdvancedComponent)! • User factories! • Site configuration! • Chrome! • Page type (e.g. Login)! • Module Deployment! •  Spring Application Context • Services (configuration loading, user factories, persistence, remote access, etc)! • Controllers (login controllers, etc)! • Interceptors!
  • 22. Custom Home Page! •  From: http://blogs.alfresco.com/wp/ddraper/2011/11/01/advanced- share-customization-part-1/ •  Optionally override <site-configuration> in “surf.xml” • Default is “slingshot.site.configuration”! •  Set <root-page> property in Configuration object
  • 23. Custom Login Page! •  From: http://blogs.alfresco.com/wp/ddraper/2011/11/03/advanced- share-customization-part-2/ •  Create Page and Template-Instance objects for custom login page •  Define new default “login” Page-Type object
  • 24. Regions and Components •  Regions define location into which Components can be bound •  Binding done through region-id, source-id and scope o  Forced 1-1 bindings o  Flawed concept for Component switching •  Sub-Components introduced as a workaround •  Components SHOULD use ComponentType or Processor but are “optimized” to use WebScript URL
  • 25. Remote API • Connectors & Authenticators! • XML configure access to “endpoints” – obtained by id! • Access HTTP methods through JavaScript controller or Ajax via proxy controller! • Endpoints hide the URL stem from scripts – authentication encapsulated by connectors and authenticators! • Connect to multiple REST sources; alfresco, wiki, search!
  • 26. Remote API – Example! var conn = remote.connect("alfresco"); var json = conn.get("/api/products/" + args.filter); if (json.status == 200) { // Create JavaScript objects from the response var obj = eval('(' + json + ')'); if (obj) { // Perform processing on the js objects // set results into the model for the template model.results = somearray; } }
  • 27. Model Object Stores • Persisters – read model object definitions from classpath, WEB-INF, JARs! • Alfresco legacy locations and Spring “friendly” locations! o Migration of Alfresco Surf 3.2 apps! o New locations require less files, folders! • Read and write to remote location and local file system! • Example - Alfresco Share stores pages and components for dynamic dashboards in the repository!
  • 28. Component .head.ftl template! •  Allow WebScripts to add JavaScript and CSS dependencies into HTML <head> •  Use ${head} in Template Instance to output dependencies into <head> •  Use <@script> to automatically switch between .js and –min.js <link rel="stylesheet" type="text/css" href="${page.url.context}/ products/products.css" /> <script src="${page.url.context}/products/products.js"></script>
  • 29. Useful Runtime Tools •  /service/index o  Browse WebScripts o  WebScript refresh o  SurfBug toggle
  • 30. Roadmap! •  Forking from Spring back into Alfresco •  Continued development (more extensibility features, performance improvements) •  Continued use in Alfresco projects •  More blogging, forums and documentation
  • 31. How do I use it?! • You CAN SVN checkout, maven build: https://src.springframework.org/svn/se-surf/trunk! • You SHOULD use Alfresco Community JARs when available!
  • 32. Learn More! •  Blog posts: • http://blogs.alfresco.com/wp/ewinlof/! • http://blogs.alfresco.com/wp/kevinr/! • http://blogs.alfresco.com/wp/ddraper/! • http://mindthegab.com/! •  Alfresco Forum: “Surf Development”