Riena onrap econ-2011
Upcoming SlideShare
Loading in...5
×
 

Riena onrap econ-2011

on

  • 1,815 views

Riena on RAP talk from EclipseCon 2011

Riena on RAP talk from EclipseCon 2011

Statistics

Views

Total Views
1,815
Slideshare-icon Views on SlideShare
1,148
Embed Views
667

Actions

Likes
1
Downloads
36
Comments
0

2 Embeds 667

http://www.eclipsecon.org 654
http://eclipsecon.org 13

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Riena onrap econ-2011 Riena onrap econ-2011 Presentation Transcript

    • 1 Riena/RCP Applications in the Web using RAP Christian Campo EclipseCon 2011 – March 22nd Confidential | Date | Other Information, if necessaryMä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 ViewControllerCopyright © 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 IDECopyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 4
    • RCP – AppsCopyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 5
    • UI Concepts used in RienaCopyright © 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 conceptCopyright © 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 APICopyright © 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-SingletonsCopyright © 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 togetherCopyright © 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 secondsCopyright © 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 codeCopyright © 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 ClientCopyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 20
    • Existing Web ApplicationCopyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 21
    • Bring the two together MenuNavigationTree Subapplication Switcher Copyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0 22
    • ...even on the iPad thanks to RAPCopyright © 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 pmCopyright © 2011 compeople AG, Made available under the Eclipse Public License v 1.0