1 / 26

Eclipse Rich Client Platform (RCP)

Eclipse Rich Client Platform (RCP). Introduction. Agenda – Introduction to Eclipse RCP. Who am I? Eclipse as a platform What is Eclipse RCP? Extension Points / Extensions Equinox SWT & JFace View coupeling Summary. Who am I ?. Lars Vogel

peigi
Download Presentation

Eclipse Rich Client Platform (RCP)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Eclipse Rich Client Platform (RCP) Introduction

  2. Agenda – Introduction to Eclipse RCP • Who am I? • Eclipse as a platform • What is Eclipse RCP? • Extension Points / Extensions • Equinox • SWT & JFace • View coupeling • Summary

  3. Who am I ? • Lars Vogel • Working for SAP AG as a product manager responsible for SAP Transportation Management • Open source enthusiastic • Active in the Java and Eclipse ecosystem

  4. Software Requirements • Eclipse RCP distribution, via www.eclipse.org/downlods • Or installation of feature „Eclipse RCP“ via the Eclipse update manager

  5. Eclipse IDE - Building a platform • Platform • Small runtime • Complex applications can be extensible without the need to adjust existing code Platform Extensible Application Application Runtime

  6. Eclipse – Short History • Nov. 2001 – Code released as open Source • Juni 2004 – Eclipse 3.0 based on OSGi and enables Eclipse RCP • Current Eclipse 3.4.2 (aka Ganymede)

  7. What is an Eclipse RCP application? • Local running application using the native widget toolkit • Based on the Eclipse runtime and technology • Eclipse RCP applications can be standalone or may require server communication

  8. Why Eclipse RCP? • Component model • Rich user experience • Platform (OS) independent • Extensible • Re-use of existing Eclipse functionality • Helps avoiding writing boilerplate code, e.g. automatic update • Excellent community

  9. Eclipse RCP application Application Calls PlattfromUI.createAndRunWorkbench ApplicationWorkbenchAdvisor Defines the initial perspective ApplicationWorkbenchWindowAdvisor Settings for the window, e.g. toolbar visible, etc ApplicationActionBarAdvisor Defines initial Actions (outdated)

  10. Important configuration files • MANIFEST.MF – Defines OSGi bundle • plugin.xml – Defines Eclipse extensions and extension points • build.properties – property file for export • PDE (Plug-in Development Environement) provides editors for these files.

  11. Extensions and Extension Points • Extension Points allow to add functionality to pre-defined points • Each plug-in can define it‘s own extension points allowing other to contribute • Each plug-in can define extensions, providing functionality to pre-defined extension points • RCP developer use primary the existing platfrom extension points to define their application

  12. Extensions and Extension Points • plugin.xml contains description of all extensions and extension points • Contributions are only loaded when they are needed -> lazy loading to save memory and keep startup time small *Graphic Source: Internet

  13. Example: Commands • A command in Eclipse is a declarative description of a component and is independent from the implementation details. • A command can be categorized • Key binding can be assigned to the command.

  14. Key components of Eclipse RCP Other Plug-ins… Workbench … JFace … SWT Runtime / Equinox

  15. Equinox Equinox – Modular Architecture • Reference implementation of OSGi • Dynamic module system • Wildly used, e.g. in application servers • Allows to • Define dependencies between Plug-ins • Hide plug-in internal implementation details • Eclipse plug-in is always an OSGi bundle and vice versa

  16. Excursus: Visual Plug-in Dependencies • View available for plug-in dependency analysis • Graphical tool can be found on http://www.eclipse.org/pde/incubator/dependency-visualization/

  17. “Typical” RCP Architecture • Plug-in(s) for the domain model • Plug-in(s) for the core functionality • Plug-in(s) for the UI functionality • Modularity allows you to grow as you go

  18. SWT • SWT Standard Widget Toolkit • Thin layer upon the native GUI libraries • JNI calls • Not a lot of conviniant functionality *Screenshot from the Internet

  19. JFace & Workbench • JFace • UI toolkit that provides helper classes for developing UI features • Tables / TreeViewer / Dialogs / • Can be based on models • Databinding • Workbench • multi-window environment • manages views, editors, perspectives 

  20. Example: JFace Viewer • Viewer: Table / Treeviewer: Responsible for the UI • LabelProvider: How is the domain model represented • ModelProvider: Delivery the domain model • ViewerSorter: Sorts values in the viewer • ViewerFilter: Filters values LabelProvider – Which data is represented how ContentProvider – „Dao“ for viewer Viewer – UI, shows data

  21. ViewPartCoupeling • View / Viewer can be selection provider, e.g. getSite().setSelectionProvider(viewer); • Another view can register without knowing which view are responible for the changes • Needs to implement ISelectionListener • Must itself register as SelectionListener, via getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this) • Allows Loose Coupeling

  22. Eclipse Product • Contains the branding, e.g. splashscreen, icons, „About“ dialog • Configuration for different operating systems • Used for exporting the final application

  23. Excursus: Plug-in Spy • Find in Eclipse which parts you are looking at • Make coding analysis and re-use extremly easy • Shortcut Alt+Shift+F1 • Add org.eclipse.pde.runtime and org.eclipse.ui.forms as dependency to have Plug-in Spy in your own RCP application

  24. Summary • Eclipse RCP is a powerful framework to develop native looking, modular, extensible applications. • „Billions“;-) of new API‘s to learn…. Very powerful but complex framework

  25. Where is much more to Eclipse RCP… • The whole world of Eclipse projects is available for RCP • Modelling (EMF) • Reporting (BIRT) • Graphical Editors (GEF, GMF, Zest) • Automatic Updates (p2 Update) • Presentation Framework • PDE Build / PDE JUnit • Internationalization • Eclipse RCP in the Web -> Eclipse RAP • Eclipse RCP on the mobile device -> eRCP • Eclipse E4 • Styling of UI components via CSS • XWT -> allows declarative UI definition

  26. Recommended Reading • Introduction to Eclipse RCP • http://www.vogella.de/articles/RichClientPlatform/article.html • Eclipse RCP podcast • http://www.eclipsezone.com/files/podcasts/9-RCP-Jeff.McAffer.mp3?source=podcasts • Book: Eclipse Rich Client Platform • By Jeff McAffer and Jean-Michel Lemieux • Addison-Wesley Professional • Attention: Second Edition planned for June 2009

More Related