Eclipse - Single Source;Three Runtimes

100 %
0 %
Information about Eclipse - Single Source;Three Runtimes
Technology

Published on November 21, 2008

Author: sureshmadhuvarsu

Source: slideshare.net

Description

Presentation from <a>Suresh Krishna madhuvarsu</a> on the RCP, eRCP and RAP in the Redwood City DemoCamp.

Single Source : Three Runtimes Suresh Krishna Oracle Inc. [email_address] A tale of Desktop (RCP), Web (RAP) and Mobile (eRCP) applications.

Suresh Krishna

Oracle Inc.

[email_address]

Motivation is to… Understand the strengths and limitations of three runtimes (RCP, RAP and eRCP) Leverage these Eclipse platforms for business solutions “how much” is really free ?

Understand the strengths and limitations of three runtimes (RCP, RAP and eRCP)

Leverage these Eclipse platforms for business solutions

“how much” is really free ?

 

Develop for Desktop; Get Web and Mobile app for Free* * conditions and refactoring apply

Simple Application… “Task Organizer” application is created using Eclipse RCP Application is functionally simple Can add, modify and delete the personal tasks Data is populated from a simple in memory model; modified data is not persisted Demonstrates the strengths and limitations of runtimes (RCP, RAP and eRCP)

“Task Organizer” application is created using Eclipse RCP

Application is functionally simple

Can add, modify and delete the personal tasks

Data is populated from a simple in memory model; modified data is not persisted

Demonstrates the strengths and limitations of runtimes (RCP, RAP and eRCP)

RCP – TaskOrganizer Create a simple View with Eclipse RCP plugin wizard Contains simple TableViewer, TaskView, Sorter and CellModifier Productization is done with the icons, splash screen and the launcher name Personal Organization is exported as product so that it can be distributed as standalone

Create a simple View with Eclipse RCP plugin wizard

Contains simple TableViewer, TaskView, Sorter and CellModifier

Productization is done with the icons, splash screen and the launcher name

Personal Organization is exported as product so that it can be distributed as standalone

RCP – TaskOrganizer Code TaskOrganizerApplication : Implements Application and defines the application's life cycle ApplicationActionBarAdvisor : Manages the life cycle of actions added to windows ApplicationWorkbenchAdvisor : Initializes the perspective ApplicationWorkbenchWindowAdvisor : responsible for many of the visual aspects of windows (size, statusline, menubars, etc.) Perspective : Contains the Personal Task Viewer that will be visible in the application PersonalTaskView : Simple Table Viewer with data pre-populated from a model

TaskOrganizerApplication : Implements Application and defines the application's life cycle

ApplicationActionBarAdvisor : Manages the life cycle of actions added to windows

ApplicationWorkbenchAdvisor : Initializes the perspective

ApplicationWorkbenchWindowAdvisor : responsible for many of the visual aspects of windows (size, statusline, menubars, etc.)

Perspective : Contains the Personal Task Viewer that will be visible in the application

PersonalTaskView : Simple Table Viewer with data pre-populated from a model

RCP – TaskOrganizer – Demo

RAP – Overview RAP allows you to build Ajax-enabled Web applications using the Eclipse development model. Browser-side widget rendering is done with the qooxdoo Ajax library Abstracts the JavaScript and allows you to work with the Java APIs to build RIAs. Custom widget developers need to have JavaScript , qooxdoo , and RAP knowledge. Client-side development allows for the embedding of client-side technologies like other JavaScript frameworks , Flash , and applets .

RAP allows you to build Ajax-enabled Web applications using the Eclipse development model.

Browser-side widget rendering is done with the qooxdoo Ajax library

Abstracts the JavaScript and allows you to work with the Java APIs to build RIAs.

Custom widget developers need to have JavaScript , qooxdoo , and RAP knowledge.

Client-side development allows for the embedding of client-side technologies like other JavaScript frameworks , Flash , and applets .

RAP - Architecture Special implementation of the SWT, JFace and Workbench, and, as such, is actually a subset of RCP. RAP applications are accessed via standard browsers in the same way RCP applications are executed on the desktop environment.

Special implementation of the SWT, JFace and Workbench, and, as such, is actually a subset of RCP.

RAP applications are accessed via standard browsers in the same way RCP applications are executed on the desktop environment.

RAP - TaskOrganizer Since RAP is an RCP subset, it cannot co-exist in the same Eclipse instance as RCP. Download and set the RAP target platform; alternatively one can download the RAP SDK. Refactor the code Extension Points Plugin Dependencies Remove/Add/Modify classes Define EntryPoint Test with OSGi configuration

Since RAP is an RCP subset, it cannot co-exist in the same Eclipse instance as RCP.

Download and set the RAP target platform; alternatively one can download the RAP SDK.

Refactor the code

Extension Points

Plugin Dependencies

Remove/Add/Modify classes

Define EntryPoint

Test with OSGi configuration

RAP – TaskOrganizer (transformation) Organize the RAP application plug-in dependencies. org.eclipse.ui , add the RAP equivalent org.eclipse.rap.ui . Look for the compile errors and correct them with compatible APIs, constants, etc. Shell SWT Style Bits Modify or removed the functionality currently not supported in RAP (e.g., CellEditors). As of now CellEditors are not supported in RAP

Organize the RAP application plug-in dependencies.

org.eclipse.ui , add the RAP equivalent org.eclipse.rap.ui .

Look for the compile errors and correct them with compatible APIs, constants, etc.

Shell

SWT Style Bits

Modify or removed the functionality currently not supported in RAP (e.g., CellEditors).

As of now CellEditors are not supported in RAP

RAP – TaskOrganizer (transformation) An EntryPoint (org.eclipse.rap.ui.entrypoint) represents the main entry point for a RAP application (It can be compared with the main() method in SWT applications) EntryPoint creates the UI with the help of the WorkbenchAdvisor , Initial Perspective, and ApplicationActionBarAdvisor . URL <host>:<port>/rap?startup=<entrypointname> As RAP uses the OSGi* as the server-side framework, you will want to launch the application with the OSGi framework. OSGi framework includes a Jetty server and the startup ports can be configured. * The Equinox's OSGi framework component is the full implementation to the OSGi Core framework R4 specification.

An EntryPoint (org.eclipse.rap.ui.entrypoint) represents the main entry point for a RAP application (It can be compared with the main() method in SWT applications)

EntryPoint creates the UI with the help of the WorkbenchAdvisor , Initial Perspective, and ApplicationActionBarAdvisor .

URL <host>:<port>/rap?startup=<entrypointname>

As RAP uses the OSGi* as the server-side framework, you will want to launch the application with the OSGi framework.

OSGi framework includes a Jetty server and the startup ports can be configured.

RAP – TaskOrganizer - Launch

RAP – TaskOrganizer – Editing Capability * CellEditor replacement in the personal task organizer

RAP – TaskOrganizer - Branding Add org.eclipse.rap.ui.branding extension point servletName: taskOrganizer : Allows a user to access the application via localhost:9090/taskOrganizer, rather than /rap. title: Personal Task Organizer : Will be displayed as the title of the Web page in the browser, either in the title bar or the tab. favicon: icons/alt_window_16.gif : Available for use as part of the work done in Part 1, but if you have a logo of your own in an .ico file, use that, as many browsers only accept .ico for the favicon. exitConfirmation: Do you want to Exit Personal Task Organizer? : Will display in a dialog when the user closes his browser or navigates to another URL while running the application.

Add org.eclipse.rap.ui.branding extension point

servletName: taskOrganizer :

Allows a user to access the application via localhost:9090/taskOrganizer, rather than /rap.

title: Personal Task Organizer :

Will be displayed as the title of the Web page in the browser, either in the title bar or the tab.

favicon: icons/alt_window_16.gif :

Available for use as part of the work done in Part 1, but if you have a logo of your own in an .ico file, use that, as many browsers only accept .ico for the favicon.

exitConfirmation: Do you want to Exit Personal Task Organizer? :

Will display in a dialog when the user closes his browser or navigates to another URL while running the application.

RAP – TaskOrganizer - Branding

RAP – TaskOrganizer - Theming Theming is based on CSS and allows you to define colors, fonts, borders, margins, and images for the widgets. Add the extension point org.eclipse.rap.ui.themes Unfortunately, there is no documentation on what properties can be set on what widgets. For example, the menu has its theme listed in Menu.theme.xml, the List in List.theme.xml; etc.

Theming is based on CSS and allows you to define colors, fonts, borders, margins, and images for the widgets.

Add the extension point org.eclipse.rap.ui.themes

Unfortunately, there is no documentation on what properties can be set on what widgets.

For example, the menu has its theme listed in Menu.theme.xml, the List in List.theme.xml; etc.

RAP – TaskOrganizer – Before/After

RAP – TaskOrganizer – Packaging Deploy your application to a servlet container Additional plug-ins must be bundled for deployment ServletBridge is the connection between the OSGi framework and servlet container. org.eclipse.equinox.servletbridge org.eclipse.equinox.servletbridge.http org.eclipse.equinox.http.servlet org.eclipse.equinox.http.registry javax.servlet Crete a deploy script (war file, config creator, etc…) Run the build script to create the necessary files for deployment Deploy the WAR file to a servlet container (e.g. Tomcat)

Deploy your application to a servlet container

Additional plug-ins must be bundled for deployment

ServletBridge is the connection between the OSGi framework and servlet container.

org.eclipse.equinox.servletbridge

org.eclipse.equinox.servletbridge.http

org.eclipse.equinox.http.servlet

org.eclipse.equinox.http.registry

javax.servlet

Crete a deploy script (war file, config creator, etc…)

Run the build script to create the necessary files for deployment

Deploy the WAR file to a servlet container (e.g. Tomcat)

RAP – TaskOrganizer - Deploy

Smart Phone (R)evolution… Palm Centro/Treo Black Berry iPhone Nokia N/E series, Communicator Samsung BlackJack, SCH Sony Ericsson P/W series

Palm Centro/Treo

Black Berry

iPhone

Nokia N/E series, Communicator

Samsung BlackJack, SCH

Sony Ericsson P/W series

eRCP – Overview eRCP is a project — sponsored by IBM®, Nokia, and Motorola — that removes the desktop-oriented features of RCP. Replaces the traditional frameworks to mobile (SWT -> eSWT; JFace -> eJface; Workbench -> eWorkbench; Update -> eUpdate) SWT Mobile Extensions package to provide support for embedded UI features. eSWT ties directly to the native GUI system. It employs native code to do this and is, therefore, platform-dependent. Cannot run the eRCP GUI applications without having a port of eSWT and mobile extensions for the target platform.

eRCP is a project — sponsored by IBM®, Nokia, and Motorola — that removes the desktop-oriented features of RCP.

Replaces the traditional frameworks to mobile (SWT -> eSWT; JFace -> eJface; Workbench -> eWorkbench; Update -> eUpdate)

SWT Mobile Extensions package to provide support for embedded UI features.

eSWT ties directly to the native GUI system. It employs native code to do this and is, therefore, platform-dependent.

Cannot run the eRCP GUI applications without having a port of eSWT and mobile extensions for the target platform.

eRCP - Architecture Mobile Extensions : An optional package that provides UI elements commonly found on mobile devices.

eRCP – Supported Platforms 4 platforms for development and testing Windows Desktop Windows Mobile V5/6 Professional Windows Mobile V5/6 Standard WinCE V4.0 Professional Windows Mobile and Windows CE platforms require actual device or the simulator to test the application Windows Desktop provides a full eRCP environment; which makes it easy to develop and test the mobile applications on the desktops.

4 platforms for development and testing

Windows Desktop

Windows Mobile V5/6 Professional

Windows Mobile V5/6 Standard

WinCE V4.0 Professional

Windows Mobile and Windows CE platforms require actual device or the simulator to test the application

Windows Desktop provides a full eRCP environment; which makes it easy to develop and test the mobile applications on the desktops.

eRCP – TaskOrganizer – Refactoring Start with downloading the eRCP for Desktop runtime and set the target environment Look for the compilation errors and change Dependant plugins Add org.eclipse.ercp.eworkbench Extension points Add org.eclipse.ercp.eworkbench.applications Remove org.eclipse.core.runtime.applications Remove org.eclipse.ui.perspectives Remove org.eclipse.core.runtime.products API changes SelectionAdapter -> SelectionListener Remove CellModifiers -> Not supported Remove RCP related classes

Start with downloading the eRCP for Desktop runtime and set the target environment

Look for the compilation errors and change

Dependant plugins

Add org.eclipse.ercp.eworkbench

Extension points

Add org.eclipse.ercp.eworkbench.applications

Remove org.eclipse.core.runtime.applications

Remove org.eclipse.ui.perspectives

Remove org.eclipse.core.runtime.products

API changes

SelectionAdapter -> SelectionListener

Remove CellModifiers -> Not supported

Remove RCP related classes

eRCP – TaskOrganizer – eWorkbench eWorkbench does not have the Perspective model An eRCP application does not have an IApplication or IEntryPoint as a starting point eRCP app extends the eWorkbench instance and runs as child thread eWorkbench shares its execution thread among all eRCP applications (allowing all the applications to run in a single JVM)

eWorkbench does not have the Perspective model

An eRCP application does not have an IApplication or IEntryPoint as a starting point

eRCP app extends the eWorkbench instance and runs as child thread

eWorkbench shares its execution thread among all eRCP applications (allowing all the applications to run in a single JVM)

eRCP – TaskOrganizer – Launch Create a launch configuration using the application type as org.eclipse.ercp.eworkbench.eWorkbench .

Create a launch configuration using the application type as org.eclipse.ercp.eworkbench.eWorkbench .

eRCP – TaskOrganizer – Deployment Earlier release of Symbian OS (S80) has been discontinued and only a handful Windows mobile OS are supported eRCP requires a JVM capable of supporting the CDC/FP v1.0 or later whereas majority of today's devices support only CLDC/MIDP. Download the version for Windows Mobile 2003/5/6 or Windows CE platforms Purchase a licensed copy of IBM WebSphere Everyplace Micro Environment for Windows Mobile, which comes with IBM's J9 VM for ARM-based devices * Connected Device Configuration/Foundation Profile ** Connected Limited Device Configuration/Mobile Information Device Profile

Earlier release of Symbian OS (S80) has been discontinued and only a handful Windows mobile OS are supported

eRCP requires a JVM capable of supporting the CDC/FP v1.0 or later whereas majority of today's devices support only CLDC/MIDP.

Download the version for Windows Mobile 2003/5/6 or Windows CE platforms

Purchase a licensed copy of IBM WebSphere Everyplace Micro Environment for Windows Mobile, which comes with IBM's J9 VM for ARM-based devices

eRCP – TaskOrganizer on PocketPC

Single Source; Three Runtimes Thanks for attention ! Have Fun ! Suresh Krishna

Single Source; Three Runtimes

Thanks for attention !

Have Fun !

Suresh Krishna

Add a comment

Related presentations

Related pages

Eclipse - The Eclipse Foundation open source community ...

... runtimes, reporting tools ... The Eclipse Foundation is a great place to host new collaborations that follow best practices and are based on open ...
Read more

Specifying target servers for J2EE projects

... , you can specify the server runtime environments for your J2EE projects. ... in the org.eclipse.wst.common.project ... a single EAR file ...
Read more

Runtimes | LinkedIn

View 2463 Runtimes posts, presentations, experts, and more. Get the professional knowledge you need on LinkedIn. LinkedIn Home What is LinkedIn? Join Today
Read more

The Eclipse runtime options - Help - Eclipse Platform

The Eclipse runtime ... Also given is the Eclipse runtime layer ... The value "jar" indicates that the Eclipse OSGi Framework is contained in a single ...
Read more

Get Training for Eclipse and OSGi - Industrial Strength ...

Get Training for Eclipse and ... Learn best practices for single ... platform and a major contributor to the success of OSGi and Eclipse runtimes like ...
Read more

PDT/Installation - Eclipsepedia

PDT/Installation 3.1.1. Eclipse 3.7 / Indigo / PDT 3.0 From Update Site ... The minimum package is Eclipse Platform Runtime Binary. It is available at here
Read more

Debugging with the Eclipse Platform - IBM - United States

Debugging with the Eclipse ... can use the debug facilities for their respective language runtimes. ... configurations for a single project as ...
Read more

BIRT/FAQ/Birt Project - Eclipsepedia

Please see http://wiki.eclipse.org/BIRT/FAQ/Birt_Project#Q: ... Below are the steps how you can export the single org.eclipse.birt.report.runtime_*.jar ...
Read more