Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

of

OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 1 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 2 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 3 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 4 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 5 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 6 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 7 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 8 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 9 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 10 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 11 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 12 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 13 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 14 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 15 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 16 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 17 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 18 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 19 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 20 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 21 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 22 OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace  Slide 23
Upcoming SlideShare
OpenCms Days 2015 OpenCms X marks the spot
Next
Download to read offline and view in fullscreen.

0 Likes

Share

Download to read offline

OpenCms Days 2015 Creating Apps for the OpenCms 10 workplace

Download to read offline

The OpenCms Workplace in Version 10 will be rewritten using the popular Vaadin Framework. This new implementation also brings an improved interface to create Workplace extensions or “Apps” in OpenCms.

Apps in OpenCms 10 can be used for all kind of graphical Workplace extensions, for example to add use case specific management functions or to provide custom views on external data sources. By providing apps in OpenCms, developers can easily create Workplace dialogs and provide the content manager with a consistent user experience.

In this session, it is explained how to write apps for OpenCms 10. It is show what kind of configuration and extension points the new Workplace provides and how modules are created that extend the OpenCms user interface. It is also show how to migrate existing Workplace extensions to OpenCms 10.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

OpenCms Days 2015 Creating Apps for the OpenCms 10 workplace

  1. 1. Georg Westenberger, Alkacon Software GmbH Creating Apps for the OpenCms 10 workplace 28.09.2015
  2. 2. ●Vaadin Basics ●Writing and configuring apps ●Adding Explorer context menu items 2 Overview
  3. 3. ● Widget-based web GUI framework ● Only requires writing server-side Java code to add new functionality ● UI actions trigger AJAX requests to the server ● UI is updated when response received 3 OpenCms Workplace with Vaadin
  4. 4. ● Why not GWT? ● No dynamic loading of new code ● Need to recompile everything for any change ● Slow compilation ● Vaadin is based on GWT, but ● Only need to recompile client code if you want to add new widgets which aren‘t composed of existing widgets 4 OpenCms Workplace with Vaadin
  5. 5. VerticalLayout layout = new VerticalLayout(); layout.addComponent(new Label("Foo")); Button ok = new Button("OK"); layout.addComponent(ok); ok.addClickListener(new ClickListener() { public void buttonClick(ClickEvent event) { // do stuff } }); 5 Vaadin – GUI in Java code
  6. 6. <html> <body> <v-vertical-layout> <v-label>Hello world</v-label> <v-button _id="m_ok">OK</v-button> </v-vertical-layout> </body> </html> 6 Vaadin – Declarative layout
  7. 7. ● Live Demo Demo Demo Demo Demo Demo デモ Demo
  8. 8. ● For more documentation about Vaadin, see: https://vaadin.com/book 8 Vaadin Docs
  9. 9. ● Currently: ● Apps ● Context menu entries ● Not configured in opencms-*.xml files ● Instead: Plugins loaded from JARs ● Uses Java ServiceLoader API ● Avoids conflicts / problems when updating OpenCms ● Overridable (via ID & priority) 9 Workplace Extension Points
  10. 10. ●The API is not stable and likely to change until the final version 10 Warning!
  11. 11. 11 App Interfaces I_CmsWorkplaceAppConfiguration I_CmsWorkplaceApp I_CmsAppUIContext Paints widgets on Creates instance of Writes implementation Developer
  12. 12. ● Icon ● Opens dialog when clicked ● Title (localizable) ● ID ● Can override other app with same ID ● App dialog can also be opened directly by URL http://.../workplace#appid ● Order & Priority ● Category (currently only „Main“, „Legacy“) 12 App configuration class
  13. 13. ● Created by app configuration when user activates the app ● Respond to URI fragment changes ● onStateChange ● Make use of forward / back buttons in browser ● Example: current site & folder in explorer app ● Responsible for initializing the UI ● Use I_CmsAppUIContext for showing widgets in specific slots 13 App instance
  14. 14. App UI Context – Widget slots 14
  15. 15. ● Can use whole OpenCms API ● Get CmsObject for current user with A_CmsUI.getCmsObject() ● Change part of fragment after app ID with CmsAppWorkplaceUI.changeCurrentAppState(state) 15 API Access
  16. 16. ● Example: Git app ● Other apps currently hard-coded ● Using ServiceLoader mechanism to load app configurations: ● Compile your classes and put them in a JAR ● JAR needs to contain the following file with the class name(s) of your implementation(s): ● META-INF/services/org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration ● Copy JAR to WEB-INF/lib folder of OpenCms instance, restart servlet container 16 Registering an app
  17. 17. ● Ported from existing JSP ● Which can still be seen in „old“ Administration ● Simple UI flow: ● Form fields are filled with presets, changable by the user ● The user clicks on a button ● Some action is performed and the results are presented to the user 17 Git App
  18. 18. ● Live Demo Demo Demo Demo Demo Demo デモ Demo
  19. 19. ● Configure subclass of I_CmsContextMenuItemProvider ● Acts as factory for I_CmsContextMenuItem ● Difference from „old“ context menu configuration: ● No individual lists of menu options for each resource type ● But context menu items can choose for which resource types they should be displayed 19 Adding context menu items
  20. 20. ● Live Demo Demo Demo Demo Demo Demo デモ Demo
  21. 21. ● Still missing: ● „Standard“ widgets for OpenCms specific functions ● user / group selection ● Multi-value input fields ● … ● Reports for long-running tasks ● Bookmarks for app states ● More extension points ● More convenience for the developer 21 // TODO
  22. 22. ● Any Questions? Questions? Fragen? Questions ? Questiones? ¿Preguntas?質問
  23. 23. Georg Westenberger Alkacon Software GmbH http://www.alkacon.com http://www.opencms.org Thank you very much for your attention!

The OpenCms Workplace in Version 10 will be rewritten using the popular Vaadin Framework. This new implementation also brings an improved interface to create Workplace extensions or “Apps” in OpenCms. Apps in OpenCms 10 can be used for all kind of graphical Workplace extensions, for example to add use case specific management functions or to provide custom views on external data sources. By providing apps in OpenCms, developers can easily create Workplace dialogs and provide the content manager with a consistent user experience. In this session, it is explained how to write apps for OpenCms 10. It is show what kind of configuration and extension points the new Workplace provides and how modules are created that extend the OpenCms user interface. It is also show how to migrate existing Workplace extensions to OpenCms 10.

Views

Total views

1,161

On Slideshare

0

From embeds

0

Number of embeds

8

Actions

Downloads

24

Shares

0

Comments

0

Likes

0

×