Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

The Eclipse Device Software Development Platform: Mobile Java


The mission of the Eclipse.org Device Software Development Platform (DSDP) is to create an open, extensible, scalable, and standards-based development platform to address the needs of the device (embedded) software market by enabling developers and vendors to create differentiated, specialized, and interoperable solutions to help customers and users of Eclipse-based products develop device software faster, better, and at lower cost.

DSDP was initially proposed with two Wind River sponsored sub-projects, Device Debugging (DD) and Target Management (TM). Because of their growing importance, a few months after project creation, two additional projects were added: Mobile Tools for the Java Platform (MTJ) and Native Application Builder (NAB).

The importance of doing Java right
The Java programming language is becoming more and more popular in mobile devices, thanks to an ever-growing richness of the language and libraries. Mobile devices are also becoming more powerful and advanced, with faster processors, more memory, and larger displays. Developing applications for the mobile Java environment presents unique challenges for developers.

Specifically, unlike the straightforward J2SE and J2EE environments, there are a number of mobile configurations and profiles, such as the Mobile Information Device Profile (MIDP) on top of the Connected Limited 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 umbrella JSR's such as Java Technology for the Wireless Industry (JTWI) that require development tools to assist in managing the runtimes/class libraries for development work and runtime binding.

This ability to develop for multiple targets and use common source code with different build configurations is critical in mobile Java development projects. In addition to this management of runtimes and the related challenges, mobile Java applications have unique launching and debug requirements. Unlike J2SE or J2EE, applications are not always simply placed on a server for download as needed. Rather, developers often require device emulators for debugging and testing on the development host.

Developers also require the ability to deploy, launch, debug, test, and analyze performance of the applications on the actual devices themselves, which can have different methods and levels of connectivity based on the class of the mobile device. Along with this requirement is the need for a robust deployment solution that can map to a final production environment.

Finally, the mobile Java developer still requires the normal set of development tools (editor, code generation and refactoring, UI design, etc.) Having a common set of tooling and frameworks across the mobile Java space makes the development effort and cost manageable for developers and reduces the learning time when moving from one mobile platform to the next.

Mobile Tools for the Java Platform (MJT) Project
The goal of the Mobile Tools for the Java Platform (MTJ) project is to extend existing Eclipse frameworks to support mobile device Java application development, including a device and emulator framework, a deployment framework, generic build processes for mobile application development, mobile device debugging, application creation wizards, UI design tools, localization, optimization, and security.

The project is sponsored by Nokia, and much of the initial code in the MTJ project will be contributed by Nokia and IBM from their commercial products. Other participants in MTJ include representatives from 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 companies building commercial mobile Java development products. In each section below, 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 the mobile segment, the runtime environment is a device emulator or an actual hardware device (such as a phone from Nokia or SonyEricsson).

The MTJ project will provide features to manage mobile runtimes and provide frameworks for device vendors to add those runtimes to the development environment. From the user's point of view, they will simply select with runtime they want to use to run the application.

Deployment framework
With mobile device development, software must eventually be deployed and tested on the actual hardware, and this requires simple capabilities for remote target image transfer that utilize the communication capabilities of the device itself, e.g. Bluetooth, USB, or IrDA.

In existing development environments, deployment is typically done using vendor-specific "PC suites" which connect phones to host computers. MTJ will develop a deployment framework that provides an API for vendor-supplied plug-ins that will handle deployment for these vendors' devices using their PC suites.

Generic and customizable build process for mobile application development As described above, there are a number of mobile configurations and profiles in mobile Java.

The goal of MTJ is to enhance the normal build process with mobile extensions like JAR and JAD file generation. Also the build process must often include additional steps like signing and obfuscation. To accomplish this, MTJ will extend the build frameworks of the Eclipse Platform.

Debugging
Intimately related to the Device and Emulator framework described earlier, 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 the local emulator or on the device itself, and allows the developer to attach to that remote application. Because of the tight coupling with the Device and Emulator frameworks, MTJ will need to provide a robust framework for device and platform vendors to create extensions for their devices' specific connectivity.

Application creation wizard
The Eclipse Platform already has application wizards to generate Java projects with or without application skeleton code. However, the existing wizards are not usable for mobile Java development.

MTJ will extend the capabilities of the project wizards to take into account the differing configurations and profiles of mobile Java, thereby relieving the developer of the task of generating boilerplate code for each application configuration/profile type.

Visual editing framework
UI design tools improve developer efficiency when building GUI-based applications and also decrease the barrier to entry for newcomers. There are already visual designers in the Eclipse platform but they don't contain support for mobile devices.

MTJ will extend the Eclipse Visual Editor (VE) capabilities with mobile UI styles, components, and layout rules. The intent is to create a framework that enables the use of different kinds of vendor-specific UI implementations, e.g. different resolutions, vendor-specific look and feel, etc.

In addition to the framework, MTJ will also create a generic UI designer implementation. Finally, a Screen Flow designer tool will be provided to help developers easily create application logic. It will provide easy drag and drop functionality for adding different kind of screens and transitions between them. Localization

The mobile application market is worldwide, and therefore applications must be localized. MTJ will provide localization tooling to simplify this task. Rather than just manually coding localization with resource files, MTJ would like to create a localization GUI that will assist technical writers in building localization resources for multiple languages simultaneously.

Obfuscation and code size/performance optimization
Mobile devices, like most other embedded devices, are restricted in the amount of target memory; so it is important that code is compressed as small as possible.

There are a number of ways to accomplished this. Obfuscation is one possibility, along with tooling and frameworks to enable performance and size analysis on the emulator or physical device, which can then be driven back into the build process or can be used by the developer to streamline the code. MTJ will supply one internal obfuscator and also provide the capability to integrate external obfuscators in the build process instead of the internal one.

<>Signing
Because mobile devices are open and accessible to third party developers, security is especially important. One solution for securing mobile applications is to require that the applications are signed with an authorized signing certificate. While the signing process is very similar to signing a normal JAR file, MTJ will provide additional tooling to sign mobile applications, including extensibility for vendor-specific singing solutions.
DSDP Panel
Release Plans for MTJ
As with the other projects in DSDP, the MTJ project is very new. The goal is to have an initial release that is roughly synchronized with the Eclipse 3.2 platform release in June 2006.

This initial release will have a subset of the functionality described in the previous section, but will include the key capabilities required for mobile Java development, including:

1) Management of runtime environment (device emulators and real devices)
2) Build process (with enhancements for packaging and signing)
3) Deployment
4) Other essential developer features such as project and class creation.

Work planned after June includes:

1) Visual editing
2) Screen flow tool for J2ME development
3) Tools to help developers to manage device fragmentation
4) Support localization

The project plans call for the first official build in February 2006 and a second Milestone release in March 2006.

Native Application Builder (NAB) Project
Also important in many mobile and embedded consumer applications is the Native Application Builder (NAB) project, born out of the WideStudio/MWT open source project

WideStudio/MWT is a general tool and run-time library for building GUI applications on multiple host and embedded platforms, such as Windows, Linux, MacOS, and several embedded real-time operating systems.

The WideStudio portion provides the GUI application builder, and MWT (Multiplatform Widget Toolkit) provides the operating system specific implementations.

The goal of WideStudio/MWT is to allow the user to write a GUI application once and build it for many platforms without changing the code. Conceptually, this is similar to SWT and JFace, with the notable exception that the WideStudio/MWT tool is written in C++ and designed for use in C++ applications.

Since the scope of the DSDP project is the embedded space, the Native Application Builder project was created to bring into Eclipse the portions of the WideStudio tool that are focused on building embedded GUI's in C++.

Technical Plans
In Figure 1, below, is comparison 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 WideStudio application builder ported to the Eclipse environment. The MWT libraries are not included in the project, since they are run-time implementations for multiple operating systems, many of which are not embedded. Users of NAB can pick up the desired run-time portions from the WideStudio website. Also note that NAB is sometimes referred to as "eWideStudio", where the "e" stands for embedded.

Figure 1

The NAB project (Figure 2 below) is implemented on top of two frameworks: the Native Application Editor Framework (NAEF) and the Native Code Generation Framework (NCGF).

The Native Application Editor Framework provides functionality for the visual editing of an application built on the Native Tool Kit (NTK). The Native Code Generation Framework takes GUI designs created on NAEF and drives the Native Code Generator (NCG) to produce OS-specific implementations of the GUI.

Figure 2

The NAB project provides the following capabilities for building GUI applications:

1) GUI Editing. NAB extends the Eclipse Visual Editor (VE) plug-in for the Java language. Users can visually arrange and edit their desired user interface, and attributes of the various controls can be specific visually.

2) C/C++ Source Code Generation. Source code, including event handling functionality, is generated for the visually-designed GUI.

3) Application Build and Debug. Utilizing CDT, the source code can be compiled, executed, and debugged on the native development machine using Eclipse. Code can also be cross-compiled for embedded targets.

For a complete development environment, NAB needs CDT with GCC/GDB and the MWT library plug-ins distributing from WideStudio.org. These include the MWT binary libraries (MWT, MWTBI and MWTCG) and their Java wrappers.

Release Plans and Next Steps  for NAB
As previously mentioned the WideStudio/MWT project has been an open source project in its own right for quite some time and already enjoys a large community of users.

The WideStudio developers started porting the application builder portions of their technology to Eclipse last year. The goal for the NAB project is to have an initial release that is roughly synchronized with the Eclipse 3.2 platform release in June 2006.

The next step for the project is to build a relationship with the eRCP/eSWT project and to look for commonality in the architectures and tooling.

Doug Gaff is engineering manager on Wind River's commercial Eclipse-based device software suite and PMC Lead for the Eclipse.org Device Software Development Platform (DSDP). www.eclipse.org www.windriver.com

This article is excerpted from a paper of the same name presented at the Embedded Systems Conference Silicon Valley 2006. Used with permission of the Embedded Systems Conference. For more information, please visit www.embedded.com/esc/sv


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.