Do you have a question? Post it now! No Registration Necessary. Now with pictures!
April 30, 2005, 10:37 pm
rate this thread
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:
$image = OpenImage('staff', 'new', $params)
look better to the astute readers than:
$image = new ImageStaffNew($params);