Learn
M7: Clean Code

Module 7: Clean Code Architecture

Green Boost repositories organize code such that it is modular, adaptable, and maintainable. The code organization techniques used draw upon ideas from Domain Driven Design, Hexagonal Architecture, and Vertical Slice Architecture.

Learn

Apply

M7.1 - Architectures Compared

  • Why is the onion/evolutionary architecture beneficial?
  • What potential issues do you see if domain code (inner layer) starts depending upon adapters (outer layers)?
  • What's the benefit of organizing code into vertical slices?
  • How does adding a new feature compare between code organized horizontally (by onion layer) or vertically (by feature)?

M7.2 - Code Architecture of /core

  • Review the code architecture of core/src/modules/item/*. Do you think it's modular, adaptable, and flexible? Why or why not?
  • Review the code architecture of core/src/modules/album/*. How does it compare?

M7.3 - Refactor Album

  • Refactor core/src/modules/album/* to follow code architecture best practices.
  • Use core/src/modules/item/* as a guide.

M7.4 - DB Refactor

Users cannot get enough of your new album feature. The load on the Aurora PostgreSQL cluster is too great.

  • Refactor the persistence of your album entities to DynamoDB.
  • Did isolating the code interacting with the DB in a repository file simplify refactoring to DynamoDB?

Thank you for completing the Green Boost Learn Modules. Congrats! 🎉