Php design - class diagram

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
paraleadogg
Forum Newbie
Posts: 11
Joined: Wed Feb 11, 2009 12:16 pm

Php design - class diagram

Post by paraleadogg »

Hi guys,

I wonder if anyone can help.

I am putting together a class diagram for a (fairly simple) website I am building.

The system will be OO using php 5. Therefore I have various classes. (User, Item etc)

I have produced a Use Case, Activity Diagram and I am now putting together a Class Diagram.

My question is simple.

I have looked high and low and most examples of class diagrams I have seen do not seem to model the database connection etc?

Now - I have a database class etc to handle the connection and error checking.

Should this be modelled within the class diagram?? (I assume so) and if so does anyone have any tips or examples??

Surely EVERY single class (in some way or another) will interact with the database??

Any advice or examples of class diagrams that model websites and database connections would be appreciated

Thanks guys
thinsoldier
Forum Contributor
Posts: 367
Joined: Fri Jul 20, 2007 11:29 am
Contact:

Re: Php design - class diagram

Post by thinsoldier »

sorry i can't help
but I just now realize I've never done any of those things and I probably should.
Would you be willing to let us noobs see what you have so far and share some links that would help someone get on the right track to adding those things to their design process?
Warning: I have no idea what I'm talking about.
André D
Forum Commoner
Posts: 55
Joined: Thu Aug 28, 2008 7:03 pm

Re: Php design - class diagram

Post by André D »

It sounds like what you're really after is a standardized graphical notation for your diagrams. Use Unified Modeling Langauge (UML).

http://en.wikipedia.org/wiki/Unified_Modeling_Language
http://en.wikipedia.org/wiki/Class_diagram
André D
Forum Commoner
Posts: 55
Joined: Thu Aug 28, 2008 7:03 pm

Re: Php design - class diagram

Post by André D »

As far as your questions about modeling the database connection itself, I don't understand why you would do that. Your class diagram should describe classes, not database connections. Surely your application has one or more classes for handling the database; model those in your class diagram.
Post Reply