Software Architecture Fundamentals - 05

πŸ› ️ A Simple Design Process: From Problems to Architecture

Designing great software starts by solving real user problems. Here’s a step-by-step guide to how that happens, from identifying the issue to defining the system's structure. This post uses plain language, is sectioned clearly, and includes a helpful diagram to guide your thinking.


πŸ” 1. Understand the Problem (Problem Statement)

Before building anything, ask:

"What real-world problem am I solving?"

🎯 Example: Blogging

“I need to build influence in my field by publishing articles people read and trust.”

The blog isn’t the problem. Becoming influential is. Writing a blog is just one possible solution.


✍️ 2. Tell the Story (User Stories)

Write short stories about how users interact with your system. Don’t describe buttons or features — describe real human tasks and why they matter.

✏️ Example Stories

  • "Readers need to submit comments so authors get feedback."

  • "Editors need to approve comments to keep the discussion civil."

Keep stories short and valuable, like sticky notes.


✂️ 3. Narrow the Story (Vertical Slicing)

Don’t try to build everything at once. Slice stories into thin, valuable workflows a user can complete, even if it's just one path.

Avoid:
UI ➝ logic ➝ data (horizontal slicing) ❌
Do this instead:
Start ➝ meaningful outcome (vertical slicing) ✅


🧭 Workflow Diagram: Comment Approval Example

Here’s a real-world comment approval flow:



This diagram shows multiple valid paths a comment could take, such as:

  1. Submit → Auto-display (simple, fast)

  2. Submit → Email → Reply → Approve → Display

  3. Submit → No action for 2 days → Delete

Each path is a narrowed user story that can be built and tested quickly.


🧠 4. Identifying Bounded Contexts and Entities

Now let’s move from stories to architecture using a Domain-Driven Design (DDD) method called Event Storming.

🧩 Step-by-Step:

1. Identify Events

Based on the diagram, we identify domain events like:

  • Comment Submitted

  • Comment Added to Dashboard

  • Email Sent

  • Reply Received

  • Moderator Approves

  • 2 Days Elapsed

  • Comment Rejected

2. Add Actions

Each event triggers actions, such as:

  • Show comment

  • Delete comment

  • Notify moderator

Use different sticky note colors if you’re doing this physically.

3. Assign Agents (Entities)

Each action is done by a responsible agent. For example:

  • Moderator: decides on approval

  • System: sends email, deletes comment

  • Thread Manager: updates display

4. Define Bounded Contexts

Group related agents under bounded contexts:

  • Comment Submission

  • Comment Moderation

  • Comment Display

This tells you where the business rules live and keeps your system modular and clear.


🧱 5. Architecture From the Ground Up

Finally, build a communication map:

  • Create one index card per agent

  • Describe its job briefly

  • Connect cards with yarn (or arrows) to show how they interact

πŸ‘‰ This looks a lot like a class diagram, and that's the point. You’re building your architecture from real user needs.


🏁 Final Thoughts

A great design process is grounded in user value, clear stories, and iterative building. With every new story, repeat the steps:

  • Event storm

  • Identify actions, agents, and contexts

  • Expand your architecture

πŸ” Keep it flexible. Keep it simple. Build what matters.

Comments

Popular posts from this blog

SQL Query and performance tuning - Indexing in depth

Apache Kafka - The basics

Spring: How to deal with circular dependencies