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 -
  1. Request made to http://example.com/index.php
  2. index.php realises there is no pagename therefore it assumes /index.
  3. Query is made to MySQL through DBFS for the file /index.
  4. /index is read, the metadata shows that it is a normal HTML content file, using the built-in HTML translator.
  5. The translator pretty much does nothing.
  6. The template is loaded and applied to the content.
  7. The user clicks a link to 'FAQs' on the main page
  8. A request is recieved for http://example.com/index.php?page=/faqs
  9. Query is made
  10. /faqs is read, metadata shows that it needs the Knowledge Base translator
  11. Translator loaded
  12. Translator makes nice HTML table
  13. Template applied.
  14. Further requests are made to pages like /faqs/Example Category/Example Subcategory/Example Question, for example.
This would be more similar to the way Zope and other application servers work, and would be much more flexible.

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.

Comments: Post a Comment

Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?