Leanpub Header

Skip to main content

Master Software Architecture

A Pragmatic Guide

Tired of architecture books that read like academic papers? This pragmatic guide will show you how to design robust systems that work in the real world. I have learned these lessons the hard way so you don't have to. Everything you need to know about software architecture—from core principles to advanced patterns—explained in plain English and practical examples.

Paperback edition

This book is available in multiple packages!

Pick Your Package
PDF
EPUB
WEB
797
Readers
400
Pages
84,478Words
About

About

About the Book

Feeling lost in the world of software architecture? This software architecture book is for you!

Years ago, I felt lost when I started in software architecture. There were so many topics and issues, and I was a novice architect in the middle. I didn't know where to start building applications, what key areas to pay attention to, or how to build systems that would be able to evolve over many years.

I have spent countless hours and days learning to recognize this area, and it has not been easy—knowledge was scattered throughout the Internet, books, and tutorials. Finally, mentors helped me get on the right track.

That's why I decided to write this software architecture book. I want to help you navigate this complex world of hard decisions, trade-offs, and techniques that will support you in this fantastic journey. I wish you didn't have to make the same mistakes as me and give up your private life by spending many hours looking for the right information. Each step describes practically the most important aspects of software architecture.

Contents:

Step 1: Understand Software Architecture: In this step, you will learn the basics of software architecture, covering key areas like business analysis, solution architecture, and infrastructure. You'll understand the role of software architects, their influence on architectural decisions, and the impact of drivers like functional requirements, technical constraints, and quality attributes while exploring how pragmatism and holism shape these decisions.

Step 2: Discover Your Business Domain: Next, we will explore the critical aspect of system design: the business domain. Through workshops on Event Storming and Domain Storytelling, you will learn to analyze processes, discover subdomains, define bounded contexts, and create a context map (strategic Domain-Driven Design).

Step 3: Recognize the Environment Around You: Step three focuses on understanding your work environment, including decision-making processes, project goals, budget limitations, and differing expectations of stakeholders and development teams. You will assess team skills with a competency matrix, plan infrastructure for various team setups, and learn to calculate crucial metrics like active users, request numbers, and SLA-defined availability, then apply this knowledge to a practical case.

Step 4: Choose Deployment Strategy: In this step, we explore the technical aspects of software architecture, focusing on single and multiple deployment unit strategies and their most popular representatives: modular monoliths and microservices. You will learn about communication methods, database design, deploying changes, scaling applications, and key patterns like outbox, inbox, and dead letter queue.

Step 5: Define Release Strategy: Step five focuses on delivering new application versions using strategies like basic, blue-green, canary, and rolling deployments and leveraging continuous delivery and deployment. You will adopt engineering practices such as swarming, pair and mob programming, feature flags, trunk-based development, and short-living branches. You will also learn how to organize post-mortem meetings to analyze past production issues and prevent future ones. I will also show you how to handle changes in the database in case of various versions of the application,

Step 6: Focus On Testing: This step covers different ways to test your software, focusing on key concepts from a software architect’s perspective. You will learn about the pyramid of tests, the inverted pyramid, the diamond, when to use each, penetration, performance, and load testing to ensure software reliability.

Step 7: Evolve Your Architecture: This step highlights that architecture evolves over time, focusing on four key steps: simplicity, maintainability, growth, and complexity. You'll learn helpful concepts like CQRS, database replicas and sharding, and tactical Domain-Driven Design to ensure your application's robustness and support informed decision-making as it evolves with the business.

Step 8: Don't Forget About Security: In the final step, you will learn about common security vulnerabilities in greenfield and legacy applications, such as IDOR, supply chain attacks, SQL injection, XSS, and DDoS. You'll also explore defense strategies, misconceptions leading to vulnerabilities, and the differences between encoding, encryption, and hashing to select the appropriate mechanism for your needs.

Extra 1: Other Engineering Practices: This section covers important engineering practices that didn't fit into the main body of the book. You'll learn about metrics, developer carousels, effective use of vertical slices in product design, and managing technical debt.

Extra 2: Architecture Exercises: To master software architecture, you need to put theory into practice. I have prepared several real-world scenario exercises to challenge you, validate your understanding, and highlight areas for further study, enhancing your learning journey.

Share this book

Packages

Pick Your Package

All packages include the ebook in the following formats: PDF, EPUB, and Web

The Book

Minimum price

Suggested price$19.00

$19.00

    Dev Squad Special: 5-for-4 Book Deal

    Minimum price

    Suggested price$75.00

    $75.00

      Author

      About the Author

      Maciej "MJ" Jedrzejewski

      Fractional architect, consultant, and advisor. 13 years in the IT industry.

      Author of Master Software Architecture book and Evolutionary Architecture repository.

      Promoter of continuous deployment, holistic and pragmatic software architecture, and short feedback loops. Speaker at IT events.

      Email: contact@fractionalarchitect.io

      Leanpub Podcast

      Episode 303

      An Interview with Maciej "MJ" Jedrzejewski

      Contents

      Table of Contents

        • Preface
          • About Me
          • What Will You Find In This Book?
            • Step 1: Understand Software Architecture
            • Step 2: Discover Your Business Domain
            • Step 3: Recognize the Environment Around You
            • Step 4: Choose Deployment Strategy
            • Step 5: Define Release Strategy
            • Step 6: Focus On Testing
            • Step 7: Evolve Your Architecture
            • Step 8: Don’t Forget About Security
            • Extra 1: Other Engineering Practices
            • Extra 2: Architecture Exercises
          • Who Should Read This Book?
          • Feedback
          • Acknowledgments
        • STEP 1: Understand Software Architecture
          • Key areas of software architecture
          • Architectural drivers
          • Importance of software architecture
          • How to stay pragmatic?
          • How to stay holistic?
          • Who is a software architect?
          • What are the key drivers of a successful software architecture?
          • Recap
        • STEP 2: Discover Your Business Domain
          • The case
          • How do I start?
          • Organize high-level workshops
            • Event Storming
            • Domain Storytelling
          • Organize in-depth workshops
            • Event Storming
            • Domain Storytelling
          • Combine both techniques
          • Use knowledge from workshops
            • Subdomains
            • Bounded contexts
            • Context map
          • Recap
        • STEP 3: Recognize the Environment Around You
          • What do you want to build?
          • How are product decisions made?
          • What are the strengths and weaknesses of your development team?
          • Are there any other development teams?
          • Are there any infrastructure teams?
            • Separate infrastructure team(s) with deep expertise
            • Separate infrastructure team(s) with limited expertise
            • No dedicated infrastructure team
          • What does existing infrastructure look like?
          • What scale and numbers will the application serve?
            • SLA
            • Users & requests
            • Storage
          • What are the budget limitations?
          • When is the deadline?
          • What are the expectations?
          • Our case
          • Recap
        • STEP 4: Choose Deployment Strategy
          • Single deployment unit
          • Multiple deployment units
          • Communication
            • Commands & queries
            • Events
            • Strategies for message delivery and processing
            • Dead letter queue
          • Modular monolith
            • Module boundaries
            • Deploying changes
            • Scaling
            • Database
            • Communication from the outside
            • Communication between modules
            • When to decide on it?
            • Further education
          • Microservices
            • Microservice boundaries
            • Deploying changes
            • Scaling
            • Database
            • Communication from the outside
            • Communication between microservices
            • When to decide on it?
            • Further education
          • Our case
          • Recap
        • STEP 5: Define Release Strategy
          • Release versus deployment
          • Deployment strategies
            • Basic
            • Blue-Green
            • Canary
            • Rolling
            • Compatibility with previous versions
          • Fully automated releases - Continuous deployment
            • The change
            • Development experience
            • Example flow
          • Semi-automated releases - Continuous delivery
          • Pragmatic approach
            • Short-living branches
            • All hands on deck
            • Post mortem
          • Our case
          • Recap
        • STEP 6: Focus On Testing
          • Traditional testing
          • Cost of fixing bugs
          • Shift-left testing
          • Shift-left vs. traditional testing
          • Testing pyramid and its variations
            • Pyramid
            • Inverted pyramid
            • Diamond
            • From my diary
          • Performance
            • Load testing
            • Stress testing
          • Penetration testing
          • Our case
          • Recap
        • STEP 7: Evolve Your Architecture
          • Project paradox
          • Common architectural pitfalls
            • Too complex architecture from the start
            • Too trivial architecture for too long
          • Evolve together with your business
          • First: Focus on simplicity
            • Requirements
            • Main considerations
            • Decisions
            • Code structure
            • Database
            • Communication
            • Architecture Decision Log
            • Result
          • Second: Focus on maintainability
            • What changed?
            • Maintainability: Problems to address
            • Code structure
            • Team structure
            • Communication
            • Result
          • Third: Focus on growth
            • What changed?
            • Growth: Problems to address
            • Scaling
            • Communication
            • Result
          • Fourth: Focus on complexity
            • What changed?
            • Complexity: Problems to address
            • Redesign the module
            • Domain Model
            • Result
          • Recap
        • STEP 8: Don’t Forget About Security
          • Insecure Direct Object References (IDOR)
          • Exposure to DoS and DDoS attacks
          • Unnecessary public endpoints
          • Full path as endpoint parameter to download files
          • Lack of encryption on sensitive information
          • Sensitive information in logs
          • Supply chain attack
          • Cross-Site Scripting (XSS)
          • SQL Injection
          • Misconfiguration of infrastructure
          • Bonus: Exposure of passwords
          • Recap
        • Epilogue
        • Extra 1: Other Engineering Practices
          • Working with metrics
          • Vertical slices
          • Developer carousels
          • Addressing technical debt
        • Extra 2: Architecture Exercises
          • Case 1
          • Case 2
          • Case 3

      Contributors

      About the Contributors

      Urs Enzler

      Martin Dilger

      Kamil Kiełbasa

      José Roberto Araújo

      Jose Luis Latorre

      Get the free sample chapters

      Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

      The Leanpub 60 Day 100% Happiness Guarantee

      Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

      Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

      You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

      So, there's no reason not to click the Add to Cart button, is there?

      See full terms...

      Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

      We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

      (Yes, some authors have already earned much more than that on Leanpub.)

      In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

      Learn more about writing on Leanpub

      Free Updates. DRM Free.

      If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

      Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

      Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

      Learn more about Leanpub's ebook formats and where to read them

      Write and Publish on Leanpub

      You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

      Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

      Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

      Learn more about writing on Leanpub