I’ve been thinking of writing a Grails based CMS that will be loosely based on Drupal. The main aim will be to have a very clean MVC separation and to add features using Grails plugins. To that end I have been thinking about an object model for the site which I have drawn below:

A Template is a layout of regions. Each theme will have a number of templates (which may be only one) A region can have an existence apart from a template so a region on a particular template is called a Template region. Each template region has a context and can have 0 or more blocks to display content. The blocks use the context to decide what to display. A page is an instance of a template with a number of region instances. Each region instance can have a mode such as view or edit.

I haven’t yet decided which parts of this object model will not be represented in the database but rather in template files as tag parameters.

Tags: , , ,