You are here: Re: To all OOP eggheads out there. I need A bit of design help « PHP Programming Language « IT news, forums, messages
Re: To all OOP eggheads out there. I need A bit of design help

Posted by C. on 10/27/78 11:33

Like any database driven program you should start by defining your
schema - i.e. normalise your data. I'm forever finding people whom have
been nitten by the OO bug trying to use persistence as a way of storing
their data - trust me it's a very bad starting point. Trying to fit
your objects and impose persistence on top of an existing schema is a
very bad way to do things.

Assuming that Published, Unpublished and _Backed-up_ are mutually
exclusive and the item must be in one of these states then there should
only be one logical table. These are states of the item (not
properties).

If you can't fix your database schema then using the base class to
abstract the error seems like a good solution.

If there is adequate polymorphism in a relation then WTF do you need to
create derived classes to describe different content types?


C.

 

Navigation:

[Reply to this 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

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