May 24th, 2003
Thinlet is a Java GUI toolkit that I’ve been using in my recent project. It allows you to design the view of your applications using a simple XML format (much like XUL), thereby enforcing clean separation of view and controller, a common fallacy in Swing-based or AWT-based programs (not saying it can’t be done, but it is often too easy to mush your view and controller together). Best of all, it works on a PersonalJava environment which is the target platform for my application, so there won’t be problems porting it into PDAs. There is limited functionality, though to be sure, the developers are actively implementing new widgets and functionality upon user requests. For example, automatic sorting of lists and popup (context) menus are already in the latest CVS sources. The developers are also spending time refactoring their design, since Thinlet is basically 1 gargantuan class with 6000+ lines of code. Nevertheless, it’s simplicity and portability across even limited platforms is a big factor in applications where it matters.
Check out a demo of Thinlet widgets as well as an Amazon browser (it works - try searching something on it).
Through my search for a suitable XUL or XUL-like toolkit, Luxor XUL and jXUL turned up. jXUL, unfortunately, has seen no developer activity since late 2001, but Luxor XUL seems great, only it depends too much on Java 2 APIs to port easily. I’m not too sure about committing to jXUL in future projects without a good look at the functionality provided, but I’m pretty sure Luxor XUL would be worth more than a look.
May 24th, 2003
Michael F. Aube and Susan Post from Booz Allen & Hamilton had written a DAML/XSLT Adapter that allows conversion of an arbitrary DAML document into other formats utilizing an XSLT stylesheet. You can read more about it here. It’s rather ‘academic’-looking at the moment, but it is a promising project. For one thing, it’d allow conversion of DAML documents into a more simplified XML format which can then be parsed in restricted Java environments like PDAs.
I’ve been looking for a DAML parser that works on JDK 1.1.8 (which is the JVM version supported on most PDAs), but prolonged searches turned up naught. This seems to be a possible solution to my problems because the heavy-weight peer where the PDA gets the DAML document (wirelessly) from can instead convert it into a simplified XML format suitable for parsing on the PDA. Why parsing? It’s to allow editing of DAML ontologies via a GUI. When transferring back, the conversion can be done the other way around, with total transparency to users at both ends. I’ll be looking into this and will update on my experiences working with this.
May 24th, 2003
Ah this is me finally getting into the blog scene! I’m an aspiring J2ME developer, and an even more aspiring J2EE developer. That aside, I’m your usual geek programmer type who spends more time in front of computers than I should, both in university, at home and at work. This will be a good place to put down my thoughts and discoveries in the world of Open Source, programming, web development, as well as more mundane stuff (like how life sucks, extreme lack of girls in my life, Liverpool FC, and music).
Name: Cheah Chu Yeow
Pseudonym: redemption
Occupation: Student at local university
Location: in front of a computer, Singapore
Skillset: Java, C, Python, PHP, Perl, SQL
Interests: J2EE, J2ME, XUL, UNIX, operating systems, distributed systems, Dragonlance, Football
In true geek fashion, I think this situation fairly deserves a ‘Hello, World’ code listing of some sort.
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class HelloWorld
extends MIDlet
implements CommandListener {
private Command exitCmd;
private TextBox tb;
public HelloWorld() {
exitCmd = new Command("Exit", Command.EXIT, 1);
tb = new TextBox( "Hello World", "Hello, World!", 15, 0 );
tb.addCommand(exitCmd);
tb.setCommandListener(this);
}
protected void startApp() {
Display.getDisplay(this).setCurrent(tb);
}
protected void pauseApp() { }
protected void destroyApp(boolean u) { }
public void commandAction(Command c, Displayable d) {
if ( c == exitCmd ) {
destroyApp(false);
notifyDestroyed();
}
}
}