Just a few minutes ago I installed the newest alpha release of Joomla 1.6. This is the next big release in of the well known and awarded CMS which runs on PHP and MySql. The main feature for this release are
- ACL. With the implementation of an ACL it should be easier for administrators to control who does what on their website
- Sections are removed and replaced with nested categories. It should be easier now to order the content now.
In another article, or when I update this article, I will tell you about my experience with the new Joomla installment. There is currently just one thing which I want to question. After a few minutes of play in the administrator I decided to look into the database to see what has changed over there. One thing I never liked about Joomla was the way Joomla stores parameters in the database, these are saved as a CSV file. This does not feel right for me. What if I want to use this data outside Joomla? Or what if I have multiple modules which share the same parameters ( same name, different value )?
It would have been better, I think, to have a parameters table containing all parameters for each instance where double values are filtered out. It is a higher normalization. I never tested this theory if it would be any faster, or such but it makes it a bit more clear I think. So with that said I'm presenting you the way on how Joomla 1.6 saves parameters....as a JSON string. Yes, you read it correctly, a JSON string! If you think CSV saved data in a RDBMS is bad practice, storing data as JSON is a real SIN! Yes I know PHP contains Json decode/encode features but does this mean that a database should be fed up with the way on how we present things? I think not. Not only saving data in plain text saves space it is also more generic. What if I have a system , lets say JAVA, which uses the data from Joomla? I have to use a converter to convert this JSON text to JAVA and back?
Why save it as JSON anyway if the only purpose you have with this data is in a SERVERSIDE language?