RET Demonstrates Its E

 Much of what we want to do behind the A, we already started with a scaffolding of code running in another myriad node (resentfully-everlasting-tongue), so we want to port over that scaffolding and get it working in CHS (codified-heart-song, working title for Circle Home School).


If we navigate over to the repository page for RET, specifically the Alexandria sub page (which is the one we want to emulate), we see that the whole thing works around OpenBookOption displaying a modal prompt and then setting that to current book title.


What this scaffolding is preparing for, is the loading or creating of that book whether it already exists in the database. To do this we want to take that string as a key for the book (the book's title) and check the database if there is already something stored behind that key, retrieve it and store it in an object (or some sort of multimap type thing for a "reading table" of all open books, to save going back to the database a bunch of times). If it doesn't find one, it should create it and open the newly created one.

Currently, the scaffolding just stores the title, but if we first copy the scaffolding over, all we need to do in the next step is add the lookup to the storage step, and replace the stored title with a stored object that has a database id (so we can propogate changes as desired).



Comments

Popular Posts