<p><span>Gain insight into how Hexagonal Architecture can help to increase maintainability.</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Explore ways to make your software flexible, extensible, and adaptable</span></span></li><li><span><span>Learn new concepts that you can easily
Get Your Hands Dirty on Clean Architecture
β Scribed by Tom Hombergs
- Publisher
- Leanpub
- Year
- 2019
- Tongue
- English
- Leaves
- 108
- Series
- 1
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
A good software architecture should keep the cost of development low over the complete lifetime of an application.
This book discusses how the Hexagonal Architecture style tries to fulfill this goal and translates the concepts into actual code to provide inspiration for software developers.
β¦ Table of Contents
Table of Contents
Preface
What Is the Goal of This Book?
Who Should Read This Book?
The Example Application
A Note on Code Examples
Feedback
1. Whatβs Wrong With Layers?
It Promotes Database-Driven Design
Itβs Prone to Shortcuts
It Grows Hard to Test
It Hides the Use Cases
It Makes Parallel Work Difficult
How Does This Help Me Build Maintainable Software?
2. Inverting Dependencies
The Single Responsibility Principle
A Tale about Side Effects
The Dependency Inversion Principle
Clean Architecture
Hexagonal Architecture
How Does This Help Me Build Maintainable Software?
3. Organizing Code
Organizing By Layer
Organizing By Feature
An Architecturally Expressive Package Structure
The Role of Dependency Injection
How Does This Help Me Build Maintainable Software?
4. 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?
How Does This Help Me Build Maintainable Software?
5. Implementing a Web Adapter
Dependency Inversion
Responsibilities of a Web Adapter
Slicing Controllers
How Does This Help Me Build Maintainable Software?
6. Implementing a Persistence Adapter
Dependency Inversion
Responsibilities of a Persistence Adapter
Slicing Port Interfaces
Slicing Persistence Adapters
Example with Spring Data JPA
What about Database Transactions?
How Does This Help Me Build Maintainable Software?
7. 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?
How Does This Help Me Build Maintainable Software?
8. 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?
How Does This Help Me Build Maintainable Software?
9. Assembling the Application
Why Even Care About Assembly?
Assembling via Plain Code
Assembling via Springβs Classpath Scanning
Assembling via Springβs Java Config
How Does This Help Me Build Maintainable Software?
10. Enforcing Architecture Boundaries
Boundaries and Dependencies
Visibility Modifiers
Post-Compile Checks
Build Artifacts
How Does This Help Me Build Maintainable Software?
11. Taking Shortcuts Consciously
Why Shortcuts Are Like Broken Windows
The Responsibility of Starting Clean
Sharing Models between Use Cases
Using Domain Entities as Input or Output Model
Skipping Incoming Ports
Skipping Application Services
How Does This Help Me Build Maintainable Software?
12. Deciding on an Architecture Style
The Domain is King
Experience is Queen
It Depends
Changelog
Notes
π SIMILAR VOLUMES
<p><span>Gain insight into how Hexagonal Architecture can help to increase maintainability.</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Explore ways to make your software flexible, extensible, and adaptable</span></span></li><li><span><span>Learn new concepts that you can easily
<div>Spainβs transition from the Franco dictatorship to a democratic state has been widely regarded as exemplary. However, this powerfully written book reveals that as Spainβs first post-transition government attempted to destroy the Basque separatist group ETA, it adopted the very policies of indis
<p>Dr. Ian is answering Shredder Nation's call for a short-term, fast-acting cleanse that will help you reset and power through to your new weight loss goal!<br><i>The SHRED Power Cleanse</i> takes the classic detox plan to a new level. You won't find any fiberless, anemic juices on this regimen! Dr
<span>Creating delicious meals doesn't mean you have to be an expert chef! Sometimes being creative is as important as being knowledgeable! In the kitchen, though, what matters more than taste is how healthy our food is. Think of the benefits you can get from food apart from sating your hunger. Woul
<p>What Does it Take to Have a Great Baseball Career?</p><p>You daydream about one day seeing your face on a baseball card.</p><p>You live for pressure and the green grass beneath your cleats.</p><p>But as your career progresses, the game gets harder.</p><p>- You slump and struggle.<br />- You get i