The project has been created.
The EMF Parsley project is a proposed open source project under the Eclipse Modeling Project.
This proposal is in the Project Proposal Phase (as defined in the Eclipse Development Process) and is written to declare its intent and scope. We solicit additional participation and input from the Eclipse community. Please send all feedback to the Eclipse Proposals Forum.
BackgroundThe Eclipse Modeling Framework (EMF) provides code generation facilities for building tools and applications based on structured data models. Using EMF together with other frameworks like, for instance, JFace and Databinding for the user interface and Teneo or CDO for persistence, we can build powerful model-based UI parts. However, setting up and assembling all these technologies still requires both deep knowledge of most internal details and a considerable amount of time. Moreover, typically, reusing existing UI parts in different applications is not straightforward. Our framework aims at providing a set of reusable out-of-the-box UI components based on EMF, yet highly customizable in a quick way.
ScopeThe scope of this project is
- to provide a framework to easily develop UI components based on EMF models, which hides most of the complexity of internal details.
- to make the developed components highly reusable and customizable via Dependency Injection (in particular, Google Guice).
- to provide a set of such components (e.g., trees, tables, forms, views and editors) that can be used out-of-the-box and customized (these can also be seen as reference implementations).
EMF Parsley provides a framework to easily develop UI components based on EMF models; the framework hides most of the complexity of internal details, in a way that, to create a JFace viewer and connect it to an EMF resource, usually requires a few lines of code. The main design principle underlying this framework is to split responsibilities into small classes (adhering to the Single Responsibility Principle); thus, customizing a single aspect of the components requires to specialize only the class that deals with that specific aspect, not the whole component. This should maximize code reuse and promote a programming style where the classes by the programmer are usually very small and deal with not too many aspects.
The framework also comes with some UI components that can be used out-of-the-box (including trees, tables and forms, and view and editor parts). Programmers can rely on these components and customize them, or use them as a reference implementation to build their own components based on our framework.
To customize existing components we rely on Dependency Injection, in particular using Google Guice. The configuration and setup of Guice modules uses the same mechanism of Xtext (i.e., binding an implementation class only requires to write a specific "bind" method in the main Guice module class). The initial setup of a project which uses EMF Parsley is done via a project wizard, so that the programmer does not have to deal with these details.
Specification of custom behaviors (e.g., label providers, content providers, context menus, etc.) for elements of the EMF model in a component can be made based on their types, but without requiring long cascades of Java "instanceof" and casts: we provide a polymorphic method dispatch mechanism (again, borrowed from Xtext) that allows to write cleaner and declarative code.
We also provide a DSL (implemented in Xtext) for making the use of our framework easier: customizations can be specified in a compact form in a single file; from that all of the other Java classes are automatically generated and bound in the Guice module. The DSL provides a fully feature Eclipse editor and, by relying on Xbase, it provides a Java-like language completely integrated with Java and Eclipse JDT.
Setting up views (like in the following screenshot) only requires a few lines of Java code.
Using the DSL (like in the following screenshot) allows to quickly customize the components (the corresponding Java code will be automatically generated by the DSL compiler).
Regarding the persistence aspect, the framework can handle a generic EMF persistence implementation, like XMI or Teneo, just providing the EMF Resource's URIs. It also includes a bundle for handling CDO resources, which takes care of CDO Sessions and Transactions transparently.
All sources are covered by test, both with JUnit and SWTBot. Tests are already integrated in the Continuous Integration system implemented with Jenkins.
Also the building and update site architecture is already setup and implemented with Buckminster. The latest is heavily used throughout the whole development cycle, starting from the workspace and platform materialization up to headless building and continuous integration.
In addition to be used to render RCP UI, the framework is out-of-the-box ready to be used for RAP development.
The framework that is closer to our proposal is EMF Client Platform. However, while the latter aims at providing a quick way of obtaining a full application based on EMF, EMF Parsley aims at providing single smaller and reusable components. Moreover, our components are not customized via extension points, but using injection with plain Java and with a DSL.
This project leverages and integrates very well with many widely-used Eclipse projects (e.g., EMF, JFace, Xtext, CDO). Our purpose is to give it the broader visibility among individuals, developers as well as companies. Eclipse offers the right higher reliability in terms of long-term support, so that it is expected to attract more interest and participation from other parties. This will lead to greater market penetration, while improving quality and reducing development costs.
The initial contribution consists of the following sources, material and architecture already setup for the current EMF Parsley repository at EclipseLabs, which include:
- Basic Components (widgets and parts)
- EMF persistence (i.e. for XMI or Teneo)
- CDO persistence
- DSL Editor and code generator
- RAP integration bundle
- Eclipse 4 enabled
- Help Documentation and Tutorials
- Tests, Continuous Integration, Build and Update Site infrastructure
Note that at the moment, the packages of our framework do not include org.eclipse.*; we plan to change it from it.rcpvision.emf.components.* to org.eclipse.emf.parsley.* if the proposal is accepted.
Legal IssuesAll contributions will be distributed under the Eclipse Public License.
The following individuals are proposed as initial committers to the project:
- Lorenzo Bettini, University of Turin
- Francesco Guidieri, RCP Vision
- Vincenzo Caselli, RCP Vision
We welcome additional committers and contributions.
The following Architecture Council members will mentor this project:
- Ed Merks
- Eike Stepper
The following individuals, organisations, companies and projects have expressed interest in this project:
Project SchedulingInitial contribution is ready to be published.
Changes to this Document
|23-April-2013||Eclipse 4 enabling updates, documentation added|
|23-April-2013||Interested parties added, resize images|