“Real-world” architecture vs software architecture

Real-world architecture deals with buildings, streets, rooms, bridges etc. In the world of software architecture, this is all “UI” (user interface). This is one major difference between the two. In software architecture, the UI is something separate. Its logic is the logic of the UI, not the domain. It pulls information from lower layers and displays it, pushing back changes and newly entered information.

Real-world architecture is visible to the “user”, whereas software architecture is invisible, save for the UI elements. And in real-world architecture, the architect has more freedom than the computer UI architect. Computer UI’s are very constrained: there are guidelines saying where buttons and text fields should be placed, how windows are to be laid out etc.

Real-world architecture is constrained by the user and the specific domain. If it is a hotel that is built, the registration desk should be easily accessible to the visitor, probably in the middle of the back wall in the lobby. The other day I read about architecture in Las Vegas, and there the casinos are often in hotels. But the casinos are apparently of a higher priority than the hotels, so you can find slot machines and the casino rooms straight ahead after having entered the lobby, and the hotel registration desk is often placed to the left or right, so you have to make a U turn to find it.

Software architecture is constrained by the domain only. It’s considered a good practice to ignore the specifics of the user interface when dealing with the domain code. Secondary to the domain is the programmers: you have to strive for an intuitive architecture in order to make the system easy to work with – for the programmers. The humans that walk around in the software building are programmers, not users.

I also read that signs are considered bad by some architects. For example, in an airport, the building should communicate where to find the check-in desks, the gates, the shops, bars, restaurants etc. When that can’t be achieved, you need signs. Signs are the source-code comments for buildings. It’s the same motivation for why source-code comments are considered bad: the code should communicate where to find things.

A familiar architecture conjures up an image. Say “airport” and you know what to expect when you enter the doors. (Today, signs are probably considered part of the “airport architecture”, since airports have grown so huge that you can’t do without them; but still, the building communicates where to go next.) A powerful software architecture should do the same. The instant you learn that the system has the “online-store architecture”, you should be able to expect that there are ShoppingCart, Product, Customer etc classes.

And for a completely new type of system, choosing a metaphor compensates for there being no tradition within the software field to fall back on. “Airport” could actually be a metaphor for a system where the user first “checks in” her “luggage”, goes to the “gate”, waits for “departure” (during which time her “luggage” is “loaded onto the plane”), “boards the flight”, “takes off” etc.

If the architecture doesn’t convey information like this, you have to draw diagrams and not until next time, provided that the same people are on the project, there will be a tradition for the programmers to fall back on the instant you say “Well, it’s an XYZ architecture.”

The above was posted to my personal weblog on July 20, 2002. My name is Peter Lindberg and I am a thirtysomething software developer and dad living in Stockholm, Sweden. Here, you’ll find posts in English and Swedish about whatever happens to interest me for the moment.


Related posts:

Posted around the same time:

The seven most recent posts:

  1. Tesugen Replaced (October 7)
  2. My Year of MacBook Troubles (May 16)
  3. Tesugen Turns Five (March 21)
  4. Gustaf Nordenskiöld om keramik kontra kläddesign (December 10, 2006)
  5. Se till att ha två buffertar för oförutsedda utgifter (October 30, 2006)
  6. Bra tips för den som vill börja fondspara (October 7, 2006)
  7. Light-Hearted Parenting Tips (September 16, 2006)