As a developer, you often work on the code of a few modules or packages. However, when you step into the shoes of an architect, the scope expands significantly. Your role involves designing and coordinating numerous components and systems, interacting with each other.

So, how can you manage this complexity and keep your focus on the features that matter to you?

One key strategy is to use abstraction, a critical concept in architecture. Abstraction allows you to hide irrelevant details while emphasizing the essentials. You can simplify complex systems by focusing on what matters most for your architecture.

Let’s consider an online shopping platform as an example. This platform is a complex system comprised of many microservices like the catalog service, the cart service, the payment service, and more. Each microservice has unique functions and details, communicating with others via APIs.

Suppose you need to introduce new microservices that interact with the existing ones. In that case, you don’t need to understand the ins and outs of each microservice. You only need to grasp how to use each microservice’s API. These abstractions hide the underlying complexity, providing the essential features you need.

Therefore, abstraction helps simplify a complex system by focusing on the what instead of the how. You can utilize an existing microservice without knowing its internal workings.

But finding the right level of abstraction can be challenging, especially for new architects. Abstraction levels can vary from one project to another and even within the same project. You may need, for example, to focus on writing code for POC, later switch your attention to the components that compose your application, and then move to a higher level where integration with external systems is your goal.

How do you improve your skills in abstraction?

Here are some practical tips:

  • Visualize and represent the relevant aspects of your system using diagrams. Create multiple diagrams to capture different levels of detail. Remember, the goal isn’t to capture every detail but to provide a clear, visual understanding. The C4 model for visualizing software architecture is excellent for this purpose. It uses a set of hierarchical abstractions and diagrams to create maps at various detail levels.

(Source: https://c4model.com/)

  • Share your diagrams with the team for feedback. Their comments can guide adjustments to achieve the right abstraction level.
  • Neuroscience also comes in handy when learning abstraction. You can efficiently organize your knowledge into meaningful chunks by focusing on critical information and ignoring irrelevant details. This approach helps your brain manage large volumes of information.

Source (https://www.coursera.org/learn/learning-how-to-learn)

  • Like any skill, you can improve your abstraction abilities with practice. This practice involves honing your focus on essential information and grouping previously disjointed pieces of information into meaningful chunks. This process aids in managing large amounts of data. The resulting ‘chunk’ is viewed as a single element, with the knowledge combined within activated and processed together by the brain.

Training your brain in this way is similar to learning how to drive. Initially, your focus is scattered across starting, moving, stopping, turning, parking, etc. But as you gain experience, these steps become automatic, and your brain chunks them together, reducing the need for focused attention. Similarly, you can chunk components into layers, modules, or patterns when designing a software system, representing the system’s main functions and features. This technique simplifies the system, making it easier to understand and modify.

Resources to learn more.

Some of the resources that you can use to learn more about abstraction and big picture in software architecture are:

  • The book “Sustainable Software Architecture” by Carola Lilienthal (Chapter 5: Cognitive Psychology And Architectural Principles)
  • The book “Learning how to learn” by Barbara Oakley, Terrence Sejnowski
  • The book “Software Architecture in Practice”, 4th Edition by Len Bass, Paul Clements, Rick Kazman. (Chapter 1)
About the Author

My name is Adel Ghlamallah and I’m an architect and a java developer.

View Articles