Software Architecture
Prerequisites: Functions, Classes, APIs
Software architecture is how a program's pieces are organized and how they're allowed to talk to each other — the big-picture structure, as opposed to the details inside any one function.
Real-world analogy: architecture is a building's blueprint — where the plumbing goes, where the load-bearing walls are — decided before worrying about paint color. Get the blueprint wrong, and no amount of good "code" (interior decorating) fixes it.
A common early architectural idea is separating a program into layers, for example:
- Presentation — what the user sees and interacts with.
- Business logic — the actual rules and calculations.
- Data — how information is stored and retrieved.
Keeping these separated means a change to how data is stored (e.g. switching databases) doesn't force a rewrite of what the user sees.