Content Management Framework

Let’s start with this Wikipedia’s article: http://en.wikipedia.org/wiki/Content_Management_Framework

There is a nice example to understand where is the place of CMF:

So we have a line with two ends: [ CMS -------------------------- Framework ]. CMF is somewhere between. But first, let’s look at the ends.

CMS is for people not familiar with programming, while Framework is a programmer’s tool.

But I realized the following. Most of us are using Yii to create a kind of CMS designed for a specific task. And me too. I don’t need a general solution (like Drupal, MODx etc.). There are two (I have in my mind now) reasons:

  1. Too complex admin panel. I need to learn it, but my customers don’t and won’t do it. It’s not intuitive and obvious.

  2. Extensibility. Some CMSystems have API. But I’m pretty sure I can’t solve any task using only it’s API. I’ll need to learn source codes.

I think really serious applications are always need a programmer. So a programmer has a choise, whether to use CMS or Framework. I choose Framework (Yii of course ;)).

But how do we (programmers) solve our problems using Yii? Each of us have the same “chunk of wood and steel” and the same task to make a “hammer”. Could be also nice to have the same “scenario”. Different patterns solve this problem, especially ActiveRecord and MVC. But of course, it’s not enough to build a CMS using Yii. Also, we don’t need a “universal” CMS, because different projects have different database schemas, some projects don’t need user management, some projects are really “unique” and need a special admin interface (or several).

Now I can explain what’s CMF in my vision:

First of all, it’s a programmer’s tool. It’s a set of patterns to build a CMS.

Assume, you need to make a catalog of products. You have a database schema with 3 tables. First table for common items’ properties (name, description, cost, added_at), second table for Cellphones (where only cellphones’ properties are stored) and third table for other products. Maybe this schema looks too complex, but it depends on the task. There are really many variants of schemas. Now, how to “handle” this schema with ActiveRecord? Also, we’ll need an interface for adding products. And then we’ll add to our application Users and Product Makers. I can’t count the number of different program solutions of this problem, because it’s too big :) But actually this can be done using 3-4 patterns (I’m not going to describe it here).

So, CMF should have some extensions of ActiveRecord. Combining these extensions you can perform an easy Object-Relational Mapping having a pretty complex database schema. Also, CMF should have a set of view templates using which you can build an admin panel.

What do I want to say? Simply “It’s good to have a CMF based on Yii Framework” :)

Using Yii one can build (almost) any web-application. Using CMF one can build (almost) any Content Management System. I’m thinking of creating such CMF (at least, for personal use).

Thanks for reading and for your comments (I really want to know your opinion ;)).

Since I am lazy, I tend to use existing modules if it’s not too much work to get them to cooperate.

Yii-User, Rights and SimpleWorkFlow are my favorites (even though the latter really isn’t a true module).

I would love to see more pluggable modules, of course.

I am keeping an eye on cmssitestructuremodule and Wiki for Yii but I must admit that I generally just piece together my apps, though I should probably create modules I can reuse later. :)

Phundament 2 is the nearest - I think - you get to a CMF in Yii.

The problem is that one usually end up with a framework which takes too many decisions on your behalf.

But, I’d like to see one. :)

In my opinion, CMF is not a CMS based on Framework. I can dislike any part of a ready CMS, so I’ll need to learn and extend it’s sources or replace some parts by my own. It’s not that simple as it sounds.

I’m just trying to understand what’s CMF, a kind of a framework designed to create different content management systems. And they can be really different.

I agree.

What I’d like to see is a collection of modules which are designed to work together. Where the developer/user provides the glue and makes the decisions, but that’s really hard to achieve.

Also it should not be a set of modules :) Some (or many, I don’t know the statistics) applications don’t use modules at all.

I would like to see it more Relational Database oriented. Assume you have 4 classes:




class Post {} // table "Post" (p_id, title, text, created_at, updated_at)

class News extends Post {} // table "News" (p_id, source, author)

class Article extends Post {} // table "Article" (p_id, short_text)

class Comment {} // table "Comment" (p_id, author, message, created_at)


// some desired magic code:

$article = Article::model()->findByPk(12);

$article->title = 'title';

$article->short_text = 'bla bla bla';

$article->save();



There should be a tool to easily save new posts (news or articles) and a kind of very basic view templates for adding news/articles. Of course, it’s just a little example (posts can have authors, authors are “commentable” too, authors can belong to organizations, organizations can have a “special backend”). I know Propel or Doctrine can solve the first task, but they are real “monsters” (XML, YAML, auto-creating tables - I never really needed it, I prefer phpMyAdmin to create tables and define constraints; also I like “Yiish” way of defining relations).

Could be completely wrong, but wasn’t ezPublish meant to be something similar? But i admit that i didn’t look at eZ for 10 years or so :).