Eclipse - Single Source;Three Runtimes

  • 2,794 views
Uploaded on

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

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

More in: Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,794
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
70
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Single Source : Three Runtimes
    • Suresh Krishna
    • Oracle Inc.
    • [email_address]
    A tale of Desktop (RCP), Web (RAP) and Mobile (eRCP) applications.
  • 2. 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 ?
  • 3.  
  • 4. Develop for Desktop; Get Web and Mobile app for Free* * conditions and refactoring apply
  • 5. 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)
  • 6. 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
  • 7. 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
  • 8. RCP – TaskOrganizer – Demo
  • 9. 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 .
  • 10. 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.
  • 11. 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
  • 12. 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
  • 13. 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.
  • 14. RAP – TaskOrganizer - Launch
  • 15. RAP – TaskOrganizer – Editing Capability * CellEditor replacement in the personal task organizer
  • 16. 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.
  • 17. RAP – TaskOrganizer - Branding
  • 18. 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.
  • 19. RAP – TaskOrganizer – Before/After
  • 20. 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)
  • 21. RAP – TaskOrganizer - Deploy
  • 22. Smart Phone (R)evolution…
    • Palm Centro/Treo
    • Black Berry
    • iPhone
    • Nokia N/E series, Communicator
    • Samsung BlackJack, SCH
    • Sony Ericsson P/W series
  • 23. 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.
  • 24. eRCP - Architecture Mobile Extensions : An optional package that provides UI elements commonly found on mobile devices.
  • 25. 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.
  • 26. 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
  • 27. 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)
  • 28. eRCP – TaskOrganizer – Launch
    • Create a launch configuration using the application type as org.eclipse.ercp.eworkbench.eWorkbench .
  • 29. 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
  • 30. eRCP – TaskOrganizer on PocketPC
  • 31.
    • Single Source; Three Runtimes
    • Thanks for attention !
    • Have Fun !
    • Suresh Krishna