Object Oriented design for PHP application

For our school project, we are tasked to define a design document describing the architecture of a PHP application.

We are free te decide what to include in the document.

Our professor suggested, lots of (UML) diagrams.

He also asked us to consider class diagrams, but with care, as PHP is not fully object oriented.

My question: Is a Domain Driven Object Oriented Design feasible for a PHP application? What to consider when doing OO in PHP? What are the pro's and con's? Any helpful resources on OO in PHP and PHP best-practices?

Answers


IMHO it's pretty difficult to describe the architecture of any application without knowing what the application is supposed to do. All applications (PHP or otherwise) of any complexity look different.

Secondly, PHP5 gives you classes/objects and the usual plethora of OO gubbings - so to describe it as 'not fully object orientated' is misleading I think. If you mean you can take a procedural approach with out being restricted to objects then yes, but if you wanted everything to be an object then that's your choice.

Is DDD feasible for PHP? Yes, of course. A particular approach to architecture is not usually dependent on technology. Best practices, pros/cons of OO design apply to most languages - PHP leaves you pretty free to decide how to structure your code.

You may find this Best Practices talk from the PHP site useful ;)


Need Your Help

How do I pass a multi-dimensional array of variable size in C?

c arrays multidimensional-array

I'm trying to pass an three dimensional array to a function like this: