Book description
Gain insights into how hexagonal architecture can help you keep the cost of development low throughout an application’s lifespan Purchase of the print or Kindle book includes a free PDF eBook
Key Features
- Explore ways to make your software flexible, extensible, and adaptable
- Learn new concepts that you can easily blend with your software development style
- Develop the mindset for making conscious architectural decisions
Book Description
Building for maintainability is key to keeping development costs low and processes easy. The second edition of Get Your Hands Dirty on Clean Architecture is here to equip you with the essential skills and knowledge to build maintainable software.
With this comprehensive guide, you’ll explore the drawbacks of conventional layered architecture and the advantages of domain-centric styles such as Robert C. Martin's Clean Architecture and Alistair Cockburn's Hexagonal Architecture. Then, you’ll dive into hands-on explanations on how to convert hexagonal architecture into actual code. You'll learn in detail about different mapping strategies between the layers of hexagonal architecture and discover how to assemble the architectural elements into an application. Additionally, you’ll understand how to enforce architecture boundaries, which shortcuts produce what types of technical debt, and how, sometimes, it is a good idea to willingly take on those debts.
By the end of this second edition, you'll be armed with a deep understanding of the hexagonal architecture style and be ready to create maintainable web applications that save money and time.
What you will learn
- Identify potential shortcomings of using a layered architecture
- Apply varied methods to enforce architectural boundaries
- Discover how potential shortcuts can affect the software architecture
- Produce arguments for using different styles of architecture
- Structure your code according to the architecture
- Run various tests to check each element of the architecture
Who this book is for
This book is for new as well as seasoned developers seeking to learn and deepen their understanding of hexagonal architecture. Some experience with web development is necessary. The code examples are in Java, but if you are proficient in reading object-oriented code, you’ll understand the examples seamlessly. Instances of detailed Java and framework explanations are fewer, but thorough.
Table of contents
- Preface
- Chapter 1
- What's Wrong with Layers?
- Chapter 2
- Inverting Dependencies
- Chapter 3
- Organizing Code
- Chapter 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 versus Anemic Domain Model
- Different Output Models for Different Use Cases
- What about Read-Only Use Cases?
- How Does This Help Me Build Maintainable Software?
- Chapter 5
- Implementing a Web Adapter
- Chapter 6
- Implementing a Persistence Adapter
- Chapter 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?
- Chapter 8
- Mapping Between Boundaries
- Chapter 9
- Assembling the Application
- Chapter 10
- Enforcing Architecture Boundaries
- Chapter 11
- Taking Shortcuts Consciously
- Chapter 12
- Deciding on an Architecture Style
Product information
- Title: Get Your Hands Dirty on Clean Architecture
- Author(s):
- Release date: September 2019
- Publisher(s): Packt Publishing
- ISBN: 9781839211966
You might also like
book
Clean Architecture: A Craftsman's Guide to Software Structure and Design
Building upon the success of best-sellers The Clean Coder and Clean Code, legendary software craftsman Robert …
video
Design Patterns in the Real World, an Analysis-Based Approach
Alan Holub takes coders deep into the reality of Gang-of-Four design patterns, those reusable guides to …
video
Clean Code Fundamentals
Expanded Edition (Updated February 2022) Updated with episodes from SOLID Principles and Advanced TDD in the …
book
Head First Software Architecture
What will you learn from this book? If you're a software developer looking for a quick …