Re: [pwg] What are we trying to accomplish?

I would give an example for what I would like to see and what motivated me. The example is a book published on the Web:

https://hpbn.co/

As a user:

- It looks just like any web page and I believe we can all agree that it _is_ a book in the general sense. I can readily read it on the screen as is. I do not have to do anything, just read it as if it was a web page.
- If I go there with a modern browser, it will automatically make it available off-line (you should see a small notice for a short while on the lower-left hand corner of the screen telling you that the book is available off-line). Which is great, because it is a long book, and I may want to read it on the plane.
- It is not fully a book, in terms of the affordances that we discussed. Most importantly, it does not offer a search for terms over the whole book (which is cut into 18 different HTML files). It does not use section numbering in the text, bypassing the question of continuous numbering. Probably others. Although each chapter has its own TOC menu, there is no menu to get the whole book; if I want to go from one chapter to another, I have to click to go back to the starting page and go from there.

My wish is that almost everyone should/could produce such a book easily and put it up on the Web. Without the need to complicated programming (which is not really the case for this book, see below) but with those extra affordances. Ideally, it should be close to the level of difficulty of creating an HTML file and putting it up on a Web site, with the possible addition of some administrative/metadata information.

I tried to dig a little bit into the sources to see what is used and how it is achieved. Here is what I found:

- The starting page is, essentially, a TOC plus links to some other files of importance (see below). I guess the TOC is curated by the author, including its presentation (at least that my impression).
- There a link to a WAM in the code[1]. It seems to be fairly simple; I am not sure whether my browser (last release of Vivaldi) does anything special with it. I have not seen any effect.
- There is a javascript linked from the header. As far as I can see, it creates dynamically the TOC content for the chapter (if you go to one of the chapters, eg[3]).
- The same javascript refers to a different javascript (ie, not one linked from the HTML file's header) to do offlining (I presume)[4].  The comments and [4] says it is a "generated service worker" which probably means that there is a template somewhere to create it. As far as I can see the file includes what we call the list of resources (see the precacheConfig variable); I am not sure what the generation process is behind the screens (or more probably behind the publication workflow).

Maybe I am just out of touch, but this structure is fairly complicated for me.  Note that the book has been around for a while, it may well be that the handling of the service workers has been made easier in the latest releases of the WAM which has now separate field for service workers. (To be checked.)

So, to make my wish more technical: can we make such a process more streamlined, more 'standard' so that the creation of the book would become easy (or easier at least) to get to the same effects and more in terms of the affordances? It should be as easy as generating the (HTML & Co) content, filling in metadata (information items…) somewhere, ideally without doing any kind of programming.

Ivan



[1] https://hpbn.co/7a58c37113db4464699ec4f4646b5566.json
[2] https://hpbn.co/assets/5e7a4451127bdccbb9346f1c8744c0d9.js
[3] https://hpbn.co/primer-on-latency-and-bandwidth/#speed-is-a-feature
[4] https://hpbn.co/service-worker.js



----
Ivan Herman, W3C
Publishing@W3C Technical Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
ORCID ID: http://orcid.org/0000-0003-0782-2704

Received on Saturday, 10 February 2018 16:53:41 UTC