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
https://forums.phpfreaks.com/topic/62347-initial-thoughts-about-cms/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.