20060314
Rewriting my CMS
I've had an interesting time writing the next version of my LUGs CMS, which still does not have a single live real installation.
Now I've decided to rewrite the whole lot, using a system of storing files in a database, then using translators to change them to HTML, followed by a template to convert the whole lot into something that looks roughly human-readable.
It would work sort of like this -
The other advantage of this is that only one database table would be needed, and all further config after the database connection details could be stored in a special configuration file.
The first reading part of the file storage system has been started, expect code within a few weeks.
Now I've decided to rewrite the whole lot, using a system of storing files in a database, then using translators to change them to HTML, followed by a template to convert the whole lot into something that looks roughly human-readable.
It would work sort of like this -
- Request made to http://example.com/index.php
- index.php realises there is no pagename therefore it assumes /index.
- Query is made to MySQL through DBFS for the file /index.
- /index is read, the metadata shows that it is a normal HTML content file, using the built-in HTML translator.
- The translator pretty much does nothing.
- The template is loaded and applied to the content.
- The user clicks a link to 'FAQs' on the main page
- A request is recieved for http://example.com/index.php?page=/faqs
- Query is made
- /faqs is read, metadata shows that it needs the Knowledge Base translator
- Translator loaded
- Translator makes nice HTML table
- Template applied.
- Further requests are made to pages like /faqs/Example Category/Example Subcategory/Example Question, for example.
The other advantage of this is that only one database table would be needed, and all further config after the database connection details could be stored in a special configuration file.
The first reading part of the file storage system has been started, expect code within a few weeks.