Connecting Tech Pros Worldwide Help | Site Map

Clean design issue

  #1  
Old July 17th, 2005, 01:55 PM
Pingveno
Guest
 
Posts: n/a
I'm a somewhat novice PHP programmer working on a project for a school
newspaper using OOP. The web application is going to handle viewing,
publishing, etc. As someone who hasn't done much in the way of OOP
design, I'd like to elicit opinions on different ways to put together
the different components of the system.

There are several different general categories of objects that I'll
being creating: Images, Articles, Issues and Volumes. Each will have
different mode. For example, Article has: Archive (preexisting), New,
Clone (copyable vs. movable) and Result (from a database result array
usually for speed during searching).

Additionally, the Image category will have two types: one for staff
members' photos and one to be associated with articles.

Would a factory function approach, like so:

require_once 'lib/image.inc.php';
$image = OpenImage('staff', 'new', $params)

look better to the astute readers than:

require_once 'lib/class.ImageStaffNew.php';
$image = new ImageStaffNew($params);

?

Thx,
-Pingveno
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Architectural, design issue, please Radu answers 0 February 16th, 2007 10:05 PM
Laws and Myths of Usability & Interface Design YellowfinTeam answers 1 December 12th, 2006 04:35 PM
Laws and Myths of Usability & Interface Design YellowFin Announcements answers 0 December 12th, 2006 10:55 AM
database design DB answers 3 November 12th, 2005 04:07 PM