Software Architecture

Ruǎnjiàn Jiàgòu 软件架构 (DISA, DABM)

What is Software Architecture, exactly?

As of 2024, there's no universally accepted definition of "Software Architecture". There are many definitions, often too broad to derive substantial practical value. Consequently, do not expect high-quality content: the information on this site is a blend of rough approximations, bold assumptions, personal experiences and individual preferences.

"Architecture is about the important stuff. Whatever that is." — Ralph Johnson

What is Software Architecture, approximately?

Let's assume you want to build a Thing (software). As soon as the Thing gets a certain size (about 1000 lines of code), the Thing may become unwieldy to think about as a whole. To be able to work with something simple again, you can split the Thing up into pieces. The Thing has now become a system, consisting of components. One important part of Software Architecture is to split a complex thing into pieces in a smart way.

In most cases, the Thing interacts with other things, these interactions are also an important part of Software Architecture.

What is good Software Architecture?

The goal of the Software Architecture is to minimize the effort to create and run the Thing. Common strategies to minimize the effort are to minimize complexity, maximize understandability, minimize variability.

How much to invest into Software Architecture?

Invest in Software Architecture as long as you expect it to save more effort than it costs.

Opportunity: everything is everywhere

Let's assume in the Thing, everything is done everywhere. This is an opportunity to make the Thing easier to understand, by splitting everything into single items and putting each item in a separate source file.

Opportunity: there are many (about 10) files

After putting every item into a separate file, you may end up with many files. This is an opportunity to make the Thing easier to understand, by putting files that do similar things into a separate folder (you put all the code necessary for a feature into a folder with the name of the feature).

Opportunity: everything is communicating with everything

Let's assume in the Thing, everything is communicating from everywhere with everything else. This is an opportunity to make the Thing easier to understand, by splitting the Thing so that communication between parts is reduced.