SlideShare a Scribd company logo
1




   Riena/RCP Applications in the Web using RAP


                Christian Campo
                EclipseCon 2011 – March 22nd




                  Confidential | Date | Other Information, if necessary
März 23, 2011                                                                                        © 2002 IBM Corporation
                                          Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0
What is Riena again ?

        §  RCP based Framework
        §  Client / Server Applications
        §  Remote OSGi Service Support
        §  End-user focused Navigation Concept
        §  Promotes the separation of View and ViewController




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   2
End-user focused Navigation Concept ?




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   3
RCP started as the Eclipse IDE




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   4
RCP – Apps




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   5
UI Concepts used in Riena




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   6
UI Concepts for Views (=Workarea)



                          •  Model
                                 •  Data modeled in POJO or JavaBeans
                          •  View
                                 •  Widgets
                                 •  Layout
                                 •  Colors, Fonts
                          •  Controller
                              •  ActionListener, SelectionListener, DoubleClickListener
                                 •  Databinding Calls
                                    ActionListener, SelectionListener, DoubleClickListener
                                 •  use of Services (DI ?, OSGi Services)
                                    Databinding Calls
                                 •  use of Services (DI ?, OSGi Services)




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0         7
Many implementation of the same concept




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   8
Riena is also ...

        §  Equinox Security Support for Client / Server Environment
        §  Aimed at large Applications
                §  Avoid Boilerplate Code
                §  Make reoccurring tasks simple
                §  Manage the overall UI structure of the application
        §  Promotes the use of Dependency Injection for Services and
            Extensions using Annotations and API




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   9
What is RAP again ?

        §  RCP, JFace and Workbench for Webapplications
        §  Goals
                §  Any RCP App can be run in a Browser
                §  Single-sourcing (same source for desktop and web)
        §  By default a desktop client with a browser look
        §  Themeable
        §  API to convert Singletons into Session-Singletons




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   10
What is RAP again ?




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   11
Bring Riena and RAP together




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   12
Scalability – RCP/Riena


                                                                                            Riena Server
            Browser
             Browser                                   remote Service Calls
               Browser                                                                    stateless Services
                RCP/Riena
                Browser
                        Client




    •  one Session per JVM                                                             •  many worker threads
    •  many RCP Riena Clients                                                          •  stateless Services
    •  maintains Client state                                                          •  calls can take several
                                                                                          seconds




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0                               13
Scalability – RCP/Riena + RAP


                                                                 RAP Server                  Riena Server
            Browser
             Browser
               Browser                                         Session                     stateless Services
                Browser                                         Session
                  Browser                                         Session
                                                                   Session
                                                                     Session




    •  many Browser Clients                               •    one Session per User     •  many worker threads
                                                          •    short and quick calls    •  stateless Services
                                                          •    stateful                 •  calls can take several
                                                          •    maintains Client state      seconds
                                                          •    runs RCP Client code




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0                                14
Moving Client Code to the Webcontainer

        §  Identify all Singletons
                §  Some are REAL Singletons (ImageCache)
                §  Some need to become SessionSingletons
        §  Create Fragments for RCP/RAP specific code
                §  Create Facades to call one of the specific impl. at runtime
        §  Local (Client) OSGi Services
                §  should not maintain state
                §  should be reentrant
        §  If you are NOT on the UI Thread, its hard to get the correct
            Display instance i.e. in Jobs. (one Display instance per user)
        §  The GOAL is to SingleSource ! (one source for RCP and RAP)


Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   15
How to convert Singletons into SessionSingletons
   RCP
                                                                                       RAP
   public MySingleton {
                         public MySingleton extends SessionSingletonBase {
     private static MySingleton instance = new MySingleton();
                             private static MySingleton instance;
     public static MySingleton getInstance() {
            return instance; public static MySingleton getInstance() {
     }                               return (MySingleton)super.getInstance(MySingleton.class);
  }                          }
                         }
         public MySingleton {
 Riena
              private static SingletonProvider<MySingleton> ME = new
         SessionSingletonProvider<MySingleton>(MySingleton.class);

                     public static MySingleton getInstance() {
                            return ME.getInstance(MySingleton.class);
                     }
               }




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0         16
Creating Facades
                                                                                       Riena
                      // your code using the facades
       public class MyFacade {
                      MyFacade.getInstance().getText(myTextField);
   •  Sometimes you need different code on RCP and RAP
   •  Use a facade to abstract that
   •  Put the platform specific codeinstance = FacadeFactory.getFacade(MyFacade.class);
           private static MyFacade in a fragment

               public static MyFacade getInstance() {
                      return instance;
               }

               public abstract String getText(Text text);
                                                    public class MyFacadeRAP extends MyFacade {
         }
                                            public String getText(Text text) {
                                               ......
public class MyFacadeRCP extends MyFacade { }
                                       }
   public String getText(Text text) {
      ....
   }
}



Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0           17
Moving Riena Client to a Webcontainer

        §  Session -> SessionSingleton
                §  NavigationTreeModel
                §  Workarea (managing the Views attached to Navigation Tree Leafs)
                §  Security (logged User, Permissions, Sessionid)




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   18
One more thing....




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   19
UI Model Desktop -> Web                                                                Riena + RAP Client


   Riena Client




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0                        20
Existing Web Application




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   21
Bring the two together                                                 Menu




Navigation
Tree
                                                                                         Subapplication
                                                                                         Switcher




  Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0               22
...even on the iPad thanks to RAP




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0   23
§  If you want to move your Desktop Client to Web
                §  Understand the problem areas
                §  You need to possibly refactor and rework some of your code
                §  SingleSourcing as much as possible
        §  Contact
                §  http://www.eclipse.org/riena
                §  http://wiki.eclipse.org/Riena_Project
                §  riena-dev@eclipse.org
        §  RT BoF TONIGHT(Tuesday) 8:30 pm




Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0

More Related Content

PDF
Riena on-e4-ese2010
PDF
Swt qt econ-2010
PDF
Swt qt ese-2009
PDF
Riena on-rap-ese2010
PPTX
OSGi Versioning And Testing
PDF
Acceleo MTL Code Generation
PDF
Eclipse Rich Ajax Platform
ODP
Acceleo Day - Acceleo Mtl Code Generation
Riena on-e4-ese2010
Swt qt econ-2010
Swt qt ese-2009
Riena on-rap-ese2010
OSGi Versioning And Testing
Acceleo MTL Code Generation
Eclipse Rich Ajax Platform
Acceleo Day - Acceleo Mtl Code Generation

What's hot (9)

PPTX
Tycho Tutorial EclipseCon 2013
PPTX
Uml to code with acceleo
PDF
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
PPTX
Riena on Eclipse 4
PDF
Away3D update
PDF
Single sourcing using Rich Ajax Platform
PDF
Tizen Window System
PDF
Maven 3 / Tycho
PPTX
Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial EclipseCon 2013
Uml to code with acceleo
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
Riena on Eclipse 4
Away3D update
Single sourcing using Rich Ajax Platform
Tizen Window System
Maven 3 / Tycho
Tycho Tutorial (EclipseCon 2012)
Ad

Viewers also liked (20)

PPTX
Adp the big picture
PPTX
Listening
PPTX
خاص عشان الموقع
PDF
BIA/Kelsey 2014 Picks and Predictions
PDF
GI2015 ppt hoffmann_address_intro
DOC
Css tutorial
PDF
GI2014 ppt sredl+charvat layman – publish your data yourself
PDF
GI2010 symposium-longhorn (longhorn keynote-presentation_14_may)
PPTX
Media techs 4
PPTX
Lean spagettidiagram
KEY
Proposal Ideas and Research
PDF
GI2013 ppt mildorf+team_pprd_erra
PDF
Monografia Stragiudiziale Slacc
PPTX
The big picture
PDF
Swt qt ese2010
PPTX
Powerpoint on exsisting texts
PDF
«Небесный капитан и мир будущего»
PDF
GI2010 symposium-fencik (+kliment+tuchyna)
PDF
Hr business-process-outsourcing
PPTX
Online+: A standards-based approach to hybrid learning
Adp the big picture
Listening
خاص عشان الموقع
BIA/Kelsey 2014 Picks and Predictions
GI2015 ppt hoffmann_address_intro
Css tutorial
GI2014 ppt sredl+charvat layman – publish your data yourself
GI2010 symposium-longhorn (longhorn keynote-presentation_14_may)
Media techs 4
Lean spagettidiagram
Proposal Ideas and Research
GI2013 ppt mildorf+team_pprd_erra
Monografia Stragiudiziale Slacc
The big picture
Swt qt ese2010
Powerpoint on exsisting texts
«Небесный капитан и мир будущего»
GI2010 symposium-fencik (+kliment+tuchyna)
Hr business-process-outsourcing
Online+: A standards-based approach to hybrid learning
Ad

Similar to Riena onrap econ-2011 (20)

PDF
Unit 07: Design Patterns and Frameworks (2/3)
PPTX
Client Server Architecture
PDF
Building Server-Side Eclipse based web applications 2010
PDF
Web applicationsolutions
PDF
Web Application Solutions
PDF
SOA Difference FAQs
PDF
Rich Ajax Platform - theEdge 2012 conference presentation
PPT
Building+restful+webservice
PPTX
Net remoting
PDF
Vaadin 7 Today and Tomorrow
PDF
Improve your Developer Experiece using the WAS Liberty Profile with JRebel
PDF
Web Application Solutions
PDF
Building Server-Side Eclipse based web applications
PPTX
Five Cool Use Cases for the Spring Component in Oracle SOA Suite
PDF
Vaadin today and tomorrow
PDF
Dan Haywood
PDF
Jug Zurich Slides
PDF
SOA with Zend Framework
PDF
AD114 -- Beyond the Mobile Browser? Building Rich Mobile Applications for IBM...
PDF
GWT Jug Stuttgart
Unit 07: Design Patterns and Frameworks (2/3)
Client Server Architecture
Building Server-Side Eclipse based web applications 2010
Web applicationsolutions
Web Application Solutions
SOA Difference FAQs
Rich Ajax Platform - theEdge 2012 conference presentation
Building+restful+webservice
Net remoting
Vaadin 7 Today and Tomorrow
Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Web Application Solutions
Building Server-Side Eclipse based web applications
Five Cool Use Cases for the Spring Component in Oracle SOA Suite
Vaadin today and tomorrow
Dan Haywood
Jug Zurich Slides
SOA with Zend Framework
AD114 -- Beyond the Mobile Browser? Building Rich Mobile Applications for IBM...
GWT Jug Stuttgart

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Modernizing your data center with Dell and AMD
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Cloud computing and distributed systems.
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Machine learning based COVID-19 study performance prediction
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
Encapsulation theory and applications.pdf
Unlocking AI with Model Context Protocol (MCP)
“AI and Expert System Decision Support & Business Intelligence Systems”
Modernizing your data center with Dell and AMD
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Digital-Transformation-Roadmap-for-Companies.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectral efficient network and resource selection model in 5G networks
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Advanced methodologies resolving dimensionality complications for autism neur...
20250228 LYD VKU AI Blended-Learning.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Cloud computing and distributed systems.
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Machine learning based COVID-19 study performance prediction
NewMind AI Monthly Chronicles - July 2025
Mobile App Security Testing_ A Comprehensive Guide.pdf

Riena onrap econ-2011

  • 1. 1 Riena/RCP Applications in the Web using RAP Christian Campo EclipseCon 2011 – March 22nd Confidential | Date | Other Information, if necessary März 23, 2011 © 2002 IBM Corporation Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0
  • 2. What is Riena again ? §  RCP based Framework §  Client / Server Applications §  Remote OSGi Service Support §  End-user focused Navigation Concept §  Promotes the separation of View and ViewController Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 2
  • 3. End-user focused Navigation Concept ? Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 3
  • 4. RCP started as the Eclipse IDE Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 4
  • 5. RCP – Apps Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 5
  • 6. UI Concepts used in Riena Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 6
  • 7. UI Concepts for Views (=Workarea) •  Model •  Data modeled in POJO or JavaBeans •  View •  Widgets •  Layout •  Colors, Fonts •  Controller •  ActionListener, SelectionListener, DoubleClickListener •  Databinding Calls ActionListener, SelectionListener, DoubleClickListener •  use of Services (DI ?, OSGi Services) Databinding Calls •  use of Services (DI ?, OSGi Services) Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 7
  • 8. Many implementation of the same concept Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 8
  • 9. Riena is also ... §  Equinox Security Support for Client / Server Environment §  Aimed at large Applications §  Avoid Boilerplate Code §  Make reoccurring tasks simple §  Manage the overall UI structure of the application §  Promotes the use of Dependency Injection for Services and Extensions using Annotations and API Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 9
  • 10. What is RAP again ? §  RCP, JFace and Workbench for Webapplications §  Goals §  Any RCP App can be run in a Browser §  Single-sourcing (same source for desktop and web) §  By default a desktop client with a browser look §  Themeable §  API to convert Singletons into Session-Singletons Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 10
  • 11. What is RAP again ? Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 11
  • 12. Bring Riena and RAP together Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 12
  • 13. Scalability – RCP/Riena Riena Server Browser Browser remote Service Calls Browser stateless Services RCP/Riena Browser Client •  one Session per JVM •  many worker threads •  many RCP Riena Clients •  stateless Services •  maintains Client state •  calls can take several seconds Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 13
  • 14. Scalability – RCP/Riena + RAP RAP Server Riena Server Browser Browser Browser Session stateless Services Browser Session Browser Session Session Session •  many Browser Clients •  one Session per User •  many worker threads •  short and quick calls •  stateless Services •  stateful •  calls can take several •  maintains Client state seconds •  runs RCP Client code Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 14
  • 15. Moving Client Code to the Webcontainer §  Identify all Singletons §  Some are REAL Singletons (ImageCache) §  Some need to become SessionSingletons §  Create Fragments for RCP/RAP specific code §  Create Facades to call one of the specific impl. at runtime §  Local (Client) OSGi Services §  should not maintain state §  should be reentrant §  If you are NOT on the UI Thread, its hard to get the correct Display instance i.e. in Jobs. (one Display instance per user) §  The GOAL is to SingleSource ! (one source for RCP and RAP) Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 15
  • 16. How to convert Singletons into SessionSingletons RCP RAP public MySingleton { public MySingleton extends SessionSingletonBase { private static MySingleton instance = new MySingleton(); private static MySingleton instance; public static MySingleton getInstance() { return instance; public static MySingleton getInstance() { } return (MySingleton)super.getInstance(MySingleton.class); } } } public MySingleton { Riena private static SingletonProvider<MySingleton> ME = new SessionSingletonProvider<MySingleton>(MySingleton.class); public static MySingleton getInstance() { return ME.getInstance(MySingleton.class); } } Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 16
  • 17. Creating Facades Riena // your code using the facades public class MyFacade { MyFacade.getInstance().getText(myTextField); •  Sometimes you need different code on RCP and RAP •  Use a facade to abstract that •  Put the platform specific codeinstance = FacadeFactory.getFacade(MyFacade.class); private static MyFacade in a fragment public static MyFacade getInstance() { return instance; } public abstract String getText(Text text); public class MyFacadeRAP extends MyFacade { } public String getText(Text text) { ...... public class MyFacadeRCP extends MyFacade { } } public String getText(Text text) { .... } } Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 17
  • 18. Moving Riena Client to a Webcontainer §  Session -> SessionSingleton §  NavigationTreeModel §  Workarea (managing the Views attached to Navigation Tree Leafs) §  Security (logged User, Permissions, Sessionid) Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 18
  • 19. One more thing.... Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 19
  • 20. UI Model Desktop -> Web Riena + RAP Client Riena Client Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 20
  • 21. Existing Web Application Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 21
  • 22. Bring the two together Menu Navigation Tree Subapplication Switcher Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 22
  • 23. ...even on the iPad thanks to RAP Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 23
  • 24. §  If you want to move your Desktop Client to Web §  Understand the problem areas §  You need to possibly refactor and rework some of your code §  SingleSourcing as much as possible §  Contact §  http://www.eclipse.org/riena §  http://wiki.eclipse.org/Riena_Project §  riena-dev@eclipse.org §  RT BoF TONIGHT(Tuesday) 8:30 pm Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0