views:

557

answers:

5

According to Sun and Msdn it is a design pattern.

According to Wikipedia it is an architectural pattern

In comparison to design patterns, architectural patterns are larger in scale. (Wikipedia - Architectural pattern)

Or it is an architectural pattern that also has a design pattern ?

Which one is true ?

+1  A: 

I think both are true. If you're looking at a particular instantiation of MVC in a framework like Ruby on Rails, that instantiation is more of a design pattern. If you look at MVC as a general concept, it's more of an architectural pattern.

Jim Ferrans
The other way round, I would have said.
anon
@Neil: I see your point, I think, and have edited for clarity. Still working on my morning coffee ... ;-)
Jim Ferrans
+3  A: 

MVC is more of an architectural pattern, but not for complete application. MVC mostly relates to the UI / interaction layer of an application. You're still going to need business logic layer, maybe some service layer and data access layer. That is, if you're into n-tier approach.

Developer Art
Yeah, I would say MVC is an architectural pattern for your Presentation tier.
murki
+5  A: 

Why does one of them have to be true?

Both can be true, depending on point of view.

MVC can be an architectual pattern, if it forms the basis of the application architecture.

It can also be seen as simply a design pattern, an abstract notion that is applicable to any application.

Oded
+1  A: 

And according to Martin Fowler they are GUI architectures: Martin Fowler-GUI architectures

It depends on the size of the application, as it only affects GUI related classes, in a small one (mostly GUI) it could be considered an architectural pattern whereas in a huge one it would just be a design pattern that you apply to the GUI code (could be 10% of the apps code).

Iker Jimenez
+2  A: 

I know that it's been answered awhile ago, but no one has yet mentioned the book that made MVC famous: Pattern-Oriented Software Architecture (POSA), by Buschmann, et al published in 1996. Though not as widely read as the Design Patterns book, by Gamma, et al, POSA is one of the foundational books used by the patterns community.

Oh, and POSA very clearly identifies MVC as an architectural pattern. My hunch is that MS and Sun are just being sloppy and calling every pattern a "design pattern".

John