Frage

We are required to make a package diagram for our senior project. Since our project uses MVC patter design, we created an MVC class diagram, now, our problem is in creating the package diagrams from our class diagram.

Is it possible to have packages with MVC at the same time? so it would be something like this:

Package: Account

  • Account Model
  • Profile Controller
  • Registration Controller
  • Profile View
  • Registration View

These are the controller that cannot exists without the Account model, so I included them.

Thanks in advance!

War es hilfreich?

Lösung

  • Usually it goes vice versa - class after package.
  • Are you sure you need the package diagram? What you show, are not packages, but components. Packages are things that hold together only syntactically, and components are things that hold together really (not necessarily syntactically)
  • If yes, create packages according to the functionalities, as you named them.
  • As a stage two, create 3 subpackage for every package, according to the levels of MVC model. (sometimes there will be more or less than 3 of them)
  • Make 2 diagrams:
    • of large packages - there you can also show their info exchange on the conceptual level.
    • And of small packages - there put their names in form parentPackagename.thisPackageName. Here you can show the visibility levels of different info. Very probably, that on this level you'll need to divide the huge common diagram into understandable smaller ones.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top