Jump to content

Initial thoughts about CMS


Mastodont

Recommended Posts

Hi all,

I want to write my own CMS (practice makes perfect, you know), so I think it would be fine to consult basic ideas with more experienced programmers, cause maybe I overlooked something essential. I would like to work out general and easy extensible solution. Following list deals with only small subset of aspects, not with validation, logins, roles, css and others.

 

So please, if found something completely wrong or not applicable, call my attention to it.

 

  • Each page must be generated from page template. Each page template must contain some block(s). Only one block is required - “content”. All other blocks (incl. menu, header and footer) are optional. (down-the-line: Each block is marked in page template as <? Php $name_of_block ?> - can be altered)
  • Each page template must be separately installed. Names of block are written into some config file for final page rendering.

 

CMS includes components and modules (inspired by Joomla). Components are displayed in content block, modules in other blocks. So “articles”, “e-books” and "photogallery” are components, while “menu”, “count of visitors”, “current weather” etc. are modules.

 

  • Each component defines one or more views. View is a presentation part, composed basically from sql, block template and optional item template. So we could have different views, i.e. Listing, ItemsWithComments, CondensedItems, OneItem. Current view is determined from URI, configuration or current state.
  • Admin can specify for each view other mapping of blocks – i. e. different menu in block “category menu” etc.

 

Each component defines one or more actions, i.e. AddItem, ChangeItem, DeleteItem, View, Admin, Backup … there is one method for each action in component class. View method outputs current view.

 

Controller (I omit processing of POST data) analyses URI and determines action, current component and its view. View layer determines current page template, its blocks and fetches data from model for each block in template.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.