Your SlideShare is downloading. ×
CUST-2 New Client Configuration & Extension Points in Share
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

CUST-2 New Client Configuration & Extension Points in Share

3,181

Published on

Video that accompanies this presentation at: http://www.youtube.com/watch?v=UNjn6bOJ308 …

Video that accompanies this presentation at: http://www.youtube.com/watch?v=UNjn6bOJ308

Spring Surf has been updated to allow increased customization and extensibility. This session will demonstrate how these capabilities can and have been used in Alfresco Share to add, remove and modify its appearance without needing to copy and paste code.

Published in: Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,181
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
131
Comments
0
Likes
6
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. New Client Configuration &Extension Points in Share! Dave Draper – UI Engineer – @_DaveDraper!
  • 2. Background & Goals!•  Alfresco Share was not originally intended as a platform•  Spring Surf did not provide any extension mechanism•  Difficult to identify use cases
  • 3. Goals!•  Ensure that Spring Surf continues to be compatible with previous Alfresco releases (i.e. Avoid branching)•  Minimize Share code changes•  Provide the ability to easily extend Share without copying and pasting code•  Provide extensions through simple JAR deployment
  • 4. Solution Overview!•  Two distinct approaches to extension o Customization by targeting existing files! o Customization through Component configuration!•  Creation of in-memory output model o Provides opportunity to amend default output! o Each FreeMarker template gets an output model! o Models can are nested!•  Introduction of Sub-Components o Solves 1-1 Region to Component mapping problem!
  • 5. File Customization!•  Works with Templates or WebScripts•  Can extend i18n properties, JavaScript controllers & FreeMarker templates•  FreeMarker extensions depend upon custom directives • <@region> & <@markup>! • Entirely abstract framework – scope for adding new directives!
  • 6. What Can You Do With This?!•  Modify Surf templates to add, remove, modify Component bindings•  Change display labels•  Modify the content displayed by updating the model
  • 7. Sub-Components!•  A Sub-Component maps to a WebScript•  Only AdvancedComponents support Sub- Components o Only Share v4.0 uses AdvancedComponents by default! o Configurable through Surf configuration!•  Legacy configuration conversion o Components become Sub-Components!•  Support for dynamic evaluation of parameters against request
  • 8. Sub-Component Evaluations!•  A Sub-Component can have zero or more Evaluations•  Each Evaluation can use zero or more Evaluators•  If all Evaluators are successful then Evaluation overrides Sub-Component defaults•  WebScript URL, properties and index can be overridden
  • 9. What Can You Do With This?!•  Add, remove and modify the content within a Component•  Have a Component display different content dynamically based on request information (e.g. The Site being accessed, the current User)•  Re-order Sub-Components
  • 10. Extensions & Modules!•  An “Extension” can contain zero or more “Modules”•  An Extension can be configured within the application (e.g. Portlet extension) or externally in a JAR (e.g. RM extension)•  Two deployment modes “auto” and “manual” (manual is default)•  Default module configuration can be overridden when deployed•  Modules can be dynamically deployed and removed without server restart.
  • 11. Benefits!•  Easy to add new coarse grained content to existing Share pages•  Easy to override i18n properties for WebScripts•  Scope for future enhancements using in-memory output model (i.e. new FreeMarker directives)
  • 12. Restrictions!•  Still difficult to extend JavaScript widgets for fine grained changes•  Limited use of <@markup> directive in Share•  Sub-Component extensions only work with WebScripts•  Limited control over module overrides at deployment
  • 13. Additional Tooling!•  “SurfBug”: identifies the Spring Surf elements on each page: o Sub-Components & Component bindings, properties & evaluation results! o Contributing file paths! o WebScript information! o Customization data (i.e. use of extensibility directives)!
  • 14. Demo!
  • 15. Adding New Content (Method 1)
  • 16. Create some content... WebScript Descriptor WebScript Template
  • 17. Target Area Of Share...
  • 18. Define new Sub-Component...
  • 19. Deploy Module...
  • 20. Result...
  • 21. Hiding Existing Content (Method 1)
  • 22. Target Sub-Component to hide...
  • 23. Result...
  • 24. Conditional Hide
  • 25. Create an Evaluator...
  • 26. Make the Evaluator a Spring Bean...org.springframework.extensions.surf.spring-surf- extensibility-context.xml
  • 27. Specify the Evaluator...
  • 28. Result...
  • 29. Adding New Content (Method 2)
  • 30. Target a TemplateInstance...
  • 31. Define a customization...
  • 32. Create the customization file... (in specified package)
  • 33. Define a Component to bind to new Region...(re-using the WebScript from the earlier example to provide content)
  • 34. Result...
  • 35. Hiding Existing Content (Method 2)
  • 36. Remove the Region...Other actions are available... “after” “modify”
  • 37. Override i18n Properties
  • 38. Find the property...
  • 39. Define a customization...
  • 40. Create the customization file...Note that the location of a WebScript customization is at a different path root than for TemplateInstance customizations!
  • 41. Result...
  • 42. Override JavaScript Controller
  • 43. Identify JavaScript model properties...
  • 44. Define a customization...
  • 45. Create The Customization File...
  • 46. Result...
  • 47. Other Customizations...•  Re-order entire pages (add + remove regions)•  Auto readme (see Blog post)•  PeerBind Chat Service (see David Webster’s blog)•  Resource Management module•  Portlet module•  ...
  • 48. Roadmap...•  Dependency directives•  <@widget> directive•  Make JavaScript widgets easier to extend•  Auto-compress and collate JavaScript and CSS resources•  ...
  • 49. Additional Reading!•  Lots more in-depth information and tutorials available at: http://blogs.alfresco.com/wp/ddraper•  Alfresco Surf Development Forum•  More blogs to come!
  • 50. Questions?!

×