[sword-devel] HTML5 front-end

Greg Hellings greg.hellings at gmail.com
Wed Feb 29 06:45:18 MST 2012

On Wed, Feb 29, 2012 at 7:38 AM, Matej Cepl <mcepl at redhat.com> wrote:
> With the advent of Boot2Gecko (and ChromeOS and iPad) it is getting
> increasingly interesting to have HTML5 version of Sword client. I know it is
> very difficult (it would probably require porting of a lot of C/C++ code to
> Javascript, also I have no idea how to store in IndexedDB or some other
> HTML5 storage something so huge as Bible text), but I am interested if
> anybody thought about something like that.

I have thought about and begun some work on an application akin to
this. I was targeting a Chrome browser plugin that would therefore
also make it usable on ChromeOS. Obviously the easiest way to leverage
this is to actually bind the SWORD C++ library into such a plugin.
Chrome provides a way to do this using portable APIs that would permit
the library to be built once and run on any system that Chrome
supports, but I have not looked into much detail on how to go about
it. My thought was more to provide a method of downloading a module in
a format that JavaScript can more readily digest (e.g. JSON) and prop
up such functionality on a web server somewhere.

The downside to that is the need to actually port the SWORD
functionality that is needed into JavaScript. Using a well-defined and
feature rich JavaScript library (like Qooxdoo, YUI, ExtJS, etc) that
allows proper classes and inheritance this shouldn't be as tedious as
using raw JavaScript would be. However, it would still require a lot
of time and commitment. I stalled out in my work when Real Life got in
the way and I was pondering the storage issue that you mentioned.
Chrome plugins are limited to 5MB of storage unless they leverage the
permissions request mechanism to ask the user for unlimited storage.
Also, Chrome and some other HTML5 implementations still support WebDB
- the SQLite based forerunner to IndexedDB before Firefox threw a
hissy fit and demanded that SQL not be used. Either mechanism can be
leveraged with approximately equal amounts of work, though IndexedDB
will be more portable in the HTML5 world while SQLite would be more
portable in the embedded application world.

So yeah, some people have thought about it but not gotten through the
implementation phase yet. I have some rudimentary JavaScript code
stood up, but I never made a final decision on how to implement the
storage, so I halted at that point.


> In meanwhile, is there a mobile version of http://www.crosswire.org/study/ ?
> Just curious,
> Blessings,
> Matěj
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

More information about the sword-devel mailing list