I was planning to make dbcdb look beautiful (well, something other than butt-ugly) this weekend, but reality intervened in the form of books that I’ve read that didn’t fit into my existing setup. And keeping it up-to-date with respect to my current reading list is my current highest priority, so I spent a couple of hours today adding a few more features.

For Un monde pluriel mais commun, I had to add the ability to link to Amazon France. Which, fortunately, took about 5 minutes to get right; it turns out that (unsurprisingly) both sites use a similar link structure, so I could just swap in .fr for .com and I was all set. Actually, I feel a little uncomfortable with the way I’m handling the Amazon links: it’s not a priori obvious that clicking on the ISBN should bring you to Amazon. But I couldn’t think of a better key-value pair to contain the appropriate link, and I didn’t feel like breaking the key-value mold. Maybe I’ll come up with a better solution later.

The other problematic recently read book was Nextworld, Volume 1. I couldn’t treat that like a regular book both because, when I get around to reading and entering volume 2, I want there to be some connection between the two, and because I wanted the “Nextworld” part italicized in the title but not the volume part.

That took rather more work. The class structure used to be an Entity base class with Author and Book subclasses. Now I’ve inserted a BookLike subclass (for things with titles and authors, basically; yes, it’s a lousy name) between Entity and Book, added a Series subclass of BookLike, and a Volume subclass of Book. There are still aspects of the class structure that I’m not completely comfortable with (e.g. BookLike contains data members that end up being unused in the Volume case), but it’s the simplest way that I can think of to write the code now. (And this is far from a final form, but future changes can wait until I’ve added kinds of data to force those changes.)

Still, while that took more than 5 minutes, it was only an hour or two (1:48, subversion tells me), and the code proved quite capable of accepting such a change without much fuss. (I also took the excuse to delete some of the code from December that would have gotten in my way.) And there’s still one further high-priority change before I can get around to fiddling with CSS: I’m in the middle of reading a book with two authors, which I don’t handle properly. I’ll probably also take the time to add a list of books to the author pages: those pages are horribly bare right now, after all, and now that I’ve done something similar with series pages, I know what’s involved in carrying that out.

Post Revisions:

There are no revisions for this post.