Apollo 37zz review

Download
by rbytes.net on

Apollo is an open-source developer test skeleton toolkit for Web Start

License: GPL (GNU General Public License)
File size: 0K
Developer: Gerald Bauer
0 stars award from rbytes.net

Apollo is an open-source developer test skeleton toolkit for Web Start. Apollo lets you turbo-charge Web Start apps without Web Start to speed up your compile/run/test/debug/goof-off cycle avoiding the hassle of stuffing, signing, uploading or downloading your jars every time you rearrange a comma in your source code.

Apollo is not a replacement for Web Start (OpenJNLP, NetX or any other app launcher). Apollo is more like a test emulator (such as POSE - Palm OS Emulator) helping you to speed up your development between full-blown, time-consuming, irreplaceable, real Web Start workouts.

Apollo can't fake every Web Start bell and whistle (e.g. download on demand) but outshines Sun's Web Start dumb dev pack stubs that merely let you compile your source. Apollo lets you popup your household browser and more without calling in the Web Start machinery.

Apollo consists of a jar that you can use to replace Sun's javax.jnlpx stubs residing in jnlp.jar that only allow you to compile your code and that ship with Sun's Web Start dev pack.

Apollo is a thin wrapper around Sun's javax.jnlpx services. If your app runs under Web Start Apollo will automatically detect it and pass all runtime service calls (such as poping up a browser window) on to the Web Start engine. If your app, however, runs without Web Start Apollo will kick in and mimick Web Start's runtime services.

To use Apollo replace all javax.jnlpx imports with apollo. Example:

import javax.jnlpx.*; // Web Start only
import apollo.*; // Web Start plus Apollo-propelled stand-alone launching

To spare you from learning yet another API set Apollo reuses all runtime service class and method names. The only exception is Apollo's ServiceManager class that adds type-safe methods to lookup pre-defined runtime services (e.g. lookupBasicService()) avoiding unexpected runtime errors and reducing source code bloat. Example:

import javax.jnlp.*
...
BasicService bs = (BasicService) ServiceManager.lookup( "javax.jnlp.BasicService" );
bs.showDocument( new URL( "http://vamphq.com/times" ) );

becomes

import apollo.*;
...
BasicService bs = ServiceManager.lookupBasicService();
bs.showDocument( new URL( "http://vamphq.com/times" ) );

or

import apollo.*;
...
ServiceManager.lookupBasicService().showDocument( new URL( "http://vamphq.com/times" ) );

Apollo lets you configure the codebase or the online/offline status of your app if you want to run it without Web Start but still use BasicService.getCodeBase() or Basic.isOffline().

By default BasicService.isOffline() returns false (meaning your app is online). If you want to change the setting you can pass the property apollo.offline=true to your app. As an alternative you can also add apollo.properties to your classpath or bundle it with your app's jar in the root directory. Inside the apollo.properties file add the apollo.offline property to match your desired setting. Note, that all apollo properties only work if your app runs without Web Start.

By default BasicService.getCodeBase() uses the working directory returned by the system property user.dir. To use a different codebase pass the property apollo.codebase=your_url_here to your app. As an alternative you can also add the apollo.codebase property to the apollo.properties file in your app's root directory where Apollo picks it up if you run your app without Web Start.

Apollo 37zz keywords