SlideShare ist ein Scribd-Unternehmen logo
1 von 44
Downloaden Sie, um offline zu lesen
Single­Sourcing Techniques for RAP and RCP


 Rüdiger Herrmann                                                         Ralf Sternberg
 rherrmann@eclipsesource.com                                              rsternberg@eclipsesource.com




                                 Confidential  |  Date  |  Other Information, if necessary
                                                                              Copyright EclipseSource – made available under the EPL 1.0
                                                                                                                    © 2002 IBM Corporation
Agenda
                                                      Basics
                                                      Setup
                                                   Dependencies
                                                    Extensions
                                                  API Differences
                                                      Lift Off
                                                API Differences II
                                              Multi­User Environment


Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 2
Agenda
                                                      Basics
                                                      Setup
                                                   Dependencies
                                                    Extensions
                                                  API Differences
                                                      Lift Off
                                                API Differences II
                                              Multi­User Environment


Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 3
What is RAP?




                     rich internet application runtime platform
                     based on the Eclipse programming model
                     single sourcing for rich client­ and web­applications


Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 4
Cobbler, stay with your trade
Single Sourcing

 common codebase for rich- and web-clients
 reuse of existing RCP code
         70% - 90% is possible

         RAP provides only a subset of RCP

         applications need to become multi-user enabled




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 5
Groundwork - OSGi

Plug-ins, Plug-ins, Plug-ins...

OSGi specifies a dynamic component model:


-     Module – encapsulation and declaration of
      dependencies
-     Life Cycle – API for life cycle management
-     Service Registry – providing functionality to
      other bundles
-     Security layer – limit bundle functionality to
      pre-defined capabilities




the Eclipse OSGi implementation is provided by the Equinox project

Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 6
On the surface

Contribution to a powerful UI Concept

                                                                Standard Widget Toolkit (SWT)
                                                                        delivers native widget functionality for
                                                                          the Eclipse platform in an operating
                                                                          system independent manner

                                                                JFace
                                                                        sits on top of SWT and provides
                                                                           classes for handling common UI
                                                                           programming tasks

                                                                Workbench
                                                                        is responsible for the presentation and
                                                                            coordination of the user interface



Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 7
Best of both worlds
                                                                        Workbench Window

                                                            Menu Bar
                                                            Tool Bar                                                 Page


                                                               Editor                                                             View




                                                                                                                                      View




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0          page: 8
Select a point of view




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 9
Problem Cases

Differences between RCP and RAP

 RAP runs in a multi-user environment
         one OSGi instance for all sessions in RAP

         singletons are shared between sessions

         no implicit thread to session assignment

         resources (images, colors und fonts) are shared


 thin-client architecture
         API limitations (no GC, no MouseMove events)




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 10
Agenda
                                                      Basics
                                                      Setup
                                                   Dependencies
                                                    Extensions
                                                  API Differences
                                                      Lift Off
                                                API Differences II
                                              Multi­User Environment


Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 11
Hand tools

Download

 Java Runtime Environment
    http://www.java.com/de/download/

 Eclipse SDK
    http://www.eclipse.org/downloads/

 RAP SDK
    http://www.eclipse.org/rap/downloads/


Eclipse Distributions z.B.
    http://ondemand.yoxos.com/




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 12
Workplace

2 Workbench Instances

 RAP and RCP need different
    targets

 switching a target is time-
    consuming because the complete
    workspace is recompiled




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 13
The Example Application

RCP Mail Demo


-     created by using the new
      plug-in project wizard in
      the RCP workbench
-     filed in a common projects
      folder
-     created as Rich Client
      Application
-     runs immediately




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 14
Import to the RAP Development
Environment
RAP Mail Demo

-     import using the import
      project wizard

-     after import 216 error
      markers

-     step by step conversion to
      support both runtimes




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 15
Agenda
                                                      Basics
                                                      Setup
                                                  Dependencies
                                                    Extensions
                                                  API Differences
                                                      Lift Off
                                                API Differences II
                                              Multi­User Environment


Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 16
Dependencies

The problem of different UI libraries

possible solutions:
 package import
         OSGi specification section 3.13.2
         problems caused by split-packages

 optional dependencies on both library versions
         warnings caused by missing bundle references

         UI abstraction layer




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 17
Dependencies

The compatibility plug-in
 location in projects folder
 import into both workspaces
 list of required bundles
         org.eclipse.rap.ui

         org.eclipse.ui
 properties
         ‘Optional’

         ‘Reexport this dependency’




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 18
Dependencies

RAP workspace after switching the UI dependencies




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 19
Agenda
                                                      Basics
                                                      Setup
                                                   Dependencies
                                                    Extensions
                                                  API Differences
                                                      Lift Off
                                                API Differences II
                                              Multi­User Environment


Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 20
Extensions

The problem of different Extension-Points

 not all RCP E-Ps are available in RAP

         e.g. bindings, helpSupport …



 additional RAP E-Ps for web specific requirements

         e.g. entrypoint, phaselistener …




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 21
Extensions

Fragment Solution
 two fragments per plug-in
         one for RAP specifics
         one for RCP specifics

 at runtime, only the plug-in
  that fits the environment
will be installed
 platform specific E-P
contributions are moved into
the corresponding
fragment
 bundle structure stays
intact


Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 22
Extensions

Creation of the Fragment Projects
 using the new project wizard
         fragment project
         all fragments are filed in the projects
          folder

 the following fragments are created
         compatibility.rap
         compatibility.rcp
         maildemo.rap
         maildemo.rcp

 each workspace contains only the
  relevant fragments


Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 23
Extensions

Creation of the Fragment Projects
 using the new project wizard
         fragment project
         all fragments are filed in the projects
          folder

 the following fragments are created
         compatibility.rap
         compatibility.rcp
         maildemo.rap
         maildemo.rcp

 each workspace contains only the
  relevant fragments


Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 24
Extensions

RCP workspace after moving E-Ps into fragment.xml




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 25
Agenda
                                                      Basics
                                                      Setup
                                                   Dependencies
                                                    Extensions
                                                 API Differences
                                                      Lift Off
                                                API Differences II
                                              Multi­User Environment


Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 26
API Differences

The problem of different APIs

 not all RCP APIs are available in RAP

         e.g. GC, MouseMove Events, FileDialog …



 additional RAP APIs for web specific requirements

         e.g. PhaseListener, ISessionStore …




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 27
API Differences

The problem of different APIs

solution:

 abstract type in host-bundle, that encapsulates the problem

 type implementation in the fragment, that platform
dependent, solves the problem
 loading the platform specific implementation at runtime by
   means of reflection




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 28
API Differences

Example ‘About’ Action

the last compile error in the RAP workspace is caused by the
missing about action of the ActionFactory.

encapsulate the problem by using an ActionFactoryFacade
type:




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 29
API Differences

Example ‘About’ Action II

implementation of ActionFactoryFacade:




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 30
API Differences

Example ‘About’ Action III

implementation of ImplemenationLoader:




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 31
API Differences

Example ‘About’ Action IV

platform specific implementations:

RAP                                                                            RCP




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 32
Agenda
                                                      Basics
                                                       Setup
                                                   Dependencies
                                                    Extensions
                                                  API Differences
                                                      Lift Off
                                                API Differences II
                                              Multi­User Environment


Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 33
Lift Off

Start-up
help




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 34
Lift Off




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 35
Agenda
                                                      Basics
                                                      Setup
                                                   Dependencies
                                                    Extensions
                                                  API Differences
                                                      Lift Off
                                               API Differences II
                                              Multi­User Environment


Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 36
API Differences

Resources in RAP are different from RCP

 no public constructor
 no dispose
 shared between sessions
 differences are resolved at JFace layer




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 37
Agenda
                                                     Basics
                                                     Setup
                                                 Dependencies
                                                   Extensions
                                                API Differences
                                                     Lift Off
                                               API Differences II
                                            Multi­User Environment


Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 38
Multi-User Environment

Singletons
 classical singletons exist in application scope
 in RAP, most of the time, session scope is desirable




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 39
Multi-User Environment

Singletons II
implementation in the host bundle:




fragment implementation:

RAP                                                                          RCP




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 40
Multi-User Environment

Jobs
jobs can’t implicitly access session-singletons




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 41
Multi-User Environment

Jobs II
implementations in the host bundle:




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 42
Get RAP ­  http://eclipse.org/rap




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 43
More Information

             http://www.eclipse.org/rap                            ­       RAP project page
             http://wiki.eclipse.org/RAP                           ­       RAP project wiki
             http://www.qooxdoo.org                                ­       qooxdoo js library




            Questions?
                  info@innoopract.com




Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0   page: 44

Weitere ähnliche Inhalte

Was ist angesagt?

Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegapRakesh Jha
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegapRakesh Jha
 
Develop mobile applications with Flex
Develop mobile applications with FlexDevelop mobile applications with Flex
Develop mobile applications with FlexConFoo
 
Applet Returns: The new generation of Java Plug-ins
Applet Returns: The new generation of Java Plug-insApplet Returns: The new generation of Java Plug-ins
Applet Returns: The new generation of Java Plug-insSerge Rehem
 
[S lide] java_sig-spring-framework
[S lide] java_sig-spring-framework[S lide] java_sig-spring-framework
[S lide] java_sig-spring-frameworkptlong96
 
How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...Ganesh Kumar
 
Zend Framework Getting Started For I5
Zend Framework Getting Started For I5Zend Framework Getting Started For I5
Zend Framework Getting Started For I5ZendCon
 
Getting started with PhoneGap
Getting started with PhoneGapGetting started with PhoneGap
Getting started with PhoneGapMihai Corlan
 
JSF 2.2 Input Output JavaLand 2015
JSF 2.2 Input Output JavaLand 2015JSF 2.2 Input Output JavaLand 2015
JSF 2.2 Input Output JavaLand 2015Edward Burns
 

Was ist angesagt? (9)

Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegap
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegap
 
Develop mobile applications with Flex
Develop mobile applications with FlexDevelop mobile applications with Flex
Develop mobile applications with Flex
 
Applet Returns: The new generation of Java Plug-ins
Applet Returns: The new generation of Java Plug-insApplet Returns: The new generation of Java Plug-ins
Applet Returns: The new generation of Java Plug-ins
 
[S lide] java_sig-spring-framework
[S lide] java_sig-spring-framework[S lide] java_sig-spring-framework
[S lide] java_sig-spring-framework
 
How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...
 
Zend Framework Getting Started For I5
Zend Framework Getting Started For I5Zend Framework Getting Started For I5
Zend Framework Getting Started For I5
 
Getting started with PhoneGap
Getting started with PhoneGapGetting started with PhoneGap
Getting started with PhoneGap
 
JSF 2.2 Input Output JavaLand 2015
JSF 2.2 Input Output JavaLand 2015JSF 2.2 Input Output JavaLand 2015
JSF 2.2 Input Output JavaLand 2015
 

Andere mochten auch

Styling RAP Applications - Short Talk
Styling RAP Applications - Short TalkStyling RAP Applications - Short Talk
Styling RAP Applications - Short TalkRalf Sternberg
 
A look ahead at RAP - News and Vision
A look ahead at RAP - News and VisionA look ahead at RAP - News and Vision
A look ahead at RAP - News and VisionRalf Sternberg
 
Itarget Media Leadgenerator
Itarget Media LeadgeneratorItarget Media Leadgenerator
Itarget Media Leadgeneratorrobinzonder
 
Space Plus LLC - Catalog
Space Plus LLC - CatalogSpace Plus LLC - Catalog
Space Plus LLC - Catalogmichellealpern
 
Dynamic Web Applications with OSGi and RAP
Dynamic Web Applications with OSGi and RAPDynamic Web Applications with OSGi and RAP
Dynamic Web Applications with OSGi and RAPRalf Sternberg
 
Deep Ocean Environment
Deep Ocean EnvironmentDeep Ocean Environment
Deep Ocean Environmenthbuy1213
 
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAPEclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAPRalf Sternberg
 

Andere mochten auch (9)

Styling RAP Applications - Short Talk
Styling RAP Applications - Short TalkStyling RAP Applications - Short Talk
Styling RAP Applications - Short Talk
 
Strive
StriveStrive
Strive
 
A look ahead at RAP - News and Vision
A look ahead at RAP - News and VisionA look ahead at RAP - News and Vision
A look ahead at RAP - News and Vision
 
Itarget Media Leadgenerator
Itarget Media LeadgeneratorItarget Media Leadgenerator
Itarget Media Leadgenerator
 
RAP
RAPRAP
RAP
 
Space Plus LLC - Catalog
Space Plus LLC - CatalogSpace Plus LLC - Catalog
Space Plus LLC - Catalog
 
Dynamic Web Applications with OSGi and RAP
Dynamic Web Applications with OSGi and RAPDynamic Web Applications with OSGi and RAP
Dynamic Web Applications with OSGi and RAP
 
Deep Ocean Environment
Deep Ocean EnvironmentDeep Ocean Environment
Deep Ocean Environment
 
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAPEclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
 

Ähnlich wie Single Sourcing

troubleshooting Fiori.pdf
troubleshooting Fiori.pdftroubleshooting Fiori.pdf
troubleshooting Fiori.pdfpraveenRapeti3
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2360|Conferences
 
Web(abap introduction)
Web(abap introduction)Web(abap introduction)
Web(abap introduction)Kranthi Kumar
 
SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...
SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...
SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...SAP Portal
 
Mho Web Dynpro Abap
Mho Web Dynpro AbapMho Web Dynpro Abap
Mho Web Dynpro Abapthomas_jung
 
AJUBY Open Source Application Builder
AJUBY Open Source Application BuilderAJUBY Open Source Application Builder
AJUBY Open Source Application Builderajuby
 
Building Composite Application for Lotus Notes 8
Building Composite Application for Lotus Notes 8Building Composite Application for Lotus Notes 8
Building Composite Application for Lotus Notes 8dominion
 
Ab1011 module pool programming
Ab1011   module pool programmingAb1011   module pool programming
Ab1011 module pool programmingSatheesh Kanna
 
Prism Tech Ed India
Prism Tech Ed IndiaPrism Tech Ed India
Prism Tech Ed Indiarsnarayanan
 
remash! - Blueprints for RESTfulSituational Applications
remash! - Blueprints for RESTfulSituational Applicationsremash! - Blueprints for RESTfulSituational Applications
remash! - Blueprints for RESTfulSituational Applicationsdflejter
 
AD404 - Extend your Social Business by integrating SAP Solutions
AD404 - Extend your Social Business by integrating SAP SolutionsAD404 - Extend your Social Business by integrating SAP Solutions
AD404 - Extend your Social Business by integrating SAP SolutionsChristian Holsing
 
Delivering Mobile Apps to the Field with Oracle JET
Delivering Mobile Apps to the Field with Oracle JETDelivering Mobile Apps to the Field with Oracle JET
Delivering Mobile Apps to the Field with Oracle JETSimon Haslam
 
Web 20- 2: Architecture Patterns And Models For The New Internet
Web 20- 2: Architecture Patterns And Models For The New InternetWeb 20- 2: Architecture Patterns And Models For The New Internet
Web 20- 2: Architecture Patterns And Models For The New Internettvawler
 

Ähnlich wie Single Sourcing (20)

troubleshooting Fiori.pdf
troubleshooting Fiori.pdftroubleshooting Fiori.pdf
troubleshooting Fiori.pdf
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2
 
Eclipse - Single Source;Three Runtimes
Eclipse - Single Source;Three RuntimesEclipse - Single Source;Three Runtimes
Eclipse - Single Source;Three Runtimes
 
Web(abap introduction)
Web(abap introduction)Web(abap introduction)
Web(abap introduction)
 
SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...
SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...
SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...
 
Mho Web Dynpro Abap
Mho Web Dynpro AbapMho Web Dynpro Abap
Mho Web Dynpro Abap
 
AJUBY Open Source Application Builder
AJUBY Open Source Application BuilderAJUBY Open Source Application Builder
AJUBY Open Source Application Builder
 
Os Ramani
Os RamaniOs Ramani
Os Ramani
 
Building Composite Application for Lotus Notes 8
Building Composite Application for Lotus Notes 8Building Composite Application for Lotus Notes 8
Building Composite Application for Lotus Notes 8
 
Notes
NotesNotes
Notes
 
Ab1011 module pool programming
Ab1011   module pool programmingAb1011   module pool programming
Ab1011 module pool programming
 
Prism Tech Ed India
Prism Tech Ed IndiaPrism Tech Ed India
Prism Tech Ed India
 
remash! - Blueprints for RESTfulSituational Applications
remash! - Blueprints for RESTfulSituational Applicationsremash! - Blueprints for RESTfulSituational Applications
remash! - Blueprints for RESTfulSituational Applications
 
Ilog Ria2
Ilog Ria2Ilog Ria2
Ilog Ria2
 
AD404 - Extend your Social Business by integrating SAP Solutions
AD404 - Extend your Social Business by integrating SAP SolutionsAD404 - Extend your Social Business by integrating SAP Solutions
AD404 - Extend your Social Business by integrating SAP Solutions
 
Delivering Mobile Apps to the Field with Oracle JET
Delivering Mobile Apps to the Field with Oracle JETDelivering Mobile Apps to the Field with Oracle JET
Delivering Mobile Apps to the Field with Oracle JET
 
Java fx
Java fxJava fx
Java fx
 
SAP NetWeaver Gateway - Introduction
SAP NetWeaver Gateway - IntroductionSAP NetWeaver Gateway - Introduction
SAP NetWeaver Gateway - Introduction
 
SAP NetWeaver Gateway - Gateway Service Consumption
SAP NetWeaver Gateway - Gateway Service Consumption SAP NetWeaver Gateway - Gateway Service Consumption
SAP NetWeaver Gateway - Gateway Service Consumption
 
Web 20- 2: Architecture Patterns And Models For The New Internet
Web 20- 2: Architecture Patterns And Models For The New InternetWeb 20- 2: Architecture Patterns And Models For The New Internet
Web 20- 2: Architecture Patterns And Models For The New Internet
 

Kürzlich hochgeladen

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Kürzlich hochgeladen (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Single Sourcing

  • 1. Single­Sourcing Techniques for RAP and RCP Rüdiger Herrmann Ralf Sternberg rherrmann@eclipsesource.com rsternberg@eclipsesource.com Confidential  |  Date  |  Other Information, if necessary                                                                               Copyright EclipseSource – made available under the EPL 1.0 © 2002 IBM Corporation
  • 2. Agenda Basics Setup Dependencies Extensions API Differences Lift Off API Differences II Multi­User Environment Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 2
  • 3. Agenda Basics Setup Dependencies Extensions API Differences Lift Off API Differences II Multi­User Environment Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 3
  • 4. What is RAP?  rich internet application runtime platform  based on the Eclipse programming model  single sourcing for rich client­ and web­applications Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 4
  • 5. Cobbler, stay with your trade Single Sourcing  common codebase for rich- and web-clients  reuse of existing RCP code  70% - 90% is possible  RAP provides only a subset of RCP  applications need to become multi-user enabled Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 5
  • 6. Groundwork - OSGi Plug-ins, Plug-ins, Plug-ins... OSGi specifies a dynamic component model: - Module – encapsulation and declaration of dependencies - Life Cycle – API for life cycle management - Service Registry – providing functionality to other bundles - Security layer – limit bundle functionality to pre-defined capabilities the Eclipse OSGi implementation is provided by the Equinox project Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 6
  • 7. On the surface Contribution to a powerful UI Concept  Standard Widget Toolkit (SWT) delivers native widget functionality for the Eclipse platform in an operating system independent manner  JFace sits on top of SWT and provides classes for handling common UI programming tasks  Workbench is responsible for the presentation and coordination of the user interface Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 7
  • 8. Best of both worlds Workbench Window Menu Bar Tool Bar Page Editor View View Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 8
  • 10. Problem Cases Differences between RCP and RAP  RAP runs in a multi-user environment  one OSGi instance for all sessions in RAP  singletons are shared between sessions  no implicit thread to session assignment  resources (images, colors und fonts) are shared  thin-client architecture  API limitations (no GC, no MouseMove events) Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 10
  • 11. Agenda Basics Setup Dependencies Extensions API Differences Lift Off API Differences II Multi­User Environment Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 11
  • 12. Hand tools Download  Java Runtime Environment http://www.java.com/de/download/  Eclipse SDK http://www.eclipse.org/downloads/  RAP SDK http://www.eclipse.org/rap/downloads/ Eclipse Distributions z.B. http://ondemand.yoxos.com/ Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 12
  • 13. Workplace 2 Workbench Instances  RAP and RCP need different targets  switching a target is time- consuming because the complete workspace is recompiled Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 13
  • 14. The Example Application RCP Mail Demo - created by using the new plug-in project wizard in the RCP workbench - filed in a common projects folder - created as Rich Client Application - runs immediately Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 14
  • 15. Import to the RAP Development Environment RAP Mail Demo - import using the import project wizard - after import 216 error markers - step by step conversion to support both runtimes Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 15
  • 16. Agenda Basics Setup Dependencies Extensions API Differences Lift Off API Differences II Multi­User Environment Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 16
  • 17. Dependencies The problem of different UI libraries possible solutions:  package import  OSGi specification section 3.13.2  problems caused by split-packages  optional dependencies on both library versions  warnings caused by missing bundle references  UI abstraction layer Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 17
  • 18. Dependencies The compatibility plug-in  location in projects folder  import into both workspaces  list of required bundles  org.eclipse.rap.ui  org.eclipse.ui  properties  ‘Optional’  ‘Reexport this dependency’ Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 18
  • 19. Dependencies RAP workspace after switching the UI dependencies Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 19
  • 20. Agenda Basics Setup Dependencies Extensions API Differences Lift Off API Differences II Multi­User Environment Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 20
  • 21. Extensions The problem of different Extension-Points  not all RCP E-Ps are available in RAP  e.g. bindings, helpSupport …  additional RAP E-Ps for web specific requirements  e.g. entrypoint, phaselistener … Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 21
  • 22. Extensions Fragment Solution  two fragments per plug-in  one for RAP specifics  one for RCP specifics  at runtime, only the plug-in that fits the environment will be installed  platform specific E-P contributions are moved into the corresponding fragment  bundle structure stays intact Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 22
  • 23. Extensions Creation of the Fragment Projects  using the new project wizard  fragment project  all fragments are filed in the projects folder  the following fragments are created  compatibility.rap  compatibility.rcp  maildemo.rap  maildemo.rcp  each workspace contains only the relevant fragments Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 23
  • 24. Extensions Creation of the Fragment Projects  using the new project wizard  fragment project  all fragments are filed in the projects folder  the following fragments are created  compatibility.rap  compatibility.rcp  maildemo.rap  maildemo.rcp  each workspace contains only the relevant fragments Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 24
  • 25. Extensions RCP workspace after moving E-Ps into fragment.xml Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 25
  • 26. Agenda Basics Setup Dependencies Extensions API Differences Lift Off API Differences II Multi­User Environment Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 26
  • 27. API Differences The problem of different APIs  not all RCP APIs are available in RAP  e.g. GC, MouseMove Events, FileDialog …  additional RAP APIs for web specific requirements  e.g. PhaseListener, ISessionStore … Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 27
  • 28. API Differences The problem of different APIs solution:  abstract type in host-bundle, that encapsulates the problem  type implementation in the fragment, that platform dependent, solves the problem  loading the platform specific implementation at runtime by means of reflection Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 28
  • 29. API Differences Example ‘About’ Action the last compile error in the RAP workspace is caused by the missing about action of the ActionFactory. encapsulate the problem by using an ActionFactoryFacade type: Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 29
  • 30. API Differences Example ‘About’ Action II implementation of ActionFactoryFacade: Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 30
  • 31. API Differences Example ‘About’ Action III implementation of ImplemenationLoader: Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 31
  • 32. API Differences Example ‘About’ Action IV platform specific implementations: RAP RCP Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 32
  • 33. Agenda Basics Setup Dependencies Extensions API Differences Lift Off API Differences II Multi­User Environment Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 33
  • 36. Agenda Basics Setup Dependencies Extensions API Differences Lift Off API Differences II Multi­User Environment Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 36
  • 37. API Differences Resources in RAP are different from RCP  no public constructor  no dispose  shared between sessions  differences are resolved at JFace layer Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 37
  • 38. Agenda Basics Setup Dependencies Extensions API Differences Lift Off API Differences II Multi­User Environment Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 38
  • 39. Multi-User Environment Singletons  classical singletons exist in application scope  in RAP, most of the time, session scope is desirable Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 39
  • 40. Multi-User Environment Singletons II implementation in the host bundle: fragment implementation: RAP RCP Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 40
  • 41. Multi-User Environment Jobs jobs can’t implicitly access session-singletons Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 41
  • 42. Multi-User Environment Jobs II implementations in the host bundle: Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 42
  • 44. More Information  http://www.eclipse.org/rap ­ RAP project page  http://wiki.eclipse.org/RAP ­ RAP project wiki  http://www.qooxdoo.org ­ qooxdoo js library Questions?   info@innoopract.com Single Sourcing                                            Copyright Innoopract – made available under the EPL 1.0 page: 44