Published Mar 19, 2018

Clean Architecture - Are Microservices Truly Decoupled?

Michael and Joe delve into the complexities of microservices, exposing hidden dependencies and deployment challenges, while emphasizing clean architecture principles and testing strategies to ensure maintainable and scalable software systems.
Episode Highlights
Coding Blocks logo

Popular Clips

Episode Highlights

  • Test API

    Creating a test API is crucial for decoupling tests from the application, ensuring that tests remain stable even when the application changes. Joe Zack explains that the testing architecture should have its own API, a superset of interfaces, to avoid rewriting tests during refactoring 1. Alan Underwood adds that this API should have superpowers, bypassing normal system restrictions, and should never be shipped with the product to avoid security risks 2.

    This chapter sort of came with a disclaimer like, we'll rock your world.

    --- Alan Underwood

    This approach ensures that tests can assume any user rights and mock necessary components without compromising the system's integrity.

       

    Unit Testing

    Unit testing requires a balance between thoroughness and practicality. Joe and Alan discuss the importance of not striving for perfection in code, as changes are inevitable 3. Instead, they emphasize making the code work, then making it right and maintainable.

    Perfection is a tough one in programming.

    --- Alan Underwood

    They also touch on the concept of outside-in testing, which focuses on testing the application from the user's perspective rather than getting bogged down in internal details 4.

       

    Testing Strategies

    Various testing strategies offer different benefits and challenges. Joe and Alan highlight the importance of focusing on the overall intent of the application rather than low-level details 5. They discuss the concept of independently deployable tests, which should be isolated from the production environment to ensure they don't interfere with the system 6.

    You don't deploy the test version of your code to a production environment.

    --- Joe Zack

    This approach helps maintain a clean separation between testing and operational code, making it easier to manage and maintain both.

Related Episodes