big picture • Design with bigger picture in mind • Interface rather than implementation • A conceptual model • A plan • A blueprint • System, Subsystem, interactions and interfaces • Mindset • The system as a whole • Everything, Everything, and Everything Source: Software Architecture for Developers Vol.1
of structures needed to reason about the system, which comprise software elements, relations among them, and properties of both. Software Architecture in Practice, 3rd Edition
message • Decoupling objects from each other • Message Passing involves name of object, name of method(message) and information to be send • Care about contract, don’t care about implementation https://unsplash.com/photos/fN603qcEA7g
within objects • Encapsulating state • State changes are controlled at a local • Not command • No direct referencing of internal state https://unsplash.com/photos/DRzYMtae-vA
same layer can live together in the same module, whereas classes that relate to different layers must be separated by at least a module boundary Adaptive Code 2nd Edition, Gary McLean Hall User Interface Data Access Business Logic
the same bounded context can live together in the same module, whereas classes that relate to different bounded contexts must be separated by at least a module boundary. Adaptive Code 2nd Edition, Gary McLean Hall
need to ensure our services are loosely coupled. • We need to be able to change one service without having to change anythings else. https://unsplash.com/photos/9cCeS9Sg6nU Source: Monolith to Microservices, Sam Newman
Postconditions can’t be weakened in a subtype • Invariant of supertype must be preserved in a subtype • Shouldn’t allow state change that your super type disallowed https://unsplash.com/photos/pwpVGQ-A5qI
these 3. Identify derivations with the variations of the commonalities 4. See how the commonalities related to each other Source: Design Patterns Explained, 2nd Edition
- High-level modules should not depend on low-level modules. Bot should depend on abstractions. - Abstractions should not depend upon details. Details should depend upon abstractions Dependency Inversion Principle
- High-level modules should not depend on low-level modules. Bot should depend on abstractions. - Abstractions should not depend upon details. Details should depend upon abstractions Dependency Inversion Principle class or object
Independent of UI • Independent of Database • Independent of any external agency https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html
anything at all about something in an outer circle The name of something declared in an outer circle must not be mentioned by the code in an inner circle
Test • Test Smell, Good design and Testability • Test Coupling between production code? • Don’t Test me, please. Why? • New Line Pattern • More Specific • Strict with behaviors, not structure of elements • Test Double • London school and Classical https://unsplash.com/photos/ilSnKT1IMxE
leaks across tests - Leak implementation detail - Coupling with Test only - Difficult to replace with Test Double? - Non-deterministic - God Class with God Test