Brief introduction
The E4 project, which is still in its early stages, is the next generation Eclipse. Eclipse V4.0 will be released in 2010. With current Eclipse and OSGi Technologies as a solid foundation, a major goal of E4 is to make it easier for you to write and reuse components. In the future, there will be a unified common platform across a variety of computing environments (Web/ria, desktops, servers, clouds, embedded devices), and more technology will be integrated into Eclipse. Like what:
An enhanced programming model based on OSGi, which provides better software component isolation.
XWT, a new toolkit or framework for declaratively defining the structure of a swt/jface application.
Cascading Style Sheets (CSS) renders UI components without having to explicitly modify the application code.
A new port for the standard widget Kit (SWT), also known as the Swt browser version, allows the current SWT application to be executed in the browser's Flash player.
Write software in JavaScript for execution within Eclipse runtime.
In this article, we understand some of the main features of E4. We'll also create a sample application that uses E4 's new XWT interface and data-binding features. XWT is a declarative toolkit that is used to write Swt/jface UI components in XML.
New features
From the programming model to the runtime extension, E4 adds a lot of new features. These new features allow the Eclipse platform to be extensible. This section provides a brief introduction to some of the new features that deserve attention.
Service programming model
There are three participants in the original service programming model (OSGi or Eclipse Extensions Registry): Service agents, service providers, and service consumers. The service provider will be registered with the service agent, while the service consumer will seek out the services that are needed in the Service Broker. This is a good way to split the service provider and consumer, but it requires that the service provider and the consumer have a clear understanding of the specific service agent.
The enhanced services programming model in E4 introduces the concept of context, which is part of the Service Broker, as a mechanism for storing and knowing how to locate these services and provide them to service consumers. At run time, the service consumer uses dependency injection technology to inject the required service provider implementation. This eliminates the knowledge of the Service Broker. A service provider can use a variety of techniques to declare or register itself with a service agent. Figure 1 shows the development and evolution of the service programming model.
Figure 1. Service programming model
Modeled UI
In earlier versions of the Eclipse platform UI, Workbench was explicitly hard-coded to lay out workbench windows, Workbench pages, editor regions, or view stacks. Customizing an Eclipse based application is not allowed.
E4 introduces an additional layer that extracts and abstracts UI elements into a single model. The application can reconfigure or extend the model to make a different appearance. This model can also be manipulated dynamically, and changes in the model can immediately reflect changes in the UI.