Comparison
of the Ewe VM with a PersonalJava VM
Performance and Storage Requirements
Mobile to Desktop Communication
Portable and Synchronizable Database
Implementation
The Ewe VM is targeted
at devices at the PDA level and higher. That is to say, a 32-bit OS with at
least a 160x160 touch screen, and at least 2 MB of available program memory.
The standard Java specification that also targets such devices is Sun's
PersonalJava. (The Java Micro Edition spec. is targeted at devices with much smaller
memory footprints, smaller displays and very limited I/O capabilities - Ewe
does not attempt to fit into such devices).
The most well known
PersonalJava VM available is the Jeode EVM – and it appears to be the only
PersonalJava VM that comes standard with any PDA platform; specifically the
Sharp Zaurus line of PDAs. Although versions of this VM are available for
different platforms (e.g. PocketPC) none of them are available for free.
The table below
compares some of the essential features of the Ewe VM and the Jeode EVM. The
comparison was made on the same Sharp Zaurus 5500 device.
|
|
Ewe VM |
Jeode PersonalJava EVM |
|
Static Storage Space |
2.0 MB |
2.7 MB |
|
Runtime Memory
(Min.) 1 |
550K |
1600K |
|
Start-up Time 1 |
< 1 second |
2.5-3 seconds |
|
GUI Feature Set |
Advanced |
Simple AWT |
|
Zip File Utilities |
Yes |
Yes |
|
Image Display and
Writing |
Yes |
Display only |
|
Socket API |
Yes |
Yes |
|
Serial Port API |
Yes |
Yes |
|
Infra-Red API |
Yes |
No |
|
Desktop to Mobile Communication |
Yes |
No |
|
Portable Database
Implementation |
Yes |
No |
|
Automatic
Synchronization of Databases |
Yes |
No |
|
Registry Access |
Yes |
No |
|
Native Method API |
Yes |
Yes |
1.
Runtime memory and Start-up Time were measured by each VM running a simple
application that displays a "Hello World" dialog box.
Ewe is available, free
of charge, for the most number of mobile and platforms to date. This
includes:
And coming soon for:
Additionally, Ewe applications
will run on any system with a Java 1.1 virtual machine or better.
The Ewe VM and its
class library were designed from the ground up to be targeted at Mobile
Platforms. The PersonalJava specification is in reality, simply a stripped
down version of the Java 1.1 specification – originally designed for desktops.
Unfortunately the design principles that were applied for the development of
Java 1.1 simply do not translate well to the mobile device.
The Jeode PersonalJava
VM uses standard Jar files to store its class files. While this may reduce the
storage space required by the VM it does not help at all reducing the dynamic
space required when running, since the classes must be uncompressed, and then
translated into internal data structures. Further, uncompressing, these class
files takes up considerable time at program start up. Users may be prepared to
wait 3 seconds for an application to start on a desktop, but this is generally
not acceptable on a mobile platform – especially when the other applications
start virtually instantaneously.
The Ewe VM uses a
proprietary storage format for its system classes that allows the class library
to be memory mapped and used directly, instead of needing to be decoded and restructured
in memory. The result is a dramatic difference in the runtime memory
usage and start up time.
On
average, the Ewe VM starts 3 times faster and uses 3 times less memory than the
PersonalJava VM.
This is no minor
detail. The Casio BE-300 device is a medium powered device that has about half
the memory of the Zaurus and runs at about half the clock speed. Yet the Ewe VM
on the Casio BE-300 starts faster and uses far less memory than the EVM on the
Zaurus. In fact, you can run several Ewe applications on the BE-300 or
Zaurus simultaneously (up to six running at the same time have been tested)
with no memory or performance problems at all.
The Ewe GUI library
provides advanced GUI features not available in the Java AWT environment. These
features are comparable to the Swing GUI features available for Java 1.2, but
in a size that can actually fit on a Mobile device. Here are some features that
are available in the Ewe library, but not on the PersonalJava platform:
Adjustable Split-Panels – User adjustable split-panels.
Tabbed Panels – With tabs placed on top or below, depending on the running platform
or programmer choice.
Table Controls – Fully customisable
and user resizable. Table controls can actually contain other controls within
their cells.
Tree Controls – Fully customisable.
Tree controls can also contain other controls within their nodes.
Date Chooser Control – Lets users select dates from an easy calendar like display.
Mosaic Panels – These allow any number of animated images to be displayed and allow the user to interact with them. This includes dragging them around, dropping them on other images, etc.
Drag and Drop – Drag and drop data within and between controls.
Tool Tips – Full tool tips with images and text for all controls.
Ewe also features a FileChooser dialog box that is far more advanced than the standard Java file chooser
box, yet adjusts itself and works equally well on a desktop or mobile platform.
Here is the
FileChooser in two different forms on the Zaurus:

The second screen shot
shows Tree controls, Table controls (the file list), and Tabbed controls. Note
that the Tabbed control displays full icon and text for the selected tab, but
only the icon for the unselected tabs. This is a very useful technique for
saving space on mobile devices. Note also that it is possible to embed other
controls on either side of the tabs in a Tabbed control. Again, this is very
useful for saving space on mobile devices.
Compare this with the
Jeode PersonalJava EVM FileDialog box:

As you can see it only
covers half the screen and provides virtually none of the richness and
usability of the Ewe FileChooser, not to mention taking about three times
longer to be initially displayed.
Ewe provides a number
of advanced GUI data transfer as part of its standard library. These features
allow you to transfer data between a Java object and an on screen user
interface with virtually no programming.
Look at the example
code below. It shows how a Java object can be automatically transferred and
edited on-screen by the user with no extra programming. The Editor
object has the capability to extract the public fields within the class and
determine the best user interface and prompt to use for each field.
//##################################################################
public
class Contact{
//##################################################################
public
String lastName = "Simpson";
public
String firstNames = "Homer Jay";
public
String phoneNumber = "868-321-3325";
public
ewe.sys.Date birthday = new ewe.sys.Date(1,5,1950);
public
boolean business = true;
//===================================================================
public
String toString(){return firstNames+" "+lastName+"\n"+birthday;}
//===================================================================
public
static void main(String args[])
//===================================================================
{
ewe.sys.Vm.startEwe(args);
Contact c = new Contact();
ewe.ui.Editor ed = new ewe.ui.Editor();
ed.setFields(c);
ed.title = "Contact Info";
ewe.ui.Gui.setOKCancel(ed);
if (ed.execute() == ed.IDOK)
new
ewe.ui.MessageBox("Entered","You entered:
\n"+c.toString(),ewe.ui.MessageBox.MBOK)
.execute();
ewe.sys.Vm.exit(0);
}
//##################################################################
}
//##################################################################
When executed, this
code produces the following form:

Even more advanced data
transfer features are available in Ewe that greatly reduce the amount of coding
required to go from object data to user interface.
Ewe provides the
standard TCP/IP capabilities of Java, including Socket and ServerSocket
classes. Additionally Ewe provides, on mobile devices, the ability to set up a
ServerSocket to listen to incoming Socket connections on an Infra-Red
port. This is as easy as using the host name "infra-red" when
creating a ServerSocket or Socket. This allows Ewe applications to communicate
across the Infra-Red link even between different mobile devices. Infra-red
communication between the Zaurus and PocketPC have been fully successful using
this API.
Ewe also provides a SerialPort
class for communicating on the serial port of devices or desktop PCs.
Ewe provides, on all
platforms, an API and implementation for Ewe applications on the desktop to
run and communicate with Ewe applications on the mobile device. A EweSync
service provides this communication across ActiveSync (for WinCE devices) and
across the Zaurus USB link. This service not only provides a uniform
communication service across the different platforms, but also allows for the automatic
execution of Ewe applications once this link is made. This allows for fully
automatic synchronization of Ewe applications once a device is connected to the
PC. No other mobile Java platform provides this kind of cross-platform API.
Ewe provides a full
implementation of a searchable, sortable platform-independent database.
Fields within the database can be set directly from the fields of a Java class
and that same class can be used as a data interface between your application and
records within the database.
The implementation
even allows the database to be set up to facilitate synchronization with a
database on the desktop, through the Mobile to Desktop link.