Architecture Flashcards
architecture
way of organizing code
information hiding
the less a part of a program knows about other parts of a program, the easier it is to change. Basis of architecture.
encapsulation
idea of designing self-contained abstractions with well-defined interfaces that separate different concerns in a program.
programming languages offer encapsulation support through things like
functions and classes, which encapsulate data and functionality together.
scoping
another programming language encapsulation method; hides variables and other names from other parts of program outside a scope.
cross-cutting concerns
things like features and functionality that span multiple different components of a system, or even an entire system. A big ball of mud or spaghetti code.
cross-cutting concerns can lead to
difficulties in program comprehension and long-term design degradation, all of which reduce productivity and increase the risk of defects.
technical debt
the degree to which an implementation is out of sync with a team’s understanding of what a product is intended to be.
Unified Modeling Language (UML)
series of notations for expressing the architectural design of a system before implementing it.
architectural styles
patterns of interactions and information exchange between encapsulated components.
client/server
data is transacted in response to requests.
pipe and filter
data is passed from component to component, and transformed and filtered along the way.
Model-view-controller (MVC)
data is separated from views of the data and from manipulations of data.
Peer to peer (P2P)
components transact data through a distributed standard interface.
Event-driven
components “broadcast” events and others “subscribe” to notifications of these events.
component (first fundamental unit of architecture)
refers to any abstraction—any code, really—that attempts to encapsulate some well defined functionality or behavior separate from other functionality and behavior. have interfaces that decide how it can communicate with other components
connectors (second fundamental unit of architecture)
abstractions (code) that transmit information between components. They’re brokers that connect components, but do not necessarily have meaningful behaviors or states of their own. function calls, api calls, events, requests, etc.
architectural mismatch
Even with carefully selected architectures, systems can still be difficult to put together.
when a mismatch occurs
connecting two styles can require dramatic amounts of code to connect, imposing significant risk of defects and cost of maintenance.
coupled
the user interface needs to know a lot about the data, its meaning, and its structure in order to render it meaningfully.
refactoring
changing the architecture of an implementation without changing its behavior.