Description
In this course, you will learn :
- How to design software modules and full applications in a clean and maintainable manner, as well as how to advocate for a specific technique based on your application and constraints.
- You will have a better understanding of how to implement software architecture by the end of this course, which is a critical skill for any senior developer.
Syllabus :
1. Before We Begin
- Introduction
- The Sample Application
2. What's Wrong with Layers?
- Promotes Database-Driven Design
- Prone to Shortcuts
- Grows Hard to Test
- Hides the Use Cases
- Makes Parallel Work Difficult
3. Inverting Dependencies
- The Single Responsibility Principle
- A Table about Side Effects
- The Dependency Inversion Principle
- Clean Architecture
- Hexagonal Architecture
4. Organizing Code
- Organizing by Layer
- Organizing by Feature
- Architecturally Expressive Package Structure
- The Role of Dependency Injection
5. Implementing a Use Case
- Implementing the Domain Model
- A Use Case in a Nutshell
- Validating Input
- The Power of Constructors
- Different Input Models for Different Use Cases
- Validating Business Rules
- Rich vs. Anemic Domain Model
- Different Output Models for Different Use Cases
- What About Read-Only Use Cases?
6. Implementing a Web Adapter
- Dependency Inversion with a Web Adapter
- Responsibilities of a Web Adapter
- Slicing Controllers
7. Implementing a Persistence Adapter
- Dependency Inversion with a Persistence Adapter
- Responsibilities of a Persistence Adapter
- Slicing Port Interfaces
- Slicing Persistence Adapters
- Example with Spring Data JPA
- Database Transactions
8. Testing Architecture Elements
- The Test Pyramid
- Testing a Domain Entity with Unit Tests
- Testing a Use Case with Unit Tests
- Testing a Web Adapter with Integration Tests
- Testing a Persistence Adapter with Integration Tests
- Testing Main Paths with System Tests
- How Much Testing is Enough?
9. Mapping Between Boundaries
- The "No Mapping" Strategy
- The "Two-Way" Mapping Strategy
- The "Full" Mapping Strategy
- The "One-Way" Mapping Strategy
- When to Use Which Mapping Strategy?
10. Assembling the Application
- Why Even Care About Assembly?
- Assembling via Plain Code
- Assembling via Spring's Classpath Scanning
- Assembling via Spring's Java Config
11. Enforcing Architecture Boundaries
- Boundaries and Dependencies
- Visibility Modifiers
- Post-Compile Checks
- Build Artifacts
12. Taking Shortcuts Consciously
- Why Are Shortcuts Like Broken Windows?
- The Responsibility of Starting Clean
- Sharing Models between Use Cases
- Using Domain Entities as an Input or Output Model
- Skipping Incoming Ports
- Skipping Application Services