Architecture patterns Flashcards
aims of software patterns
enhance reusability of OO code
benefits of design patterns
capture expertise and make it accessible to non-experts in an encapsulated design pattern help communication amongst devs makes usuability easier facilitate design modifications improve design documentation
architectural model
artefact documenting some or all of the architectural design decisions about a system
architecture visualization
depicts some or all of design decisions to a stakeholder
architecture view
subset of related architectural design decisions
when is MVC pattern used
when there are multiple ways to view and interact with the data
when the future requirements for interaction and presentation of data are unknown
how does MVC work
separates presentation and interaction of data
Model - manages systems data ans associated operations on that data
view - manages how the data appears to the user
controller manages the user interaction and passes these interaction to the view and the model
pros of mvc
allows data to change independently of its representation
supports presentation of the same data in different ways with changes made in one representation shown in all of them
cons of mvc
can involve additional code and code complexity
when is layered architecture pattern used
when building new facilities on top of existing systems
development spread across several teams
how does layered architecture work
organizes system into layers with related functionality associated with each layer
pros of layered arch
servers can be distributed across a network and servers can be added/removed with minimal disruption
cons of layered arch
each service is a single point of failure - server failure
performance can be unpredictable because it depends on the network and the system
server management issues
when is pipe and filter pattern used
data processing applications where inputs are processed in separate stages to generate related outputs
how does pipe and filter pattern work
processing of the data in a system is organized so that each processing component (filter) carries out one type of data transformation. Data flows via pipe into component for processing