TomeCat is running on a database right now. Every chapter in the book is a separate entry in the chapter table. This is fine, except that I want to be able to quickly create books, and copying and pasting chapters into a database isn't my idea of fun. It also brought up the question of embedded media such as images, audio, movies, links and so on. I would have to manually add code to the pristine database driven text files. That was kind of bad!
As a in-between step from TomeCat in a web browser to TomeCat as a desktop app, I think XML files are a better way to go. The texts could be converted to simple XML documents with markup tags like book, title, author, chapter, section, img, map, verse, p, audio, crossreference, link and so on. A browser would be able to read this, as well as a desktop app. This would let me get the markup straight before I leap off of the platform that I'm comfortable with.
A couple hurdles that I'm not quite sure how to jump over are how to show the existing table of contents, with separate pages for each chapter. I think this would be accomplished by searching for tags, and then replacing them with functions .. not sure.
The code would have to be manually added (although the basics could be parsed with a custom tool), which is kind of sad, but eventually, I know an editor could be created that took 'What You Mean Is What You Get' and turned it into properly formatted xml.
The reasons I want to eventually go with a desktop app are:
- The life of the product is extended past the time when I want a server running for it.
- Right click and multiple window interfaces, without using "AJAX". This also means it will work even after web browsers are no longer compatible with the code.
- User doesn't have to have anything but the program and documents to use in it. They will not have to install a MySQL database, or PHP, etc.