Nuxeo EP 5 - A Seam Case Study

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    4 Favorites

    Nuxeo EP 5 - A Seam Case Study - Presentation Transcript

    1. Nuxeo EP 5 Open Source Enterprise Content Management A Seam Case Study Thierry Delprat, CTO tdelprat@nuxeo.com
    2. Agenda • What is Nuxeo 5? – Architecture overview • Nuxeo 5 EP – Challenges and requirements of the Web UI front-end • Nuxeo 5 and Seam – How we use Seam to build Nuxeo 5 EP 2
    3. Nuxeo 5 – Solution Overview • An Open Source ECM solution – EDM, WF/BPM, Collaboration, WCM ... • A platform for building custom ECM solutions – Generic services with an « extension and customization » model – A framework for building ECM applications • The Java 5 version of CPS 3.4 – Keep the proven concepts of Zope/CPS (2000 -> 2006) – Leverage the Java 5 infrastructure • A multi-platform and multi-target ECM solution – Thin client: Java EE Web application – Nuxeo 5 EP – Rich client: Eclipse RCP application – Nuxeo 5 RCP – Client/Server: RCP client with JEE server 3
    4. Nuxeo 5 – Architecture Overview • Core Layer: Embeddable document repository – Storage-oriented services + plugin model – Repository API: POJO and ejb3 • Service Layer: a extensible set of ECM services – Generic and con gurable services + extension model – Services API: POJO and ejb3 • Client Layer: UI management – Links services together to achieve business speci c needs – Uses Services Layer and Core Layer API – Clients can be • Web application • RCP Application • Flex client 4
    5. Nuxeo 5 – « 10 000 feet view » Audit Service Nuxeo Core Query Management Web Application WF and BPM Service LifeCycle Management EJB EJB Relation Service Security Management APIs APIs Versions management RCP Application Transformation Service Schemas Management POJO POJO Directory Service Nuxeo Core (Content Repository) Flex Application Indexation Service Storage adapter JCR/Jackrabbit NXRuntime JBoss (JMX) or Eclipse RCP (OSGi) 5
    6. Nuxeo 5 EP - Web UI The web client on top of Nuxeo 5 EP services What are the requirements Why we choose JSF and JBoss Seam 6
    7. Requirements > Generation engine • Powerful templating system – Want to keep a templating engine with a composition system • MVC model, Widget and Layout system – Clear separation of concerns (Presentation / Validation / Model) – Reusable and customizable widgets (like in CPS) – Complete layout system like with CPSSkins • Not tied to HTML – Keep the possibility to generate non HTML data (ie : XForm) 7
    8. Requirements > Why JSF & Facelets? • Great standard even if complex – Java EE Standard – Very pluggable and extensible (EL Binding, Layout and Theme manager) • Growing libraries of Widgets – from Ajax/HTML to DataModel • IDE support is growing • Facelets are close to Zope's PageTemplates (ZPT) – Templating and slot model – Pure presentation technology – Clean for designers 8
    9. Requirements > Web Framework • JSF and Facelets compliant • Cache aware state management – Each page rendering needs to fetch a lot of documents ➡But most documents are the same between two requests keep state of the user context – Data needs to be fresh and invalidated • Remote access to application’s controlers – Access via Ajax – Access via Browser helper – Access via O ce Plugin 9
    10. Requirements > Web Framework • Seamless EJB3 integration – Easy access to EJB3 Nuxeo EP Services – JSF binding • Loosely coupled UI and application components – Nuxeo 5 must provide hot-pluggable Web components • Shared context • Dependencies injections • Events system • Multiscreen and wizards management – ECM provides a lot of use cases – Manual page ow management is boring 10
    11. Nuxeo 5 Web Framework > Why Seam ? • Seam provides a lot of the needed features “out of the box” – Native EJB3 integration – Bijection – Seam context management – Seam remoting and Ajax4JSF integration – Page ows via JBPM integration • Good t with other selected infrastructure components – JBoss AS, jBPM and JSF • Great project! :-) – Good references of Seam’s lead developers – The right vision for a web framework • New, modern and evolving framework 11
    12. Nuxeo 5 and Seam How we use Seam in Nuxeo 5 EP 12
    13. Nuxeo 5 & Seam > Context Management Usage • Partial content location tree => Seam context Server – Read placeful con guration Users Domain Documents • UI Theme & Perspective con guration Workspace Theme • User Noti cation – Retrieve data to display Current Document Children • Current working context => Seam context – Current document and children Shared Context – Clipboard (cut/copy/paste) MySelection – Working set of documents • Easy mass document management Clipboard 13
    14. Nuxeo 5 & Seam > Context Management Content • Seam context stores Document and lists of documents – DocumentModel is an artifact for a document and associated con guration • Lazy data fetching from the core • Lazy placeful con guration fetching – Services may contribute new facet of contextual data • Security descriptors, Relations informations, Subscription con guration, ... • Context variable are usually pulled via factory – Use of the Seam @Factory annotation – Use of @DataModel annotation to feed DataLists from context • Each component can access easily the contextual documents – Ask for injection via @In 14
    15. Nuxeo 5 & Seam > Context Management Injection & Outjection • Services get the current document by injection (AL base class) public abstract class InputController{ @In(required = true) protected ECServer ecServer; @In(required = true) protected ECDomain ecDomain; @In(required = true) protected ECContentRoot ecContentRoot; @In(required = false) protected DocumentModel currentItem; • Navigation controlers outject the currentDocument current children Factory Navigation tree Current security info Factory Breadcrumb Document Actions Actions relations info Actions Factory Actions 15
    16. Nuxeo 5 & Seam > Context Management Events and Invalidation • Context Invalidation – Dependent context variables update currentDocument => update currentDocumentChilds – Invalidation needs to • nullify the variable to get @Factory called the next time (lazy refresh) • call explicitly the factory – Dependencies are spread across components that don't know each others (distributed invalidation needed) • Seam messaging system is used to propagate context changes Events.instance().raiseEvent(EventNames.DOCUMENT_SELECTION_CHANGED); Component A @Observer( { EventNames.DOCUMENT_SELECTION_CHANGED, Component B EventNames.CONTENT_ROOT_CHILD_SELECTION_CHANGED, EventNames.DOCUMENT_CHANGED }) @Factory("documentResource") public void getDocumentResource() { documentResource = relationManager.getQNameResource(documentNamespace, currentItem); } 16
    17. Nuxeo 5 & Seam > Context Management Caching • “Stalled copies” problem – Long running contexts act as a cache (session/conversation) • invalidation needs to be propagated when changes occur (document edit, security update, new child ...) – There may be a lots of users using the same document • e cient to share the state of a document across user's contexts (Domain, Workspace, Folders, etc.) • Nuxeo 5 Cache and Context management – The documents are actually stored in JBoss cache • Cache is invalidated by core events – The context holds GhostDocumentModels or lists of Ghosts • acts as transparent stubs to the real DocumentModel in the shared cache 17
    18. Nuxeo 5 & Seam > Context Management Conversation • Nuxeo 5 uses nested conversations – Wizards – Temporary state management • The Seam Workspace Management is useful for Nuxeo 5 – like opening several File Explorers is parallel • Nuxeo 5 will use long running conversations – Parallel sessions that holds the navigation context – Use Seam Workspace Management to switch between contexts 18
    19. Nuxeo 5 & Seam JSF Limitations • JSF is a powerful UI model, but... – urls are not meaningful – open in new tab/window is broken by JS form submission ! – EL does not permit to send parameters • Nuxeo 5 needs meaningful urls – Accessibility and WCM – Bookmark a Document – Send a link to a document via Mail • Seam provides a helper for these problems – Integrate GET requests with JSF and Context – Bind requests parameters – Used by Nuxeo 5 to generate 'PermLink' for the documents – EL enhancements in latest Seam 19
    20. Nuxeo 5 & Seam jBPM Integration > Page ow • In ECM creation wizard are useful – Fill out all the properties of the complex document – Let user de ne di erent options during the creation process • Choose templates during the creation process • Assign roles to users – Optional ”step by step” interactive help • Nuxeo 5 uses Page ow for wizard – Complex screens series can be easily modelized – Make the application « agile » to t customer needs – Temporary state is easily handled by the Seam context 20
    21. Nuxeo 5 & Seam Integrated Remoting • Some Nuxeo 5 Seam Components are accessed remotely – ActionListener – Speci c Seam Components • By some PlugIns like LiveEdit – Use SOAP to integrate Nuxeo5 with MS O ce and OpenO ce • By the browser helpers (Firefox and IE) – Use Seam remoting to upload les by Drag&Drop • The theme Editor – Uses Seam remoting to edit the theme from AJAX WYSIWYG editor • Will be used for internal Drag&Drop and AJAX features – When Nuxeo 5 is aligned with latest Seam release (1.1) 21
    22. Nuxeo 5 & Seam Integrated Remoting > Examples Drag & Drop Drag & Drop les from the Desktop to the Browser ScreenCast Great User Experience for le upload! Firefox / Internet Explorer Win32 / MacOS / Linux Nuxeo Theme Editor Modify page layout from the browser using AJAX Add page fragments visually Basically: a WYSYWG UI editor for JSF web apps 22
    23. Nuxeo 5 & Seam Additional Views and Actions NXRelations NXAudit Contributed Views NXWork ow 23
    24. Nuxeo 5 & Seam Loosely coupled components • The Nuxeo 5 UI is build from several components – Base components (DocumentManager, SecurityManager ...) – Additional optional components • NXAuditClient • NXRelationClient • NXWork owClient • etc. • Each additional component uses NXRuntime extension points – to contribute Views • Facelets that provide a new view on Documents: AuditView, RelationView, TaskView, etc. – to contribute Action • Buttons or Links to achieve additional processing: Add a relation, Add a comment, Create a new folder, etc. 24
    25. Nuxeo 5 & Seam Loosely coupled components • Components share some state via the context – At least the currentDocument – Most ActionListers use @In to get some contextual documents • Components may notify each other – Usage of the @Observer to become an event listener • New components may be easily added – Only cares about the shared data and events • not “who” the other components are – New views can be added transparently 25
    26. Nuxeo 5 & Seam Factory for EJB3 • Each action listener needs to access one or more services of Nuxeo’s platform • Services are accessed via a Delegate Layer – Wraps remote or local calls • Delegates use the Seam component manager pattern – use @Unwrap to access services via a transparent Factory • Base components are created at application start-up – use @Startup to load services automatically • Base class of Action Listener provide compulsory services – contains @In to get all basic services 26
    27. Nuxeo 5 & Seam Components interactions @In / @Out / @Factory @Unwrap Delegate Facelet Action Listener Facelet Platform service Facelet (Seam Component) (Seam Component) Seam Seam Context NXAction Jboss Cache Events Conversation / Session NXCore events update / invalidate @Unwrap @In / @Out / @Factory Facelet Delegate Action Listener Facelet Facelet Platform service (Seam Component) (Seam Component) 27
    28. Nuxeo 5 & Seam > Conclusion • Seam – Provides a nice infrastructure for Nuxeo 5 web application – Helped us building Nuxeo 5 in a few months • Provides a great pluggable component model for the web layer – Easily de ne new ECM Actions • A lot of good perspectives – Align on Seam 1.1 in the next days – Leverage Seam and Ajax4JSF integration – Leverage Workspace Management – Leverage integration between • NXWork ow (JBPM based) • Seam Business Process Context 28
    29. ank you! www.nuxeo.com - contact@nuxeo.com - www.nuxeo.org
    30. Download & Enjoy! http://www.nuxeo.org/download www.nuxeo.com - contact@nuxeo.com - www.nuxeo.org

    + Stefane FermigierStefane Fermigier, 3 years ago

    custom

    10449 views, 4 favs, 1 embeds more stats

    A talk on the Nuxeo EP 5 open source enterprise con more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 10449
      • 10433 on SlideShare
      • 16 from embeds
    • Comments 0
    • Favorites 4
    • Downloads 0
    Most viewed embeds
    • 16 views on http://blogs.nuxeo.com

    more

    All embeds
    • 16 views on http://blogs.nuxeo.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories