Muneeb - U-Rehman (17-Arid-1737) Assignment # 2: Architectural Pattern Design Pattern
Muneeb - U-Rehman (17-Arid-1737) Assignment # 2: Architectural Pattern Design Pattern
Assignment # 2
1. What's the difference between an architectural pattern, such as those
described in this chapter 13, and design patterns, such as those collected
by the Gang of Four in 1994 and many other people subsequently? Given
a pattern, how would you decide whether it was an architectural pattern
or a design pattern?
Architectural pattern Design pattern
Architecture mostly addresses problems of design patterns are medium-scale and mostly
distributed functionality, system
language-independent abstractions using
partitioning, protocols, interfaces,
object-oriented mechanisms and described by
scalability, reliability, security UML diagrams which solve commonly occurred
problems in software construction
Architecture is strategic Design is tactical
architecture patterns are well known Design Patterns are well known patterns for
patterns for solving software application solving technical problems in a way that has
architecture problems. proven itself many times
2. Describe why the MVC is a light weight and highly testable architectural
pattern?
MVC is a design pattern. Mvc is lightweight means, first off, all its not support "View State"
concept because it’s not supported the server side control.MVC provides by default layered
architecture like Model, View and controller make application faster and flexible. Since in mvc,
we are using client-side control, its faster and lightweight.
In MVC, model depends on nothing, view depends on model, and controller depends on view &
model.
If A is dependent on B, and B is not unit testable, then A is not unit testable.
View and Controller are not testable. By Making model not dependent on view and controller,
model becomes testable. In MVC, most of the code will be in the model