1 Introduction

 

This chapter covers

  • Most important trade-offs in production systems
  • Design consequences of unit testing vs. integration testing
  • Understanding that code and architecture design pattern are not fitting every problem

When designing our code, APIs, and system architectures, we need to make decisions that impact maintenance, performance, extensibility, and many other factors. Almost always, the decision to go in one direction limits the possibility to evolve in a different one. The longer the systems live, the harder it is to change their design and withdraw from previous decisions. The design and programming tradeoffs presented in this book focus on choosing between two or more paths. It’s important to understand that whatever you decide, you will need to live with its pros and cons.

Depending on the context, time to market, and many other factors, the team needs to make those hard decisions. I will show you the tradeoffs that I needed to make in production systems and compare them with alternative ways of doing things. I hope that after reading every chapter, you will start noticing the design decisions that you are making every day. Noticing them will allow you to make conscious choices and consider their pros and cons.

1.1   Consequences of every decision and pattern

1.1.1   Unit testing decisions

1.1.2   Proportions of Unit and integration tests

1.2   Code design patterns and why they do not always work

1.2.1   Measuring our code

1.3   Architecture design patterns and why they do not always work

1.3.1   Scalability and elasticity

1.3.2   Development speed

1.3.3   Complexity of microservices

1.4   Summary

sitemap