Skip to main content

Introduction (v2)

About this guide

This guide will give you an overview of the architecture of Tuskfish CMS, how to write code to perform common operations and how to extend the system to suit yourself. The guide accompanies the Tuskfish API documentation. Keep a copy handy as you read this guide. It is best to review links to the API where provided, as not every detail will be discussed in the text.

TLDR

Tuskfish has a MVVM(C) architecture with a front controller and static routing table. If you're an experienced developer and you just want to dive right in, review the methods available in the following classes and the walk through provided in the last link:

  • \Tfish\FrontController
  • \Tfish\Entity\Preference
  • \Tifsh\Entity\Template
  • \Tfish\Criteria
  • \Tfish\Database
  • \Tfish\Traits\*
  • Tfish\Content\Entity\Content
  • Anatomy of a typical page

A few principles

I set out to make Tuskfish as small as possible, so that it would be easy to maintain and simple enough for people to learn the code base if they want to. Ease of maintenance is more important to me than absolute performance. But as it turns out, making things small is also one of the best ways to make then fast.

For the same reasons I have avoided using external libraries as far as practicable. Most external libraries are bigger than Tuskfish in their own right, contain their own collections of bugs and security problems, and create dependencies that can become difficult to manage as projects evolve and diverge. I don't subscribe to the gushing 'just strap another library on' mentality. It's not sustainable, you're basically trading short term convenience for long term maintenance headaches.

Stuff you won't find in Tuskfish

A lot of "standard features" you will find in mainstream CMS have been dispensed with. Stuff you won't find in Tuskfish includes:

  • A separate database server: Tuskfish makes use of SQLite3, which runs embedded in PHP.
  • A user management system: The only user is the single admin responsible for the site.
  • A block management system: Block management is somewhat manual, to allow complete flexibility in presentation.
  • A huge collection of libraries: Those actually in use are Bootstrap and jQuery (front end presentation), and on the backend TinyMCE (visual editor for the data entry form) and HTMLPurifier (input validation), and the DICE Dependency Injection Container.

List of subsystems

This guide will give an overview of the main subsystems within Tuskfish CMS, and how to work with them. These are:

 

Copyright, all rights reserved.