Keeping a Promise to IndexedDb11:19 PM
APIs are hellish things: inconstant moons, inconsistent interfaces, intolerable incompatibility. If you have not watched Bret Victor's latest epic, I do recommend it. As he channels the spirit of innovation from the 1970s, he notes that it would be horrible if, 40 years from then, the only way two systems could communicate were through predefined and agreed upon interfaces. Indeed. What a terrible thing
that would be it is.
As I continue to build out my prototype for OJ's qDb component (trying to fulfill my promise to IndexedDb), I have done a few of the obvious things. I automated the database connection in the constructor as +Kyaw Tun recommended. I looked at +Taylor Buley's own library and make some tweaks accordingly. I have tested inserting up to a million records and selecting from the resulting object stores. There are some memory leaks to address and a few other performance issues before I'd recommend qDb on very, very large datasets--but it is in an OK state.
Yet, as pleased as I am with the abstraction layer that I built, I feel a growing sense of frustration in this class of problem solving.
First, as OJ has grown, it has become unwieldy. I finally decided to begin chunking it out into separate projects, which can each have their own test suites. They can be fully independent and therefore fully modular from OJ's point of view. Currently, I have: