wiki:Process Overview
Last modified 9 years ago Last modified on 10/17/11 12:31:02

The goal of this document is to provide an overview of the way data is processed from a Sophie 2 book into a HTML 5 book

Basic steps

The basic steps of the export process are displayed in the diagram below:

  1. Generation of JSON based data
  1. Packaging of JSON based data

Generation of JSON based data

The JSON Export logic uses the Sophie 2 Persistence API, which converts the Sophie model to other data models with the help of persisters. In Sophie 2.1 the Persistence API has been expanded to convert Sophie 2 resources to JSON based data. For every Sophie 2 book page a respective JSON based data block is generated that fully describes all the content of the page, its animations and its interactive capabilities.

Detailed information of the data model used for the JSON representation of the book pages can be seen here:

The information in each JSON file is than used to dynamically generate an HTML page that represents a book page.

Packaging of JSON based data

Once the Sophie content is exported to JSON files an HTML package is created that includes:

  1. The list of all the JSON page files
  2. JavaScript? libraries for dynamically building HTML 5 content out of JSON content and for managing actions such as multimedia play, timelines, etc
  3. HTML container files for every page that will host the dynamically generated content
  4. Page resources such as images, video files, audio files, etc.
  5. Main HTML file that has the information for all the book's pages
  6. (Optional) Metadata for all the files that are included in the package. This manifest file is then used to download the package on a device and be read via a special offline application

The packaging is done via the Sophie 2.1 packaging functionality. It can create the following types of packages:

I) Package for download and offline reading of a book on a Sophie Reader iPad application
II) Package for online reading of a book on iPad mobile browser or on a regular Safari browser
III) Package for online reading of a book on Motorola Xoom mobile browser on a regular Chrome browser
IV) Archived package for download and offline reading on Motorola Xoom