I guess this is a kind of tech blog post. When we chose Joomla for development of our website, we met a few obstacles. I thought I would share one of them, and how we proceeded to solve it. Maybe it could be taken into consideration for future releases?
------
I'm one of the developers of http://smil-norge.no, a Norwegian website. We average on 1 million page views a month, 2400 unique users a day, etc. The site has about 4.000 registered members, most of them logging in more than once every 24 hours.
Our site is so big we cannot afford security issues or major bugs in production. The way Joomla is built, it encourages changes (especially configuration changes) to be done directly in the production environment, which, for us, is not an option. We therefore made a core hack in the configuration management, so that we could override configuration options from one environment to the next.
What we did was add a constructor to JConfig:
<?php
class JConfig {
public function __construct() {
if (isset($_SERVER['JOOMLA_ENVIRONMENT'])) {
$joomla_environment = $_SERVER['JOOMLA_ENVIRONMENT'];
$config_environment = parse_ini_file($joomla_environment.'.ini');
foreach ($config_environment as $key => $value) {
$this->{$key} = $value;
}
}
}
// Default configuration here
...
}
?>
With this hack, we can override default configuration in "local.ini", "staging_area.ini", "production.ini" etc. Typically, we want to specify different database configuration, turn debug mode on/off, set different base paths, etc. for every environment. The environment is configured in Apache.
The cost of core hacks is that we no longer can upgrade Joomla versions easily. We also lost the ability to use the configuration control panel, and now have to specify all configuration manually/in the code. Another problem (more difficult to solve) is that configuration for all the components is stored in the database. To fix this, we had to introduce database versioning for the configuration tables, which, I promise, is a pain.
What we would definitely want to see in future versions of Joomla, is file-based configuration for everything (eventually cached in the database), and possibilities for overriding default configuration values in different environments!
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
For more options, visit https://groups.google.com/groups/opt_out.
I agree with you. New extension addition in joomla is a pain in production environment. There is actually no simple way to export and reimport config parameters in joomla.
General config is not the most problematic. It's extension configuration. In my company, we always get goosebumps when we have to put something new in production that was not developed by us because of that.
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
For more options, visit https://groups.google.com/groups/opt_out.