Joomla! Taxonomy

Joomla needs a taxonomy extension. I've started working on such a taxonomy component for Joomla, allowing complex hierarchies of content and multiple categories.

When I first set my foot on the land of Joomla! over a year ago, I pretty quickly started to like the flexibility and hackability of Joomla!, until the moment I needed to migrate it to a more recent version... But this is not the subject here. I have also discovered a major flaw - very rigid and simplistic taxonomy. The sites I've been working on at that time started then to discover that this single section - category approach is pretty limiting. When I have created my custom solution towards multi-site Joomla installation, my major problem started to be exactly this - how to create separate taxonomies for separate sites?

I began working with custom metakeys, with keywords injected there. This approach lacks structure and leads to chaos, but more importantly, it is not easily indexable (without function indices available in Oracle DBMS and not in MySQL). I knew at that time about the existance of Drupal and it's major strength - totally flexible taxonomy. What if we could inject this solution into Joomla?

This is how I started coding my com_taxonomy component. I wanted it to be as flexible as Drupal is, but at the same time efficient. I have looked at Drupal's taxonomy data model, but it was pretty simple. I wanted something with plugins, something that not only allows people to properly tag content, but also allow existing sites with tens of thousands of content nodes (such as my sites) to migrate to it easily.

I have decided to base my efforts on some more efficient solutions to hierarchical data in MySQL (lack of hierarchical queries is again a disadvantage that comes to mind when comparing MySQL and Oracle), but still allow for pluggability.

Plugins is a major feature of my approach to taxonomies. I want plugins to allow for more control of how terms are assigned to nodes. Plugins would allow such basic features like to assign terms to different types of content (eg. to content, user profiles, or taxonomies themselves). This system would however be extendable to allow automatic tag assignment or create dynamic-taxonomies (explained below).

Main features:

  • Tree-based hierarchy: multiple taxonomies may be created;
  • Terms - terms build a hierarchy in a taxonomy and may be assigned to content, user profiles or anything you want (even other terms);
  • Relations - terms may be inter-related, with named relations (such as generic see also or context-specific South Africa is a place with High Average Temperature);
  • Synonyms - terms may have many synonyms;
  • Filters - terms may be applied manually, or automatically - they can represent a query (such as a term Africa may represent a query finding all content containing word Africa, or a category Africa, or metakey or ...);
  • Plugins - plugins add new functionalities through a defined API, for example may add new relations and filters, or allow to assign terms to virtually anything: profiles, menus, users or even other terms;
  • Taxonomy API - allows using of taxonomies in any other component or module, creation of complex taxonomy queries, or access to plugins etc;

It will be designed in a clean way and programmed so. When you look at all the features, you may ask yourself - isn't providing a new taxonomy require a deep change in Joomla? When you think from the pure taxonomy-feature level, probably no. But when we talk about user-friendliness, the answer is unfortunate yes. You want to be able to assign terms to content while editing the content, or be able to define a section view in administrator's menu editor, without using external components for that. Due to not flexible plugin system in Joomla I fear I'll have to introduce a few hacks regarding those, but for healthy separation, I think of making them optional. This way you may install com_taxonomy and use it without having to hack original joomla files and still easily upgrade to new joomla versions; or use hacks provided and profit from full integration, while having a bit more work when upgrading Joomla.

What do you think about all this? Feel free to contradict my beliefs regarding this subject, challenge my design and critic proposed feature set.

I plan to release the Joomla! Taxonomy first for old Joomla 1.0.x, and later for the new and shiny 1.5 (my sites are still on the old one).