so I’ve bunched-up some updates, some are extremely cool, other are still very interesting.
First, I’ve wrote a mysqlDbBuilder that will check if the DB exists and all tables are up to date and if not, it will build and update whatever is necessary. I still didn’t have any updates but it should work and it’s very cool.
Second, I added xslt-support for plugins. how does it work? in the plugins folder there’s an “include” folder that should list all available plugins (at least the ones we’d like to have XSLT support); there’s a single place where all plugin-output content is written in the page, called (naturally) “#plugins”. After creating the HTML, I use Cheerio for DOM-manipulation to move the different items to their rightful places using their css classes that look like “reposition-after-sidebar”, meaning that the element should be the next sibling after the #sidebar element. elements can be before, after, prepend or append (added inside the element at the beginning or the end). so that’s works. it’s very cool, but not yet supported by client-side, as there’s no real need for that now.
I still haven’t finished with plugins as the database doesn’t support them. The existing mysqldb and even mysqldbapi shouldn’t be aware of the plugin-model. On the other hand, the plugin shouldn’t be aware of the db’s internal (the fact that it is mysql for that matter). I’m thinking about using ORM for this, although I don’t like this concept as it limits the power of the DB (can’t limit string length, for example), but honestly I’m not sure of any other way. Another issue would be the initializing of the plugin-db-tables, as again, I’m not allowed to intervene with the system’s sql-instructions file.
My next task was to add an English version to Theodorus. Presumably it should be too difficult, I translated all the strings and changed directions of the CSS. So it’s all good, but now comes the question “What should be the default language?” (language is determined by default theme) and I’d be happy to agree it should be English. However, Theodorus works in Hebrew, and I’d like to keep that. No problem, just move the theme selection from the config file to the database. Aha! not so fast! the database doesn’t initialize before the server starts running so this thing simply doesn’t work. I wasn’t sure why and how it came to be. I was sure that node.js magic that it’s not multi-threaded, so there shouldn’t be a way that the app will start running before the DB finished its initialization.
Ideally, themes should be per user where the default is determined by the…. community(‘s founder?). Hello new model – Community. And now the developing spiraling to every direction. A better plan is in order.
To be continued…