class diagram for Yii application

I wonder about the class diagram in MVC application(Yii application in this case). I need to now about the relation between the controller and the model and also should I depict or not the relation between class model as I attached. I’m stuck with the class diagram for my application(for my final project), i’m truly newbie for UML :-[ . What I’ve found is this pictures : .

And these:



I wonder which picture is acceptable? Or if anyone would attach their class diagram I will be grateful.

Any help/answer will be appreciated…

Thanks in advance guys…

The first diagram gives a lot more information than the second because it visualizes dependencies and associations (with multiplicity). There’s a lot more to it, check out some of the references listed in this page.

Both are structural diagrams, though. They give no information about actual object instances. Object collaboration sequences are covered by behavioral diagrams (such as sequence diagrams and collaboration/communication diagrams).


And one more UML:

If you want to document your app, then I’d start by making a diagram of the database.

It’s not awfully interesting to see the inheritance diagram of your controllers and models because it’s MVC.

A collaboration diagram, however, should give a good impression of your application - like the diagram here:

The database schema is the single most important diagram as everything is modeled around it.

Thanks for your responses here guys…

Thanks for your advices,

In my report, it’s included with diagram of the database and also behavioral diagrams(e.g sequence diagrams), so no worries about actual object instances. ;)

So, to give a clearer structural diagrams is that much better if I define the relations between them? beside emphasize the separation that there are controller and model because it’s a MVC architecture.

Yeeaahh…it’s diagram of yii 1.1.6… B)


Do you have the original for this? So that we can update it. It would be good to include it in the docuentation.