baldurbjarnason / ink-engine

Apache License 2.0
2 stars 0 forks source link

Engine #2

Open digitalethics opened 4 years ago

digitalethics commented 4 years ago

How is this engine different from epub.js and readium-js for rendering epubs? Would you mind sharing more background information on your technical choices?

baldurbjarnason commented 4 years ago

It'd be my pleasure to share some details on why we went with this approach.

The first difference is that it's younger, less mature, and still in development 🙂

If we assume that I'll be able to get ink-engine to a point where I'm happy with it's design and maturity, it diverges from readium-js and epub.js in a number of ways because we have very different goals. Many of those goals are a bit specialised so odds are that most people would be better served by other solutions.

ink-engine's goals:

To make a long story short: unless you need server-side rendering, document format support, prefer scrolling, and have the time and resources for a little bit more involved implementation, you probably won't find ink-engine particularly useful. Both epub.js and readium-js are excellent tools and they will both always have better support for a broader set of EPUB features than ink-engine.

If you do need all of those things then ink-engine will be exactly the library for you!

Once I've stopped tweaking the intermediary format it generates, that is. The cloud function/lambda upload processor generates an intermediate JSON format based on Web Publications and UnifiedJS's hast HTML-oriented abstract syntax tree JSON format. That format is common to all of the formats we support and the design for it is still very much in flux.