What is Readium-2?
This led many of us to conclude that it might well be time to step back from the current Readium codebase and approach and do some serious re-thinking.
Goals of Readium-2
The goal of Readium was, initially, to develop a POC for the EPUB 3 spec, followed by developing a SDK that could be used to develop EPUB 3 reading systems. The overarching goal of R2 is to re-think, from the ground up, that goal.
There is still a need for an engine interpreting EPUB markup for integration into apps or devices, but now the goal is to develop a framework for interpreting and rendering any digital publishing markup.
This extended framework will leverage the capabilities of existing browser engines and supplement those capabilities with separate modules (polyfills, if you will) that provide additional functionalities. These additional modules are intended to be, insofar as possible, independent of one or another so that they can be used independently of the overall framework. At the same time, these polyfills will be designed so that they CAN be easily and seamlessly combined to produce complete reading systems.
Another aspect of this framework is that instead of a “platform-neutral” C++ core, a large part of the framework is implemented in native code, i.e. Swift 3 for the iOS target and Kotlin for the android target. This enables the use of the most powerful aspects of each native environment and will end up with less code, but more efficient.
On the other side, desktop applications (on Windows, OSX and Linux) are approached using cross-platform technologies, i.e. Electron.js, typescript, HTML 5/CSS 3, thanks to a grant from the CNL (Centre National du Livre). This fills the gap that Readium left open so far, with no real interest from the community for the development of a native Windows and Linux SDK.
These different implementations share the same architecture, model, interfaces; a developer should therefore be able to switch from one implementation to another without feeling lost.
The project was split in four phases:
- Report on the good and bad aspects of the current Readium implementation. This report was driven in 2016 by the interview of those application developers who have intensively used Readium (readium-js and/or readium-sdk) and, for some of them, forked the code to obtain what was needed in their application. This study included a compilation of problematic EPUB samples and technical details about the areas where the Readium code should be optimized.
- Study of the Readium-2 design principles.
- Study of a refactored architecture for the codebase, following the approved design principles; developement of prototypes.
- Actual coding of the Readium-2 toolkit.
The first phase was achieved in September 2016. Its results have been described to the Readium members and should be published online, some day, on the Readium documentation website.
The second phase started in September 2016 and the third phase around January 2017, with a top to bottom approach and the definition of two main modules in any R2 implementation : a “streamer” to parse digital publications and expose them via an http server, and a “navigator” to expose the publication in a browser engine.
The development phase started at the same time, with the Swift implementation first, followed by the Typescript implementation. The kotlin implementation started in September 2017. Progress can be checked here.
As of January 2018, all implementations are in alpha or beta stage, with a pure BSD-3 license. Stable core developments should be available by mid-2018, and extra-modules will be developed from there.