[sword-devel] HTML5 File API and SWORD modules

Greg Hellings greg.hellings at gmail.com
Wed May 8 06:45:27 MST 2013


On Wed, May 8, 2013 at 8:30 AM, Troy A. Griffitts <scribe at crosswire.org>wrote:

> Stephan,
>
> Firefox OS is the only platform I know that doesn't allow 'native'
> binaries to be installed and many other platforms all started with this
> same concept and conceded shortly before or after release.  I am confident
> it will change or FirefoxOS will be irrelevant (not necessarily related
> options).  It is my opinion that all programming for all applications in
> the whole world should not be restricted to javascript+html/css.
>
> Now, having said this, I use javascript+html/css all the time and would
> like a more native approach to building SWORD applications in this
> environment, hence a javascript interface via Cordova.
>
> Not sure what you mean by "the web", but there are very few
> client-side-only (only client-side javascript+html/css) applications on
> "the web" (none that I can think of, but I've been told they exist).
>

If you count an application that pulls data from the server, then stores it
locally for access, probably the only semi-prominent one I am aware of is
Amazon's Kindle browser app. It will store data in local browser-side
storage media (e.g. window.localStorage, IndexedDB, or whichever other
choice they went with) for retrieval, reading and viewing on the browser
side.

GMail also has an offline mode for its interface allowing this as well,
where it will queue up messages to be sent, etc in some form of local
storage until a connection is reestablished.

I've heard about other projects built just to demonstrate this technology,
but those are the only two real-life implementations I have heard of. Most
Google Chrome extensions also fit into this category, although they can
leverage C++ libraries by means of the NPAPI and successor interfaces. I
haven't seen any that do so.

A client-side Sword application could do something similar. I had begun
work on such an app at one point. However, in order to fetch data, a native
client-side JavaScript implementation would be much better off leveraging
the existing technologies - like localStorage and IndexedDB - for local
storage and retrieval and downloading the requested materials from a remote
server that offered them up in an appropriate format. The Sword format is
poorly designed for client-side JavaScript access. But the Sword library,
either through bindings into Python or Perl or through directly writing a
C-based application or using Java bindings or JSword could easily be made
to serve up data in an XML format (imagine that!) or JSON (personally, I
believe this is better for web-based transport) which can then be cached on
the local side.

At that point, though, you're talking about something which is largely a
port of Sword into JavaScript rather than just a client. It would need to
be capable of understanding and parsing input and transforming that into
the appropriate values for a key-value store in order to retrieve the
rendered data.

--Greg


>
> When FirefoxOS decides to write their system libraries in javascript, then
> I will respect their decision to not allow other developers to link to
> native libraries. :)
>
> Anyway, all this to say, practically, I hope a Cordova SWORD extension
> will give 95% of the people what they want: the ability to write a SWORD
> application using purely javascript+html/css, and for their application to
> run reasonably well on any platform supported by Cordova.
>
> Hope this is taken lightheartedly,
>
> Troy
>
>
>
> On 05/07/2013 04:34 PM, Stephan wrote:
>
>> Hi,
>>
>>  If it's interesting for your efforts, my plan for extending Bishop is to
>>> make the C++ engine available via Apache Cordova. This is more
>>> attractive now that Cordova has expanded beyond a exclusively a mobile
>>> platform.
>>>
>>
>> But you still need to make a native plugin, right? I thought of making an
>> app for e.g. FirefoxOS or "the web". There you need a pure Javascript
>> solution.
>>
>> --Stephan
>>
>> ______________________________**_________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/**mailman/listinfo/sword-devel<http://www.crosswire.org/mailman/listinfo/sword-devel>
>> Instructions to unsubscribe/change your settings at above page
>>
>
>
> ______________________________**_________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/**mailman/listinfo/sword-devel<http://www.crosswire.org/mailman/listinfo/sword-devel>
> Instructions to unsubscribe/change your settings at above page
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20130508/ac073fd0/attachment-0001.html>


More information about the sword-devel mailing list