Reply to Re: To all OOP eggheads out there. I need A bit of design help

Your name:

Reply:


Posted by A. Timurhan Cevik on 12/04/05 13:01

hmmm... As I stated earlier, oop lacks important concepts in php4 and I
dont remember which was included in php4. So, I will not be able to
give you an oop solution. But using simple classes,
- class user
- class ContentContainer
{
var $contentType;
var $published;
var $unpublished;
function ContentContainer()
{
$this->published=new Content();
$this->unpublished=new Content();
}
function Publish()
{// Some business stuff here, maybe database functions
$this->published=$this->unpublished;
}
function Restore()
{
$this->unpublished=$this->published;
}

}
class Content
{
var $Body; // or smth.
var $User;
function Content()
{}
}

I prefer using some ContentMapper class haivng a content attribute for
doing the database stuff, related to a ContentContainer class,
responsible of retrieving the published and unpublished content from
persistence.

The system could evolve much more, keeping track of user behaviour on
the content, the publishment and editing history etc. Alas I dont have
more time to exercise on it more. I know I did not give you a
fascinating solution, but could give you an idea.

By the way, if you would like to use file locking, file based role
based permission setting, versioning and such, I recommend you to look
at WebDav (some contentmanagement low level framework that also has
methods built on top of http like adding put to standart get/post http
methods and being able to reach the repository using Dav:// or smth.)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация