When I want to design architecture of system in diagram, I usually take some architecture patterns and give them the system identity.

For example, a simple system for school management with Layer Pattern can be:

Layer pattern for school system

But MVC as architecture pattern dose not easily gets the system identity in diagrams.

I don't know how to draw my diagram with MVC pattern, because I don't know how to present the system identity with this pattern. Its fills that if I will force MVC to my system identity I will get classes and not modules.

I don't know even why MVC is considered as architecture pattern and not design pattern.
From Wikipedia:

Model–view–controller (MVC) is a software design pattern for implementing user interfaces on computers

It sounds that MVC is pattern to implement design of classes and not modules.

So why MVC is considered as Architecture Pattern? And how should I draw a architecture diagram for this simple system with MVC?

  • exactly, MVC is a pattern for user interfaces, small parts like a button, drop-down list or check-box. it's slightly missused. and only because it's popular now for web-apps etc, doesn't change anything. – rsm Feb 9 '17 at 16:01
  • 1
    Thats my problem, MVC is considered as architecture pattern, but it seems to be design pattern for user interface. – nrofis Feb 9 '17 at 16:35
  • In Architectural Pattern " Architectural patterns are similar to software design pattern but have a broader scope." – Pagotti Feb 9 '17 at 16:40
  • But architecture pattern should get the system identity in diagrams, like I did with the Layers Pattern, but MVC can't. – nrofis Feb 11 '17 at 11:06
up vote 1 down vote accepted

This is a difficult question to answer mainly because there is no clear formula that you can apply to get back a response of the type "YES, it fits <insert paradigm/pattern here>, or NO, it doesn't".

Take MVC itself for example. There are a lot of variations on the original MVC.

It's often referred to as a pattern, but I don't find it terribly useful to think of it as a pattern because it contains quite a few different ideas. Different people reading about MVC in different places take different ideas from it and describe these as 'MVC'. If this doesn't cause enough confusion you then get the effect of misunderstandings of MVC that develop through a system of Chinese whispers.

The same for patterns. When does one patterns stop being a design pattern and becomes an architectural pattern? It all depends on context of course. How are you using it? Where are you applying it? What problem are you solving with it? At what scale?

Architecture means the "big boxes" that compose your application and how these interact with each other to make the application work. MVC is indeed considered an architectural pattern because of the scale at which you apply it (at the level of your application's architecture).

But a design pattern is a description or template for how to solve a problem and MVC fits this definition also. So again, where do you draw the line?

The picture you posted is a layered architecture. You can fit MVC into that if you want, like this:

enter image description here

And now you can draw it. But because (mentioned above) MVC is also a description or template for how to solve a problem what you are showing is not just a diagram of your architecture but also the solution you used to build it.

Like I said, this is a difficult question to answer...

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.