• Save
Single Sourcing RCP and RAP
Upcoming SlideShare
Loading in...5
×
 

Single Sourcing RCP and RAP

on

  • 7,491 views

The Rich Ajax Platform (RAP) provides a framework and set of tools to develop rich clients and web clients from a single code base (single sourcing), either from scratch or by migrating an existing ...

The Rich Ajax Platform (RAP) provides a framework and set of tools to develop rich clients and web clients from a single code base (single sourcing), either from scratch or by migrating an existing Rich Client Platform (RCP) application. In this talk we'll explore the differences between RAP and RCP that are especially relevant to the goal of single sourcing as much code as possible. Attendees will learn about the benefits of single sourcing and get a live demo of a single sourced application.

Statistics

Views

Total Views
7,491
Slideshare-icon Views on SlideShare
7,458
Embed Views
33

Actions

Likes
6
Downloads
0
Comments
1

2 Embeds 33

http://www.slideshare.net 30
http://www.linkedin.com 3

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

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

11 of 1

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • introducing each other <br /> EclipseSource
  • Problems: <br /> * existing RCP Code <br /> * RCP developers not familiar with web technologies <br /> <br /> * Example: insurance business, complicated forms <br /> * Reuse code <br /> * Reuse knowledge <br /> * Same development environment (Eclipse) <br /> * Same concepts (Plug-ins, Extension Points) <br /> <br /> * Single sourcing is dev of web and desktop apps from a single code base
  • OSGi specifies a dynamic component model: <br /> the Eclipse OSGi implementation is provided by the Equinox project <br /> <br /> RAP consists of bundles <br /> RAP runs on OSGi
  • Overview of RCP Layers <br /> SWT building blocks, native widgets <br /> JFace add higher-level API for common UI tasks <br /> Workbench does presentation and coordination of UI
  • need to replace SWT with sth.
  • RWT implements same API as SWT <br /> - client and server part <br /> - uses qooxdoo on client <br /> - server build on Equinox <br /> - server based on JEE techn. <br /> - runs in a servlet container (servlet 2.3 - 2.5) <br /> - subsets of SWT, JFace, Workbench APIs
  • SWT, JFace, Workbench APIs <br /> &#x2192; same UI concepts <br /> <br /> XXX: exchange text RWT ~ SWT
  • Same UI concepts as in RCP <br /> But might not always fit for a web app
  • Same building blocks, can be arranged differently <br /> <br /> examples: <br /> - custom perspective switcher <br /> - custom menu
  • reuse of existing RCP code <br /> * 80% - 98% <br /> <br /> also reuse of knowledge &#x2013; takes long time to get familiar with RCP &#x2026; (cobbler, stay with your trade) <br /> <br /> Why not 100%? <br /> * RAP provides only a subset of RCP <br /> * applications need to become multi-user enabled <br /> <br /> This talk is about how to deal with the gray part
  • Restrictions due to web environment: <br /> <br /> unsupported RCP API <br /> - GC (research) no platform-indep. perfomant drawing <br /> - MouseMove <br /> <br /> slightly different <br /> - modify events sends data in chunks <br /> - file upload <br /> <br /> web-specific requirements <br /> - theming
  • RAP is client/server <br /> RAP runs in a multi-user environment <br /> - one OSGi instance for all sessions in RAP <br /> &#x2192; shared bundles <br /> - singletons shared between sessions <br /> - no implicit thread to session assignment <br /> - resources (images, colors und fonts) are shared <br /> Different scopes
  • Result multi-user + browser &#x2192; different code <br /> need to separate shared and specific code <br /> need place to put the differences <br /> <br /> possiblities? <br /> <br /> - plug-ins, extension points <br /> - services <br /> - fragments
  • RCP development against RCP runtime <br /> <br /> RAP runtime <br /> <br /> &#x2192; 2 targets
  • RAP and RCP need different targets <br /> <br /> switching a target is time-consuming because the complete workspace is recompiled <br /> <br /> avoids need to open and close projects <br /> <br /> &#x2192; 2 workspaces, one for each target
  • shared projects referenced by both workspaces <br /> &#x2192; not include projects in workspace folder
  • In the RCP Workspace <br /> Created by using new plug-in project wizard <br /> Filed in a common projects folder <br /> Created as Rich Client Application
  • runs immediately
  • Create RAP workspace / switch
  • do not copy projects into workspace
  • after import 216 error markers <br /> step by step conversion to support both runtimes <br /> First problem: dependencies
  • problem of different bundle ids <br /> <br /> possible solutions: <br /> <br /> package import <br /> OSGi specification section 3.13.2 <br /> problems caused by split-packages <br /> <br /> optional dependencies on both <br /> warnings caused by missing bundle references <br /> reexport
  • list of required bundles <br /> org.eclipse.rap.ui <br /> org.eclipse.ui <br /> <br /> properties <br /> &#x2018;Optional&#x2019; <br /> &#x2018;Reexport this dependency&#x2019;
  • First error: <br /> <br /> binding extension point not available in RAP <br /> <br /> same problem as API differences applies also to extension points: <br /> - missing: e.g. bindings, helpSupport &#x2026; <br /> - additional E-Ps for web specific requirements <br /> e.g. entrypoint, phaselistener &#x2026; <br /> <br /> need place to put platform specific parts
  • Fragments are bundles that are merged with a host at runtime <br /> - can contribute extensions <br /> - same classloader as host <br /> - at runtime, it&apos;s like one bundle <br /> <br /> well suited to solve single sourcing problems <br /> <br /> * two fragments per plug-in <br /> one for RAP specifics <br /> one for RCP specifics <br /> <br /> * at runtime, only the plug-in that fits the <br /> environment will be installed
  • using the new project wizard <br /> fragment project <br /> all fragments are filed in the projects folder <br /> each workspace contains only the <br /> relevant fragments
  • in RCP workspace <br /> <br /> move extension from plugin.xml &#x2192; fragment.xml
  • solution: <br /> delegation-like pattern <br /> <br /> abstract supertype in host-bundle, that encapsulates the problem <br /> <br /> type implementation in the (platform dependent) fragment solves the problem <br /> <br /> loading the platform specific implementation at runtime by means of reflection
  • RCP has ActionFactory.ABOUT <br /> <br /> not available in RAP <br /> <br /> use custom AboutAction <br /> <br /> use delegation to cover differences <br /> (same code for both platforms)
  • static initializer: loads impl <br /> <br /> create delegates to impl <br /> <br /> createInternal does the actual work
  • finds impl by naming convention <br /> <br /> needs reflection <br /> because no reference to impl at compile time
  • All errors resolved &#x2026; <br /> <br /> &#x2026; now how to RUN it? <br /> <br /> entry point <br /> main method in SWT <br /> entry point is counterpart to main method
  • extension point <br /> <br /> attr: <br /> parameter (URL parameter) <br /> class (implements interface)
  • the recommended way to work with different targets
  • excursion: <br /> <br /> hides optional decencies from app bundles <br /> <br /> reexport! <br /> <br /> location in projects folder <br /> <br /> import into both workspaces

Single Sourcing RCP and RAP Single Sourcing RCP and RAP Presentation Transcript

  • Single-Sourcing RAP and RCP Chris Aniszczyk zx@eclipsesource.com
  • Leadership roles in over 10 Eclipse projects Equinox, OSGi, RCP, p2, RAP, PDE, ECF, ... Provide services and solutions for the Eclipse ecosystem 2
  • What is Eclipse? 3
  • Eclipse is a Technology! 4
  • 5
  • Eclipse is a Foundation! 6
  • 7
  • Eclipse is a Ecosystem! 8
  • Let’s Talk Technology...
  • RCP! 11
  • Lotus Notes 8+ 12
  • Lotus Sametime 7.5+ 13
  • NASA 14
  • RCP Knowledge
  • Web 2.0 16
  • Online Presentations? 17
  • Online Photoshop? 18
  • Pixlr 19
  • Web 2.0 Knowledge 20
  • 21
  • Web 2.0 Desktop
  • 23
  • 24
  • 25
  • Impossible? 26
  • Exchange the Runtime! 27
  • Foundation: OSGi RCP RAP equinox 28
  • Layers of RCP
  • RAP Layers
  • On the Surface
  • Best of both worlds 33
  • Select a point of view 34
  • Why!? 35
  • It’s possible! 36
  • 37
  • 38
  • How much reuse!? 39
  • Code Reuse 80%–98% is possible platform specific code shared code 40
  • What about the 2-20%? 41
  • RAP Runs in a Browser File system File upload GraphicsContext RCP RAP
  • RAP is Multi-User! RCP RAP
  • API Differences RCP RAP Desktop-only Web-specific features features
  • Handy Tools Eclipse SDK RAP SDK includes - RAP Runtime - Tooling - Help
  • Workplace
  • Shared Projects RAP Workspace RCP Workspace
  • Example Application RCP Mail Demo 49
  • Runs immediately 50
  • Lift Off 51
  • Conclusion Thanks for listening! Questions!? www.eclipsesource.com www.eclipse.org/rap 52
  • Extra Slides... 53
  • Import into RAP Workspace 54
  • Do not copy! 55
  • Don't Panic! 56
  • Dependencies Package Imports Optional Dependencies 57
  • Optional Dependencies 58
  • 59
  • Fragments Fragments Host Bundle
  • Create Fragments maildemo.rap maildemo.rcp 61
  • Move extensions 62
  • 63
  • Delegation Bundle Fragment 64
  • API Differences RCP RAP RCP + RAP 65
  • Helper Class 66
  • ImplementationLoader 67
  • Implementations RCP RAP 68
  • Zero Errors 69
  • Entry Point 70
  • Summary 71
  • Use Two Workspaces 72
  • Optional Dependencies 73
  • Compatibility Plug-in
  • Use Fragments Fragments Host Bundle
  • Use Delegation Bundle Fragment 76