Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

Designing Solutions: From Requirements to Architecture

Introduction

In our previous lesson, we established a critical process for translating abstract business problems into a concrete set of functional and non-functional requirements (NFRs). We learned that these requirements, particularly the NFRs or "quality attributes," are the primary drivers of architectural decisions.

This lesson takes the next logical step. We will use those requirements to answer the first and most fundamental question in system design: What is the overall structural style of the system we are going to build? You will learn how to propose a high-level architectural approach by evaluating common architectural patterns against the specific needs of the business. This is where you move from defining what the system must do to deciding how it will be structured at the highest level—a foundational skill for your transition into a senior development and architectural role.

1. From Requirements to Architecture: The Role of Patterns

Once you have a list of requirements, it's tempting to jump straight into coding. However, senior engineers first pause to consider the system's "shape" or architecture. They don't invent this from scratch; instead, they draw from a known set of architectural patterns. These are proven, reusable blueprints for structuring software systems that solve common problems.

Think of them like the different structural systems in building construction—a skyscraper has a different foundational blueprint than a single-family home because their requirements (height, capacity, materials) are vastly different. In software, these patterns provide a shared vocabulary and a strategic framework for your design.

To begin, let's establish a clear understanding of what these patterns are and why they are so vital in enterprise software development.

Enterprise software architecture patterns: The complete guide

This guide from vFunction clearly defines architectural patterns and their strategic importance. It's a great starting point to understand why we don't design every system from a blank slate.

Please read the first two main sections of the article: Start with the definition to understand that these patterns address broad, system-wide concerns like scalability and component interaction. Then, read the section on why they matter. Pay close attention to the benefits listed, such as reducing technical risk and improving communication.

The key takeaway is that choosing a pattern is your first major design decision. It sets the constraints and lays the foundation for all subsequent development.

2. A Glimpse into Common Architectural Patterns

There are many architectural patterns, but a few dominate modern web application development. As a developer with a background in Java/Spring Boot and React, you are likely already working within one of these, perhaps without formalizing it. Let's briefly survey the most common options.

  • Layered (N-Tier) Architecture: This is the traditional workhorse. The application is structured into horizontal layers, such as Presentation (UI), Business Logic, and Data Access. Most monolithic applications follow this pattern. It's simple, well-understood, and easy to start with.
  • Microservices Architecture: This pattern structures an application as a collection of small, independent services, each focused on a specific business capability (e.g., an Order Service, a Product Catalog Service). They communicate over a network, typically via APIs. This approach offers great scalability and deployment independence but comes with significant operational complexity.
  • Event-Driven Architecture: Instead of services calling each other directly, they communicate asynchronously by producing and consuming "events." For example, when an order is placed, an OrderPlaced event is published. Other services (like Payment and Inventory) can then react to this event. This promotes loose coupling and is excellent for systems that need to respond to changes in real-time.

Enterprise software architecture patterns: The complete guide

Let's continue with the same article to get a high-level overview of these patterns.

Please read the section on common patterns. For this lesson, focus your attention on the descriptions for Layered architecture, Microservices architecture, and Event-driven architecture. Notice the diagrams and the "key attributes" for each one.

Understanding these basic blueprints is the first step. The next, more crucial step is learning how to choose between them.

3. The Core of Architectural Thinking: Trade-offs

If there is one universal law in software architecture, it is this: Everything is a trade-off. There is no single "best" architectural pattern. The "right" choice is entirely dependent on the context defined by your requirements.

This is the most significant mindset shift when moving from a developer to an architect. A developer's focus is often on making a specific feature work correctly and efficiently. An architect's focus is on balancing competing forces across the entire system. For example, a decision that improves performance might hurt maintainability. A choice that increases scalability might also increase cost and complexity.

This video by Mark Richards, a renowned software architect, brilliantly illustrates this concept. He explains how to develop an "architect's eye" for seeing and analyzing these trade-offs.

How to Think Like an Architect - Mark Richards

This talk, "How to Think Like an Architect," is one of the best resources for understanding the architectural mindset. Mark Richards explains the core principles through clear, practical examples.

This video is packed with insights. Please watch the following key segments: The Trade-off Example: Watch how a seemingly simple decision (sending a full vs. key-based event) has deep architectural implications. This perfectly illustrates the difference between a developer's and an architect's perspective. Translating Business to Architecture: This section is crucial. It shows how business concerns (e.g., user satisfaction, time to market) translate directly into the non-functional requirements (e.g., performance, agility) that drive your architectural choice. Making Decisions with a Chart: See how you can use a simple qualitative analysis to compare architectural styles against your most important "-ilities". The First Law of Architecture: This segment reinforces the core idea of trade-offs and provides a clear model for how to justify a decision by linking it back to business needs.

The core lesson here is that you must justify your architectural proposal by explaining the trade-offs you've made in the context of the business's priorities.

4. A Systematic Approach to Choosing Your Architecture

To make an informed proposal, you need a structured process. This process ensures you don't fall into the trap of choosing a pattern simply because it's popular or familiar. It forces you to ground your decision in the requirements.

Here is a step-by-step framework adapted from best practices in the industry.

Step 1: Identify and Prioritize Architectural Drivers
This comes directly from our last lesson. Review your non-functional requirements and identify the top 3-5 "quality attributes" that are most critical for success. Are you optimizing for time-to-market, scalability, security, or low operational cost? You cannot optimize for everything.

Step 2: Evaluate Candidate Patterns Against Your Drivers
Create a simple matrix to compare your candidate architectures (e.g., Monolith, Microservices) against your prioritized drivers. You can use a simple star rating, as Mark Richards demonstrated, or a pros-and-cons list.

Enterprise software architecture patterns: The complete guide

This article provides a comparative table and a checklist that formalize this evaluation process.

Please review these two sections: The comparative analysis table and the subsections on Performance and Maintenance provide a ready-made trade-off analysis. The section on choosing the right pattern gives you a checklist of factors to consider, including domain complexity, team structure (Conway's Law), and future growth.

Step 3: Propose an Architecture and Justify It
Select the pattern that best aligns with your prioritized drivers. Your proposal should not just state your choice, but clearly articulate the reasoning behind it. A strong proposal sounds something like this:

"I propose we begin with a modular monolith architecture. Our primary business driver is speed to market, which translates to a need for high maintainability and simple deployment. A monolith allows our small team to develop and deploy features quickly with low operational overhead. We will mitigate the risk of it becoming a 'big ball of mud' by enforcing strict module boundaries from the start, which will also make it easier to carve out microservices later if our scalability needs change."

This justification acknowledges the drivers, states the choice, explains the benefits, and even identifies a risk and mitigation strategy.

5. Practical Application: Architecting an eCommerce Platform

Let's apply this process to a concrete example. Consider the Request for Proposal (RFP) for an eCommerce application shown below.

An RFP for an eCommerce web application, outlining project overview, company description, and goals.

Let's break this down using our framework:

  1. Identify Drivers:

    • Fault Tolerance: Explicitly mentioned. The system must be resilient.
    • Agility/Time-to-Market: The company has "faced the need to create a web application to streamline...processes," implying a need to move relatively quickly.
    • Scalability: The company has "grown up to one of the TOP 3 brands in the niche," indicating that future user and transaction growth is a primary concern.
    • Maintainability: The project includes several distinct parts (e-store, chatbot, admin tool, analytics). This suggests a need for clear separation of concerns to manage complexity.
  2. Evaluate Candidates:

    • Layered Monolith:
      • Pros: Faster initial setup, simpler deployment, lower operational complexity for a potentially small initial team.
      • Cons: Can be difficult to scale different parts of the application independently. A failure in one component could bring down the entire application (lower fault tolerance unless architected carefully). Long-term maintainability can suffer as it grows.
    • Microservices:
      • Pros: Excellent for scalability (you can scale the Product Catalog independently from the Chatbot). High fault tolerance (if the Analytics service fails, customers can still place orders). Aligns well with the clear functional separation in the goals.
      • Cons: Much higher initial development and operational complexity (service discovery, distributed transactions, monitoring). Requires a mature DevOps culture.
  3. Propose and Justify:

    • Proposal A (Safety and Speed): "I propose a modular monolith. The primary driver is launching a reliable, fault-tolerant platform quickly. This approach minimizes initial complexity, allowing us to build and deploy faster. We will ensure fault tolerance through redundant instances behind a load balancer and achieve maintainability by designing with clear internal module boundaries (e.g., for Catalog, Orders, Analytics). This gives us a solid foundation that can be selectively broken into microservices in the future as specific scaling needs arise."
    • Proposal B (Scaling for the Future): "I propose a microservices architecture. The key driver is the company's significant growth and the need for long-term scalability and fault tolerance. By building independent services for Orders, Catalog, Chatbot, and Analytics, we can scale each part based on demand and ensure a failure in a non-critical component like Analytics does not affect the core customer experience. While the initial investment is higher, this approach directly addresses the primary business risks of growth and resilience."

Both are valid proposals. The best one depends on a deeper conversation with the business about their risk tolerance, budget, and team capabilities. Your job as an architect is to present these options and their trade-offs clearly.

Conclusion

You have now learned the foundational process of architectural decision-making. You've moved beyond simply understanding requirements to using them as a tool to shape the very structure of a software system.

Key Takeaways:

  • Architectural patterns are standardized blueprints that provide a starting point for your system design.
  • The selection of a pattern is driven by the business goals, which are translated into non-functional requirements (quality attributes).
  • Every architectural decision involves trade-offs. There is no universally "best" architecture, only the most appropriate one for a given context.
  • A strong architectural proposal clearly identifies the key drivers, evaluates options, and justifies the final choice by explaining the trade-offs made.

In our next lesson, "Design a high-level system architecture diagram for a multi-tier web application," we will take the architectural style you've just chosen and learn how to communicate it visually. We will explore the C4 model, a popular and effective technique for creating clear, easy-to-understand diagrams that tell the story of your architecture, like the one shown below for an internet banking system.

This C4 Container diagram shows the high-level components of an Internet Banking System and their interactions, a technique we will explore in the next lesson.

Can't find a good explanation? Sign up and we'll make it for you

Sign up