J2ME bible (was Re: [jsword-devel] Re: Unable to check out from
CVS)
Joe Walker
jsword-devel@crosswire.org
Thu, 08 May 2003 08:51:06 +0100
Mark Goodwin wrote:
> Hi there.
>
> The UI is nicely separated from the back end stuff, however there would
> be other problems with porting to J2ME; the project makes heavy use of
> libraries (particularly XML / XSLT stuff) not available on the embedded
> Java platforms.
Not as much as it did! See below...
> I've been looking at the possibility of an embedded version for personal
> profile / personal Java devices (e.g. my Sharp Zaurus), but there's not
> reason an embedded port of the codebase couldn't target MIDP devices
> such as the Palm, Sony Ericcson p800, Symbian series 60 devices, or
> other Java capable phones as well.
>
> Having spoken briefly with Joe about this, it looks like it would be
> possible to change some bits of the current architecture to allow for
> 'lite' implementations of the problem areas. There would be quite a lot
> of work involved, but if I'm not the only person interested, I might be
> willing to give it a go.
Yes, I had a go at this.
Mark pointed out that small devices often can't cope with XML parsers,
so how dependent are we on XML?
The config system depends on XML (JDOM), but it was designed to be
optional, and I'm fairly sure that you could rip out the GUI and any
package with the word config in it, and everything would still work fine
(with the exception that you would need to configure things like the
SWORD directory yourself!)
Bible data uses XML (JAXB/OSIS), but after the exchange with Mark I
finished the work I had begun in making the implementation pluggable.
The package is org.crosswire.jsword.book.data, BookData is basically a
marker interface for some OSIS data in whatever format.
You could implement the interfaces there in the same way that the JAXB
implementation does, and use simple JavaBeans. However you would need to
do all the screen rendering yourself in that case. The JAXB/OSIS method
uses XSL to generate HTML etc.
I've just had a trawl through the source for other XML bits. Other stuff
you can ignore includes the map tree, the RemoteBibleDriver.
Joe.