DynaWorks Tutorial

How to write applications with the DynaWorks framework


Installing DynaWorks

After you have downloaded the DynaWorks package, you can install it on your local machine. I recommend you download the whole stuff, that is either the dynaworks-2.0.zip or dynaworks-2.0.tar.gz file.

To explain the directory structure and the files that are in the DynaWorks package, I use my own path settings as an example (these settings are also used in all the examples that come with DynaWorks).

Of cource you can use your own directory structure - you don't have to rename them ;-) You only have to change all the cpl.bat files that come with DynaWorks to match your directory settings.
Directory Setting
DynaWorks home directory g:\PalmDev\DynaWorks
Java2/SE 1.3 home directory f:\Java2\SE\1.3
Java2/ME CLDC 1.0 home directory f:\Java2\ME\CLDC
CDK4J installation directory g:\Palm\CDK4J

After you have extracted the DynaWorks package into the home directory, you will see the following directories beneath it:

g:\PalmDev\DynaWorks\      // contains the DynaWorks web pages (start index.html)
    apidoc\                // DynaWorks API documentation (javadoc)
    contrib\               // user contributions to DynaWorks
    download\              // download scripts (no downloadable files included)
    examples\
        Conduit\           // example files for the conduit development
        DynaPage\          // GUI example
        DynaDb\            // database example with custom records
            address\       // address book example
            datebook\      // datebook example
            email\         // email example
            expense\       // expense database example
            memo\          // memo example
            todo\          // todo example
    images\                // images for the web pages
	src\                   // path to source files
	workspaces\            // workspace home directory
        J9\                // VAME 1.3 (IBM) workspace
        KJava\             // KJava workspace
            classes\       // compiled classes
            lib\           // resulting JAR files (includes "kDynaWorks.jar")
            vclasses\      // preverified classes

Introduction to DynaWorks

This tutorial will show you how to use DynaWorks for your own application and database development needs. It assumes a good understanding of the Java™ platform and the basic concepts of PalmOS™ programming.

If you want to follow this tutorial "hands-on", you also need a running Java™ Micro Edition development environment on a Linux or Windows machine and a PalmOS™ device or a software emulator.

The first chapter shows you a list of devices and J2ME implementations you need and some development tools you might want to work with. Although you can write, compile and link an application by just using command line tools, it makes a lot of sense to use a real IDE for DynaWorks.

Following that is a short overview over the package structure in DynaWorks and the Table of Content at the end of this page will show you the chapters in this tutorial.

Any comments, bugs reports, suggestions or contributions and sample apps are welcomed. Please mail all you want to share to me.

Back to top of page ...

Prerequisites and Tools

This version of DynaWorks is designed to work with the J9 for Palm implementation from IBM (download from here) and the KVM / CLDC from Sun (download from here). Make sure everything is setup correctly and that you can compile and run the examples that come with these J2ME implementations.

Application developed with DynaWorks will work on the following PalmOS™ devices that run the listed J2ME implementations; for making your development process easier, I recomment to use one of the listed IDEs:

DynaWorks supported ...
... PalmOS™ devices ... J2ME implementations ... Linux/Windows IDEs
 Palm

(all models, from Palm)

 CoPILOT

(software emulator from Palm)

VisualAge Micro Edition 1.2
(from )

IBM's VisualAge Micro Edition 1.2 includes a J9 implemenation for PalmOS™ devices and a really nice IDE that runs on Linux and Windows. It includes a debugger that allows you to debug your applications on a source code level with lots of useful features. My personal choice ...

Read more about the integration of DynaWorks into the the J9/VAME1.2 in the Technology section...

 Visor

(from HandSpring)

(J2ME CLDC) Version 1.0
(from Sun)
Sun's Java2 Micro Edition, Connected Limited Device Configuration is distributed through the Sun Community Source Licensing process. It based on the KVM (K Virtual Machine) and includes a "proof-of-concept" library called KJava. DynaWorks uses some of the KJava library classes to work with the KVM implementation.

Read more about the integration of DynaWorks into the the KVM in the Technology section...

JBuilder 3.5 / 4.0
(from Borland)
Together with JBuilder Handheld Express the IDE provides support for developing solutions using the Java 2 Platform, Micro Edition (J2ME™) Software Development Kit (SDK) Version 1.0 currently targeted at the Palm OS. In addition, JBuilder provides features that dynamically adapt to any J2ME profile, including the Mobile Information Device Profiles (MIDP) currently being developed through the Java Community Process.
 WorkPad

(from IBM)

Jbed Micro Edition CLDC™
(from esmertec)
Jbed Micro Edition CLDC™ is a small and fast Java™ virtual machine (JVM) that works - among others - on embedded devices, PDAs, Internet Appliances and Smart Mobile Phones. It is initially available on devices that run the Palm OS™ operating system like the Palm Pilot™ or Handspring Visor™

Like any other JVM, JbedVM CLDC™ executes Java bytecode. Unlike most JVMs, JbedVM CLDC™ always compiles bytecode to native (machine) code on the device itself.

Back to top of page ...

The structure of DynaWorks

The DynaWorks framework consists of different sub-packages that have their special purpose. You can even use some these parts individually (without including the whole framework) - although there are some 'design links' between all these components. The individual packages are:

Name packages description
DynaPage brf.j2me.dynaworks.*
brf.j2me.dynaworks.ui.*
brf.j2me.dynaworks.env.*
brf.j2me.dynaworks.env.j9.*
brf.j2me.dynaworks.env.kjava.*
brf.j2me.dynaworks.env.jbed.*
Application and GUI framework part: All things to get a basic application with an interactive GUI running. This includes the J2ME implementation dependend packages.
DynaDb brf.j2me.dynaworks.db.*
brf.j2me.dynaworks.db.palmos.*
brf.j2me.dynaworks.db.conduits.*
brf.j2me.dynaworks.env.*
Database framework part: Everything you need to work with databases. Create your own record structure, read and write databases, synchronize databases with conduits or access built-in PalmOS™ databases (Memo, Mail, ToDo, Address, Expense and Datebook)
DynaUtil brf.j2me.dynaworks.util.*
Helper classes for math operations, PalmOS™ compatible date and time classes, Bitmaps and some other utilities to make your programming tasks easier.

The documentation is structured into the same sections as the framework itself; mainly the sections Application/GUI (DynaPage) and database and conduit handling (DynaDb). Whenever the documentation refers to these sub-packages, keep in mind they are part of the DynaWorks framework and share the same design principles (and restrictions) as the complete framework.

Back to top of page ...

Table Of Content

If you need any further information, have questions or comments, please send me an email (brf@brainon.ch). Your comments and ideas are very welcome. Everything that helps to make the framework better will benefit all.

Have fun, Bernd.

Back to top of page ...


Copyright © 2000, Bernd R. Fix. All Rights Reserved.