|
There are no translations available.
K2 is quite a cool component. It addresses a number of limitations in Joomla 1.5. However, it is not an improvement to the content management system in use in Joomla 1.5, but rather a replacement.
Inside K2
By having a look at the tables folder inside the K2 component on the administrator side of things, you can get a good idea as to what K2 intends to do. The core entities are:
- k2attachment
- k2category
- k2comment
- k2extrafield
- k2extrafieldgroup
- k2item
- k2tag
- k2user
- k2usergroup
The following is more or less what K2 saves in its tables:
- K2 allows to manage nested categories of unlimited depth (k2category), which can have items associated (k2item).
- Each category can define a group of extra fields (k2extrafieldgroup, k2extrafield) for its items, which can be dropdownlists, textboxes, and radiobutton lists.
- Each item can have file attachments (k2attachment) and user comments attached to it (k2comment).
- An item can have one or more tags (k2tag).
- A k2user is a joomla user which belongs to a user group (k2usergroup). A user group can add, edit (+delete), publish and/or make comments to their own items or all items an one or more or all categories, and optionally their subcategories too.
What K2 picks up from the file system is:
- K2 categories can each have their own template. These extra K2 templates are stored in a particular way in the overall Joomla template.
- It is possible to add plugins to K2, which will add extra output to the item (such as extra fields) both in the category as in the detail view.These plugins install as ordinary joomla plugins, but have their own interface.
The K2 categories and the items also have substantially more fields, and therefore more options, than the standard Joomla 1.5 categories and items. I am not comparing these in detail, because they are less important when comparing the general structure.
K2's extra fields
In contrast to other CCKs, K2 will not store its extra fields in an EAV database. It will create an associative array through Joomla's JObject class, encode the whole hash in JSON, and store it into one field, called extra_fields.
This storage strategy is indeed a lot faster than using an EAV database. K2 also stores the extra fields in plain text format in the field extra_fields_search. Querying the K2 extra fields in SQL, however, will come at a performance penalty. There is no way to index these extra fields, if you need to search them individually. It also makes it more difficult to load the extra fields from an external source or interface them.
Even though the K2 storage strategy is in my opinion preferable to an EAV storage strategy for user-defined fields, it still comes with its drawbacks, compared to the functionality supported when storing data in a relational schema.
K2 2.1 versus Joomla 1.5 versus 1.6 alpha versus 1.6 beta
You can currently find Joomla 1.6 alpha in source control (svn) with the svn address listed at the bottom of this page. After downloading, you can test drive the current alpha version.
You can find the current Joomla 1.6 beta roadmap on this page.
K2 implements today already, what Joomla will only be providing in its future 1.6 release:
|
|
K2 |
1.5 |
1.6 alpha |
1.6 beta |
Priority |
| Availability |
|
released |
released |
only in svn |
only on roadmap |
|
| Categories. Unlimited depth. |
taxonomy |
Y |
N |
Y |
Y |
high |
| Categories. Custom layout. |
|
Y |
N |
Y |
Y |
high |
| Items. Integrated comments. |
|
Y |
N |
N |
Y |
low |
| Items. Integrated attachments. |
|
Y |
N |
N |
N |
low |
| Items. Extra fields and content plugins. |
CCK |
Y |
N |
N |
Y |
high |
| Items. Integrated tags. |
|
Y |
N |
N |
N |
low |
| Users. Fine-grained access control. |
ACL |
Y |
N |
Y |
Y |
high |
In the competition between Joomla, Drupal, and Wordpress, the following three issues continuously pop up:
- ACL. Joomla 1.5 does not support fine-grained access control.
- Taxonomy. Joomla 1.5 has a two-level structure with sections and categories. This is often not satisfactory. Many users desire and need unlimited depth categories.
- CCK. Joomla 1.5 does not support user-defined fields in its articles or additional content plugins; while Drupal attracts raving comments for its CCK implementation.
K2 and the future
If you need deep taxonomies, fine-grained ACL, and flexible CCK right now, it certainly makes sense to use K2 right now. K2 is available right now, while J1.6 is still being developed.
However, as soon as J1.6 hits the shelves, there will be an issue of overlap. Most of what you can do today with K2, will be supported out of the box in J1.6. Especially the important issues in the competition with Drupal and Wordpress will have been addressed:
- J1.6 will have fine-grained ACL not just for content categories and items, but for all components. This will be superior to K2's implementation and make K2's ACL completely redundant.
- J1.6 will also have unlimited depth categories with their custom layout.
- There is currently still nothing visible about the approach J1.6 is taking with regard to extra fields and content plugins. However, CCK seems to be firmly placed on the roadmap for J1.6 beta.
In my impression, deep taxonomies, ACL, and CCK should indeed be part of the core of the Joomla CMS. What's more, K2 is a fundamentally incompatible replacement for the core Joomla content management.
Therefore, K2 is bound to be displaced by J1.6. My opinion is that it is for most projects not worthwhile to invest too much in K2 skills, plugins, or deep knowledge, for the few months before J1.6 will hit the shelves.
|