There are two kinds of people in the world, those who believe there are two kinds of people in the world and those who don’t.

R. Benchley

Normalizing Joomla! filesystem hierarchy

Here is the default Joomla! files structure in 1.5.x:
  • administrator
    • backups
    • cache
    • components
      • com_component_name
    • help
      • lang-LANG
    • images
    • includes
    • language
      • lang-LANG
    • modules
      • mod_module_name
    • templates
      • template_name
  • cache
  • components
    • com_component_name
  • images
  • includes
  • language
    • lang-LANG
  • libraries
  • logs
  • media
    • system
    • (com|mod|plg)_extension_name

1. Issues

1.1. Redundancies

1.1.1 Components and modules names

What’s exactly the point of prefixing components and modules names in:
  • /components/com_component_name
  • /modules/mod_module_name

Since we already are in /components/ folder, what’s the purpose of prefixing com_ before the real name of the component? What about just components/component_name? (idem for module)

N.B: This issue does not appear neither in /plugins/ nor /templates/ folders, where we don’t plg_ nor tpl_ prefix sub-foders.

1.1.2 Module’s default file

Considering a module (eg, /modules/mod_MODULE_NAME/), why naming its index file: mod_MODULE_NAME.php?

Since we already are in its dedicated folder, what about just naming it: index.php?

1.1.3 Language files

Language files (back and front) are prefixed with lang-LANG.… Again, since they all have a containing directory, this prefix appears to be redundant. For example en-GB/en-GB.com_content.ini seems to be enough.

1.2 A level more!

1.2.1 Plugins

A plugin necessarily belongs to group and plugin’s files are directly put into it: plugins/group/plugin_name.*. What about adding a level more between group and files, eg: /plugins/group/plugin_name/*. It should solve issue when a plugin has more than 2 files, for example tinymce.