Introduction to the problem
I have been taught about OO Analysis and Design through Craig Larman's Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development, that follows the UP(Unified Process).
When using it, we usually draw a Domain Model
and from it, doing Interaction/Association Diagrams, we get to the Class Diagrams
. We generally then make Controllers
that will be the "gate" between our Model
and the "outside World" (following the GRASP patterns). All the world accesses to do any kind of logic has to go through the Controllers
. I'll call those Controllers
Model's Controllers
, so later when we talk about MVC's Controllers
we can differentiate them.
That can be depicted in the following most awesome diagram:
In black we have our Model
's objects and that classes' associations. In red we have the Model Controllers
, that use data from the Model
.
Basically, following this kind of design, you can only work with the Model
through the so called Model's Controllers
(we usually had one Controller
per Use Case
!).
Now the question itself
When learning about the MVC, I always had the question of wherever the MVC's Controller
was in fact Model's Controller
or not? Are they the same concept or not? I think they are different concepts, as the Model Controllers
we used to do didn't ever know about anything other than the classes on our Model
, which is not what seems to happen in MVC's Controllers
.
If what I'm saying is true, the following diagram should make sense:
Am I right?