Prabir
Prabir

Reputation: 75

which layer of a web app i should depict in uml class diagram only model or model + controller both

I am new to UML. Now in a web project i want to apply UML class diagram then should i include controller layer also in the UML class diagram or only model layer classes should be there . I am using spring web MVC framework, even if i include controller layer also in the uml class diagram then how to represent spring library specific classes(i. e the hierarchy of spring specific controller classes).

one more thing is when i will draw UML class diagram it will be only one for whole model layer or for every requirement or use case i draw one because if i draw single UML class diagram it's becoming messy as i have too many classes in model layer.

also how many diagram should be fine. Initially i find 1. use case diagram 2. activity / sequence diagram 3. UML class diagram this three are good to go.

please advice.

Upvotes: 2

Views: 2186

Answers (1)

Gerd Wagner
Gerd Wagner

Reputation: 5673

Normally, when you design an app, you first make a platform-independent information design model in the form of a UML class diagram, which is not tailored towards any framework such as Spring. From this design model, you derive a (platform-specific) Java/Spring data model that only include the model layer classes.

There is normally no need to include the Spring controller classes in your UML application model, since their structure can be derived from the model-layer classes.

Upvotes: 2

Related Questions