Skip to main content

How the Tuskfish content model actually works

In Tuskfish the different types of content items are subclasses of a parental object that is loosely based on the Dublin Core Metadata Element Set (DCMES), a standard vocabulary of fifteen properties for use in resource description. Most types of web content can be described using a subset of the DCMES properties plus a few other web staples such as a teaser field, view counter, file size and web-specific metadata fields.

The practical upshot of using standardised DCMES properties is that you only need a single data entry form. It doesn't matter whether you are submitting a news article, downloadable file, photo, video, audio file, tag or collection; they all have (or can have) a title, creator, image, description, type and so on.

This is essentially what makes Tuskfish so simple, lightweight and robust. Using standard properties for all content items means that all your content can coexist in one database table. Ahhh the light goes on! Suddenly, searching across multiple types of content is fast and straightforward. The code to access and manipulate content objects works for everything. Redundancy is massively reduced allowing the code base to remain small and efficient, which in turn makes it easy to understand and maintain.

Creating new types of content

If you want to add a new type of content you can. Simply create a new content subclass, add any new methods you need, or override those where the behaviour is a bit different, and you're done (well, there are a couple of details to attend to such as adding your new class to a whitelist of known content types but the point is, it's extensible and adding support for another content type is a five-minute job).

If you want to add some radically different content type for which the DCMES-based parental content object is not suitable, you can. You'll need to add a new database table to handle additional properties in line with your needs and design your own object and handler classes, but the Tuskfish database and criteria classes will still work. For more details, please refer to the Tuskfish Developer Guide.

Copyright, all rights reserved.

Related

Tuskfish CMS User Manual

The user manual provides a comprehensive guide to Tuskfish CMS operations. It covers all all aspects from installation to adding and curating content, managing site security and customisation of themes. For additional information on how to customise Tuskfish please see the developer guide.