Software Architecture Foundations

Notes from various sources including the LinkedIn Learning course by Allen Holub



The Architect

The Agile Architect vs The Traditional Architect

The traditional (waterfall model) architect thinks he’s the sole designer of the system, above everyone who implements the project.

👎 Drawbacks of the traditional architect:

  1. Doesn’t capture the users’ true needs
  2. Big and complex designs
    1. code is written after the design
    2. doesn’t allow for learning
  3. Lack of flexibility
    1. painful bureaucratic processes
    2. not following the design
  4. Slow development process
    1. centralized architect-making decisions
    2. wasted time & money

A UML class diagram of crossing lines, stamped WRONG in red

A cycle: talk to users, build and refine, deploy, review


AgileTraditional
Everybody is an architectSingle architect
Nobody asks permission to experimentArchitect controls permissions
Nudges/suggests towards better decisionsOrders


Thinking Architecturally

Conway’s Law

Any organization that designs a system… will inevitably produce a design whose structure is a copy of the organization’s communication structure.

     - Mel Conway



Big Upfront Design (BUFD or Waterfall)Agile
Design the whole plan and then start implementingPlan a bit, implement and reiterate, things may change, that’s how nature works
Siloed teams, slowed processesQuick interacting teams, active and agile processes, that’s what nature likes
They try to come up with universal design for modules, no room for contextContext matters, nature isn’t perfect
Here you start by designing the database, and then
business logic and then UIStart with the work that your customers have to do (e.g., use case)
Need to decide early what technology to useDefer technology based on the above
Focus is on the implementation technologyFocus is on the customer needs
Parts that customer sees becomes an afterthoughtTechnology is deferred into last responsible moment

context matters



Design Process

Steps in general:

  1. Problem statement
    1. problem
    2. solution
  2. User story
    1. Describe an end user (not yours) going through a domain-level process to achieve some valuable outcome.
    2. Doesn’t describe a computer program.
    3. A well written story should fit on a single sticky note. Sticky notes can be better than using some complicated software.
  3. Identifying agents.

User-story


Agents


Architecture types

System architectureEnterprise architecture
Structure of a specific computer systemDescribes structure of business itself
Shows how modules workShows how things get done and how people communicate

Design patterns

The modern design pattern came out of Christopher Alexander’s work on building architecture. “When you focus on a single aspect of several successful buildings over different time periods, certain patterns are discovered (not invented)”.


Monoliths


Microkernel (plugin) architecture


Message-based architecture




Microservices


Reactive and choreographed systems