The mission of the Eclipse.org Device Software Development Platform (DSDP ) is to create an open,extensible, scalable, and standards-based development platform toaddress the needs of the device (embedded) software market by enablingdevelopers and vendors to create differentiated, specialized, andinteroperable solutions to help customers and users of Eclipse-basedproducts develop device software faster, better, and at lower cost.
DSDP was initially proposed with two Wind River sponsoredsub-projects, Device Debugging (DD) and Target Management (TM). Becauseof their growing importance, a few months after project creation, twoadditional projects were added: Mobile Tools for theJava Platform (MTJ) and Native Application Builder (NAB ) .
The importance of doing Java right
The Java programming language is becoming more and more popular inmobile devices, thanks to an ever-growing richness of the language andlibraries. Mobile devices are also becoming more powerful and advanced,with faster processors, more memory, and larger displays. Developingapplications for the mobile Java environment presents unique challengesfor developers.
Specifically, unlike the straightforward J2SE and J2EE environments,there are a number of mobile configurations and profiles, such as theMobile Information Device Profile (MIDP) on top of the ConnectedLimited Device Configuration (CLDC) and “Foundation” and “Personal”Profiles on top of the Connected Device Configuration (CDC).
There are also mobile-related Java Specification Requests (JSR's)such as JSR248 (Mobile Service Architecture for CLDC) and umbrellaJSR's such as Java Technology for the Wireless Industry (JTWI) thatrequire development tools to assist in managing the runtimes/classlibraries for development work and runtime binding.
This ability to develop for multiple targets and use common sourcecode with different build configurations is critical in mobile Javadevelopment projects. In addition to this management of runtimes andthe related challenges, mobile Java applications have unique launchingand debug requirements. Unlike J2SE or J2EE, applications are notalways simply placed on a server for download as needed. Rather,developers often require device emulators for debugging and testing onthe development host.
Developers also require the ability to deploy, launch, debug, test,and analyze performance of the applications on the actual devicesthemselves, which can have different methods and levels of connectivitybased on the class of the mobile device. Along with this requirement isthe need for a robust deployment solution that can map to a finalproduction environment.
Finally, the mobile Java developer still requires the normal set ofdevelopment tools (editor, code generation and refactoring, UI design,etc.) Having a common set of tooling and frameworks across the mobileJava space makes the development effort and cost manageable fordevelopers and reduces the learning time when moving from one mobileplatform to the next.
Mobile Tools for the JavaPlatform (MJT) Project
The goal of the Mobile Tools for the Java Platform (MTJ) project is toextend existing Eclipse frameworks to support mobile device Javaapplication development, including a device and emulator framework, adeployment framework, generic build processes for mobile applicationdevelopment, mobile device debugging, application creation wizards, UIdesign tools, localization, optimization, and security.
The project is sponsored by Nokia, and much of the initial code inthe MTJ project will be contributed by Nokia and IBM from theircommercial products. Other participants in MTJ include representativesfrom the EclipseME and Antenna open-source projects, SonyEricsson,Sybase, ShareME Technologies, Apogee Software, and Wirelexsoft.
MTJ plans to extend the Eclipse Platform, JDT, and the Visual Editor(VE) components and also provides extensible frameworks for companiesbuilding commercial mobile Java development products. In each sectionbelow, we describe the MTJ architecture plans in more technical detail.
Device and emulator framework
Normally Java runtimes are managed in Eclipse as a JRE. However, in themobile segment, the runtime environment is a device emulator or anactual hardware device (such as a phone from Nokia or SonyEricsson).
The MTJ project will provide features to manage mobile runtimes andprovide frameworks for device vendors to add those runtimes to thedevelopment environment. From the user's point of view, they willsimply select with runtime they want to use to run the application.
With mobile device development, software must eventually be deployedand tested on the actual hardware, and this requires simplecapabilities for remote target image transfer that utilize thecommunication capabilities of the device itself, e.g. Bluetooth, USB,or IrDA.
In existing development environments, deployment is typically doneusing vendor-specific “PC suites” which connect phones to hostcomputers. MTJ will develop a deployment framework that provides an APIfor vendor-supplied plug-ins that will handle deployment for thesevendors' devices using their PC suites.
Generic and customizable build process for mobile applicationdevelopment As described above, there are a number of mobileconfigurations and profiles in mobile Java.
The goal of MTJ is to enhance the normal build process with mobileextensions like JAR and JAD file generation. Also the build processmust often include additional steps like signing and obfuscation. Toaccomplish this, MTJ will extend the build frameworks of the EclipsePlatform.
Intimately related to the Device and Emulator framework describedearlier, MTJ will enhance the current Java Debugging environment (JDT)to use mobile runtimes, either emulator-based or on a real device.
This task extends to launching the JVM and applications(s) on thelocal emulator or on the device itself, and allows the developer toattach to that remote application. Because of the tight coupling withthe Device and Emulator frameworks, MTJ will need to provide a robustframework for device and platform vendors to create extensions fortheir devices' specific connectivity.
Application creation wizard
The Eclipse Platform already has application wizards to generate Javaprojects with or without application skeleton code. However, theexisting wizards are not usable for mobile Java development.
MTJ will extend the capabilities of the project wizards to take intoaccount the differing configurations and profiles of mobile Java,thereby relieving the developer of the task of generating boilerplatecode for each application configuration/profile type.
Visual editing framework
UI design tools improve developer efficiency when building GUI-basedapplications and also decrease the barrier to entry for newcomers.There are already visual designers in the Eclipse platform but theydon't contain support for mobile devices.
MTJ will extend the Eclipse Visual Editor (VE) capabilities withmobile UI styles, components, and layout rules. The intent is to createa framework that enables the use of different kinds of vendor-specificUI implementations, e.g. different resolutions, vendor-specific lookand feel, etc.
In addition to the framework, MTJ will also create a generic UIdesigner implementation. Finally, a Screen Flow designer tool will beprovided to help developers easily create application logic. It willprovide easy drag and drop functionality for adding different kind ofscreens and transitions between them. Localization
The mobile application market is worldwide, and thereforeapplications must be localized. MTJ will provide localization toolingto simplify this task. Rather than just manually coding localizationwith resource files, MTJ would like to create a localization GUI thatwill assist technical writers in building localization resources formultiple languages simultaneously.
Obfuscation and codesize/performance optimization
Mobile devices, like most other embedded devices, are restricted in theamount of target memory; so it is important that code is compressed assmall as possible.
There are a number of ways to accomplished this. Obfuscation is onepossibility, along with tooling and frameworks to enable performanceand size analysis on the emulator or physical device, which can then bedriven back into the build process or can be used by the developer tostreamline the code. MTJ will supply one internal obfuscator and alsoprovide the capability to integrate external obfuscators in the buildprocess instead of the internal one.
Because mobile devices are open and accessible to third partydevelopers, security is especially important. One solution for securingmobile applications is to require that the applications are signed withan authorized signing certificate. While the signing process is verysimilar to signing a normal JAR file, MTJ will provide additionaltooling to sign mobile applications, including extensibility forvendor-specific singing solutions.
Release Plans for MTJ
As with the other projects in DSDP, the MTJ project is very new. Thegoal is to have an initial release that is roughly synchronized withthe Eclipse 3.2 platform release in June 2006.
This initial release will have a subset of the functionalitydescribed in the previous section, but will include the keycapabilities required for mobile Java development, including:
1) Management of runtimeenvironment (device emulators and real devices)
2) Build process (withenhancements for packaging and signing)
4) Other essential developerfeatures such as project and class creation.
Work planned after June includes:
1) Visual editing
2) Screen flow tool for J2MEdevelopment
3) Tools to help developers tomanage device fragmentation
4) Support localization
The project plans call for the first official build in February 2006and a second Milestone release in March 2006.
Native Application Builder(NAB) Project
Also important in many mobile and embedded consumer applications is theNative Application Builder (NAB) project, born out of the WideStudio/MWT open source project.
WideStudio/MWT is a general tool and run-time library for buildingGUI applications on multiple host and embedded platforms, such asWindows, Linux, MacOS, and several embedded real-time operatingsystems.
The WideStudio portion provides the GUI application builder, and MWT(Multiplatform Widget Toolkit) provides the operating system specificimplementations.
The goal of WideStudio/MWT is to allow the user to write a GUIapplication once and build it for many platforms without changing thecode. Conceptually, this is similar to SWT and JFace, with the notableexception that the WideStudio/MWT tool is written in C++ and designedfor use in C++ applications.
Since the scope of the DSDP project is the embedded space, theNative Application Builder project was created to bring into Eclipsethe portions of the WideStudio tool that are focused on buildingembedded GUI's in C++.
In Figure 1, below, iscomparison block diagram between the original WideStudio/MWT project(right) and the NAB tool as it will exist in Eclipse (left).
As is illustrated, the Native Application Builder is the WideStudioapplication builder ported to the Eclipse environment. The MWTlibraries are not included in the project, since they are run-timeimplementations for multiple operating systems, many of which are notembedded. Users of NAB can pick up the desired run-time portions fromthe WideStudio website. Also note that NAB is sometimes referred to as”eWideStudio”, where the “e” stands for embedded.
The NAB project (Figure 2 below) is implemented on top of two frameworks: the Native Application EditorFramework (NAEF) and the Native Code Generation Framework (NCGF).
The Native Application Editor Framework provides functionality forthe visual editing of an application built on the Native Tool Kit(NTK). The Native Code Generation Framework takes GUI designs createdon NAEF and drives the Native Code Generator (NCG) to produceOS-specific implementations of the GUI.
The NAB project provides the following capabilities for building GUIapplications:
1) GUI Editing. NAB extendsthe Eclipse Visual Editor (VE) plug-in for the Java language. Users canvisually arrange and edit their desired user interface, and attributesof the various controls can be specific visually.
2) C/C++ Source Code Generation. Source code, including event handling functionality, is generated forthe visually-designed GUI.
3) Application Build and Debug. Utilizing CDT, the source code can be compiled, executed, and debuggedon the native development machine using Eclipse. Code can also becross-compiled for embedded targets.
For a complete development environment, NAB needs CDT with GCC/GDBand the MWT library plug-ins distributing from WideStudio.org. Theseinclude the MWT binary libraries (MWT, MWTBI and MWTCG) and their Javawrappers.
Release Plans and Next Steps for NAB
As previously mentioned the WideStudio/MWT project has been an opensource project in its own right for quite some time and already enjoysa large community of users.
The WideStudio developers started porting the application builderportions of their technology to Eclipse last year. The goal for the NABproject is to have an initial release that is roughly synchronized withthe Eclipse 3.2 platform release in June 2006.
The next step for the project is to build a relationship with theeRCP/eSWT project and to look for commonality in the architectures andtooling.
Doug Gaff isengineering manager on Wind River's commercialEclipse-based device software suite and PMC Lead for the Eclipse.org Device SoftwareDevelopment Platform (DSDP). www.eclipse.org www.windriver.com
This article is excerpted from apaper of the same name presented at the Embedded Systems ConferenceSilicon Valley 2006. Used with permission of the Embedded SystemsConference. For more information, please visit www.embedded.com/esc/sv.