Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

eBook Reader

110 views
Skip to first unread message

Mathieu Rochette

unread,
Feb 29, 2012, 9:30:13 AM2/29/12
to dev...@lists.mozilla.org
hello,

I'm trying to build a webapp to read eBook (and store, synchronize them
between devices, etc.), I have a prototype to render epub.

I have two questions:

- I'm trying to move intensive operation to web workers (eg: unzip,
xml parsing) but I have a problem with xml parsing, DOMParser is not
availlable in web worker. is it intentional? I can understand why access
to the page document is disable but why not manipulating other document?
- I'm currently using sessionStorage for offline storage of ebooks but
the size is rather limited and I heard it's not very efficient. should I
rather use indexDB? even if it's not much supported yet (web worker
binding or other browsers)


that said, I'm glad B2G came up and hope it will succeed as it should!
I've read somewhere an eBook reader is intented to be provided with
Gaia. Who should I talk to if I want to help, contribute to what is
already existing or start something?


if any question is not for this mailing list, please excuse me and tell
me where I should go

--
Mathieu Rochette
http://evangeneer.net/

Vivien

unread,
Feb 29, 2012, 10:05:22 AM2/29/12
to dev...@lists.mozilla.org
On 29/02/2012 15:30, Mathieu Rochette wrote:
> hello,
>
> I'm trying to build a webapp to read eBook (and store, synchronize
> them between devices, etc.), I have a prototype to render epub.

Yeah!

>
> I have two questions:
>
> - I'm trying to move intensive operation to web workers (eg: unzip,
> xml parsing) but I have a problem with xml parsing, DOMParser is not
> availlable in web worker. is it intentional? I can understand why
> access to the page document is disable but why not manipulating other
> document?

From what I know, DOM is not threadsafe, so you can't access it from a
worker.

> - I'm currently using sessionStorage for offline storage of ebooks
> but the size is rather limited and I heard it's not very efficient.
> should I rather use indexDB? even if it's not much supported yet (web
> worker binding or other browsers)

In Gaia we are currently using a lot indexedDB. Sounds a good solution
to me. You will have to send message to the main thread though.

>
>
> that said, I'm glad B2G came up and hope it will succeed as it should!
> I've read somewhere an eBook reader is intented to be provided with
> Gaia. Who should I talk to if I want to help, contribute to what is
> already existing or start something?

Nothing has started yet on this side, so it you provide a pull request
soon maybe the Gaia team will iterate from your code ;)

>
>
> if any question is not for this mailing list, please excuse me and
> tell me where I should go
>

This is the correct mailing-list as far as I can tell. If you want to
discuss Gaia things more specifically there is also a #gaia chan on
irc.mozilla.org.

Vivien.

> --
> Mathieu Rochette
> http://evangeneer.net/
> _______________________________________________
> dev-b2g mailing list
> dev...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-b2g

Mike Hanson

unread,
Mar 1, 2012, 11:55:18 AM3/1/12
to Mathieu Rochette, dev...@lists.mozilla.org
Hi, Matthieu - sounds like a great project. Here's a couple links for you.

This post has a great "state of the web" overview for eBook publishing:

http://www.alistapart.com/articles/ebookstandards/

I am aware of at least one experimental attempt to build a Gecko-based eBook reader:

http://gecko.mgalli.com/an-experimental-e-reader-app-written-in-html

Andy Chung, a Mozilla alumnus, did some UX prototyping work on an HTML5 eBook reader:

Project: http://andychung.ca/work/bookclub/
Demo: http://andychung.ca/demos/BookClub/

Best,
Michael

On Feb 29, 2012, at 6:30 AM, Mathieu Rochette wrote:

> hello,
>
> I'm trying to build a webapp to read eBook (and store, synchronize them between devices, etc.), I have a prototype to render epub.
>
> I have two questions:
>
> - I'm trying to move intensive operation to web workers (eg: unzip, xml parsing) but I have a problem with xml parsing, DOMParser is not availlable in web worker. is it intentional? I can understand why access to the page document is disable but why not manipulating other document?
> - I'm currently using sessionStorage for offline storage of ebooks but the size is rather limited and I heard it's not very efficient. should I rather use indexDB? even if it's not much supported yet (web worker binding or other browsers)
>
>
> that said, I'm glad B2G came up and hope it will succeed as it should!
> I've read somewhere an eBook reader is intented to be provided with Gaia. Who should I talk to if I want to help, contribute to what is already existing or start something?
>
>
> if any question is not for this mailing list, please excuse me and tell me where I should go
>

Mathieu Rochette

unread,
Mar 3, 2012, 11:07:27 AM3/3/12
to Mike Hanson, dev...@lists.mozilla.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello Mike,

thank you for the links, it's really interesting! (but I couldn't load
http://gecko.mgalli.com/an-experimental-e-reader-app-written-in-html )


- --
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPUkG/AAoJEOTNT24qjXE/CSIH/1SRLX+ovha0J7QeKVWox//+
E2d3K0Djz+/q0rEL0cc3fY962kVtSs0BWrS/tKvcQF8ejHQBAM7kRx38RU5ZeSyN
2+1cnj1FuE5pvJDTjsIZDOrP3Z++m+lQMOxgBfhdG5u3oPoKH0u9I9EiCBHJ2JPU
s7/ze6d+Lsw04VVeOgQBanDRrTidQVjfU19L3h2g/ybyKqXEP1yL02/fjWY3H7vd
bTZmv4I6yIAKObrAMtZleDOIPimJ2uQlpHVY9ck30Bs65Dn5ux0NhQgrTNNrC/Wa
/SBRDYqJoypLY1WAWxbiXPrHRoIYNOYv04KUNzWTTap750rfzkLpJoioK3i7Wm8=
=ZYlZ
-----END PGP SIGNATURE-----

Mathieu Rochette

unread,
Mar 3, 2012, 11:14:41 AM3/3/12
to Vivien, dev...@lists.mozilla.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/29/2012 04:05 PM, Vivien wrote:
> On 29/02/2012 15:30, Mathieu Rochette wrote:
>> hello,
>>
>> I'm trying to build a webapp to read eBook (and store,
>> synchronize them between devices, etc.), I have a prototype to
>> render epub.
>
> Yeah!
>
>>
>> I have two questions:
>>
>> - I'm trying to move intensive operation to web workers (eg:
>> unzip, xml parsing) but I have a problem with xml parsing,
>> DOMParser is not availlable in web worker. is it intentional? I
>> can understand why access to the page document is disable but why
>> not manipulating other document?
>
> From what I know, DOM is not threadsafe, so you can't access it
> from a worker.
well I guess I can't use worker then… unless I parse XML manually. too bad
>
>> - I'm currently using sessionStorage for offline storage of
>> ebooks but the size is rather limited and I heard it's not very
>> efficient. should I rather use indexDB? even if it's not much
>> supported yet (web worker binding or other browsers)
>
> In Gaia we are currently using a lot indexedDB. Sounds a good
> solution to me. You will have to send message to the main thread
> though.
that's what I thought, I'll give a look at indexDB
>
>>
>>
>> that said, I'm glad B2G came up and hope it will succeed as it
>> should! I've read somewhere an eBook reader is intented to be
>> provided with Gaia. Who should I talk to if I want to help,
>> contribute to what is already existing or start something?
>
> Nothing has started yet on this side, so it you provide a pull
> request soon maybe the Gaia team will iterate from your code ;)
okay, I guess I'll have something by mid-march
>
>>
>>
>> if any question is not for this mailing list, please excuse me
>> and tell me where I should go
>>
>
> This is the correct mailing-list as far as I can tell. If you want
> to discuss Gaia things more specifically there is also a #gaia chan
> on irc.mozilla.org.
>
> Vivien.
>
>> -- Mathieu Rochette http://evangeneer.net/
>> _______________________________________________ dev-b2g mailing
>> list dev...@lists.mozilla.org
>> https://lists.mozilla.org/listinfo/dev-b2g
>
> _______________________________________________ dev-b2g mailing
> list dev...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-b2g

thank you!

- --
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPUkNxAAoJEOTNT24qjXE/k7QH/1nMUARjn6NMl+OZaJapKC1Z
TtWwsR5vfabjnfHHjdGtkP+DgJU4colcTBv1C1khBKhyev7sgaPKV+W3KRZjN7HC
d1NZx5ZKeGtV0+BInNBJ/eajzG+5I2OhxDXZ0fNuUivI4UIqekGazyqjQdqvsZgm
OBgKQB1P4Cb/bQU7KNNVROrKGRDZudIG929sVkrecoZ0Cv1gjuOqohBfBIlO1C0V
784DasM8xAwM7qAayS0v4QmkYzCq9xsUM38BPYRuZn7LFeOuFYdYaZs7CMWpvWAy
nrvCjIN24ydEL03r/5lv0fsTwrruldhUn8HdG8DbqpYZnhkE1MtMaXkm4Xj6odw=
=NBdr
-----END PGP SIGNATURE-----

Timothy Chien

unread,
Mar 7, 2012, 10:38:02 AM3/7/12
to Mathieu Rochette, Vivien, dev...@lists.mozilla.org
It occurred to me that ePUB might be just another packaged web app format.

A "packaged web app" would be something that PhoneGap or Metro-style
HTML5 Apps do. You zip your HTML in an archive instead of deploy it up
the the web, and relay on 3rd party stores to distribute it.

You might say ePUB is different from PhoneGap package today, but we are
not sure if the statement is going to be true tomorrow. The trend is,
with demands from the interactive magazine publisher community, ePUB
books is acting more and more so like an client-side web app.

The B2G project deliberately choose not to support any packaged web app
format and in favor of the real web with (proposed-)standard HTML5
features, e.g. Offline AppCache. We want to invest the web, not just the
web technologies. Our DOM APIs lives at wherever it should live, instead
of window.PhoneGap.* or window.Windows.*.

I think making an ePUB reader contradicts the purpose of the project. As
least build it with our own effort. If there is going to be an ePub
reader, why don't we also build a PhoneGap web runner into homescreen?

I might be too late to start the discussion, and the (changed) decision
might nullify Mathieu's effort. But supporting ePUB is something we need
to rethink. At very least, Mathieu can re-organized his work into a PDF
reader instead.


Tim

Timothy Chien

unread,
Mar 7, 2012, 12:36:52 PM3/7/12
to Vivien, Mathieu Rochette, dev...@lists.mozilla.org
Hum, I jumped to conclusion too soon here.

http://idpf.org/epub/30/spec/epub30-overview.html#sec-scripting

So the standard spec of ePUB 3.0 states scripting is not encouraged, and
it can be disabled by the reader. That makes the ePUB not a viable
packaged web app format, and voids my argument.

There are vender implementations (e.g. Apple iBooks textbook) that is
highly interactive; but it's not the original ePUB format.

Let's wait and see what the trends would take ePUB format to. Before
that, we can stick with our goal to make the web THE app platform for
everyone, including interactive magazines.


Tim

Chris Jones

unread,
Mar 7, 2012, 11:09:29 PM3/7/12
to Timothy Chien, Vivien, Mathieu Rochette, dev...@lists.mozilla.org
----- Original Message -----
> From: "Timothy Chien" <timd...@gmail.com>
> To: "Mathieu Rochette" <mat...@evangeneer.net>
> Cc: "Vivien" <2...@vingtetun.org>, dev...@lists.mozilla.org
> Sent: Wednesday, March 7, 2012 7:38:02 AM
> Subject: [b2g] ePUB the packaged web app format (Was: Re: eBook Reader)
>
> The B2G project deliberately choose not to support any packaged web
> app
> format and in favor of the real web with (proposed-)standard HTML5
> features, e.g. Offline AppCache.

Packaging isn't incompatible with appcache. Packaging is just a detail of the network transport layer. There are various tradeoffs associated with it.

> I think making an ePUB reader contradicts the purpose of the project.
> As
> least build it with our own effort. If there is going to be an ePub
> reader, why don't we also build a PhoneGap web runner into
> homescreen?
>

There's a big difference between subsuming legacy formats with web technologies, as we did with PDF.js and are looking to do with an ePUB reader, vs. adding first-class support for those formats to the web. AFAIK no one has proposed to add new standards specifically to support ePUB. We didn't have to do that for PDF either.

If someone implemented a compatibility library for PhoneGap applications, that'd be awesome! We've discussed doing that for WAC applications.

> But supporting ePUB is something we
> need
> to rethink. At very least, Mathieu can re-organized his work into a
> PDF
> reader instead.
>

All the objections you raised to ePUB apply equally well to PDF, AFAIK.

Cheers,
Chris
0 new messages