<p><span>Understand the concept of Domain-driven design and build two DDD systems from scratch that can be showcased as part of your portfolio</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Explore Domain-driven design as a timeless concept and learn how to apply it with Go</span></
Domain-Driven Design with Golang: Use Golang to create simple, maintainable systems to solve complex business problems
โ Scribed by Matthew Boyle
- Publisher
- Packt Publishing
- Tongue
- English
- Leaves
- 204
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Synopsis
Understand the concept of Domain-driven design and build two DDD systems from scratch that can be showcased as part of your portfolio
Key Features
- Explore Domain-driven design as a timeless concept and learn how to apply it with Go
- Build a domain-driven monolithic application and a microservice from scratch
- Leverage patterns to make systems scalable, resilient, and maintainable
Book Description
Domain-driven design (DDD) is one of the most sought-after skills in the industry. This book provides you with step-by-step explanations of essential concepts and practical examples that will see you introducing DDD in your Go projects in no time. Domain-Driven Design with Golang starts by helping you gain a basic understanding of DDD, and then covers all the important patterns, such as bounded context, ubiquitous language, and aggregates. The latter half of the book deals with the real-world implementation of DDD patterns and teaches you how to build two systems while applying DDD principles, which will be a valuable addition to your portfolio. Finally, you'll find out how to build a microservice, along with learning how DDD-based microservices can be part of a greater distributed system. Although the focus of this book is Golang, by the end of this book you'll be able to confidently use DDD patterns outside of Go and apply them to other languages and even distributed systems.
What you will learn
- Get to grips with domains and the evolution of Domain-driven design
- Work with stakeholders to manage complex business needs
- Gain a clear understanding of bounded context, services, and value objects
- Get up and running with aggregates, factories, repositories, and services
- Find out how to apply DDD to monolithic applications and microservices
- Discover how to implement DDD patterns on distributed systems
- Understand how Test-driven development and Behavior-driven development can work with DDD
Who this book is for
This book is for intermediate-level Go developers who are looking to ensure that they not only write maintainable code, but also deliver great business value. If you have a basic understanding of Go and are interested in learning about Domain-driven design, or you've explored Domain-driven design before but never in the context of Go, then this book will be helpful.
Table of Contents
- A brief history of Domain Driven Design
- Understanding Domains, Ubiquitous Language, and Bounded Contexts
- Aggregates, Entities & Value Objects
- Factories, Repositories & Services
- Applying Domain Driven Design to a monolithic application
- Building a microservice using domain driven design
- Domain Driven Design for distributed systems
- TDD, BDD and DDD
โฆ Table of Contents
Cover
Title Page
Copyright and credits
Contributors
About the reviewers
Table of Contents
Preface
Part 1: Introduction to Domain-Driven Design
Chapter 1: A Brief History of Domain-Driven Design
The world before DDD
So, what are OOD patterns?
Eric Evans and DDD
Three pillars of DDD
Adoption of DDD
When should you use DDD?
Summary
Further reading
Chapter 2: Understanding Domains, Ubiquitous Language, and Bounded Contexts
Technical requirements
Setting the scene
Domains and sub-domains
Ubiquitous language
Benefits of ubiquitous language
Bounded contexts
Open Host Service
Published language
Anti-corruption layer
Summary
Further reading
Chapter 3: Entities, Value Objects, and Aggregates
Technical requirements
Working with entities
Generating good identifiers
A warning when defining entities
A note on object-relational mapping
Working with value objects
How should I decide whether to use an entity or value object?
The aggregate pattern
Discovering aggregates
Designing aggregates
Aggregates beyond a single bounded context
Summary
Further reading
Chapter 4: Exploring Factories, Repositories, and Services
Technical requirements
Introducing the factory pattern
Entity factories
Implementing the repository pattern in Golang
Understanding services
Domain services
Application services
Summary
Part 2: Real -World Domain-Driven Design with Golang
Chapter 5: Applying Domain-Driven Design to a Monolithic Application
Technical requirements
What do we mean when we say monolithic application?
Setting the scene
Getting started with our CoffeeCo system
Implementing our product repository
Adding an infrastructure service for payment handling
Paying with CoffeeBux
Adding store-specific discounts
Extending our service
Summary
Further reading
Chapter 6: Building a Microservice Using DDD
Technical requirements
A friendly warning (again)
What do we mean by microservices?
What are the benefits of microservices?
What are the downsides of microservices?
Should my company adopt microservices?
Setting the scene (again)
Building a recommendation system
Revisiting the anti-corruption layer
Exposing our service via an open host service
Summary
Chapter 7: DDD for Distributed Systems
Technical requirements
What is a distributed system?
CAP theorem and databases
Distributed system patterns
CQRS
EDA
Dealing with failure
Two-phase commit (2PC)
The saga pattern
What is a message bus?
Kafka
RabbitMQ
NATS
Summary
Further reading
Chapter 8: TDD, BDD, and DDD
Technical requirements
TDD
Adding a test
Run the test we just wrote โ it should fail (and we should expect it to)
Write as little code as possible to pass the test
Refactoring
BDD
Summary
Index
Other Books You May Enjoy
๐ SIMILAR VOLUMES
<p><span>Adopt a practical and modern approach to architecting and implementing DDD-inspired solutions to transform abstract business ideas into working software across the entire spectrum of the software development life cycle</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Implemen
<p><span>Adopt a practical and modern approach to architecting and implementing DDD-inspired solutions to transform abstract business ideas into working software across the entire spectrum of the software development life cycle</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Implemen
Elevate Your Development with Effortless and Efficient API Communication Key Features โ Delve into core concepts of gRPC like Protocol Buffers, service definitions, and communication patterns. โ Implement gRPC servers and clients in Golang, and master Protocol Buffers for defining services an
<p><span>Begin building event-driven microservices, including patterns to handle data consistency and resiliency</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Explore the benefits and tradeoffs of event-driven architectures with practical examples and use cases</span></span></li><l
There are some things I don't like.1. UnitOfWork is broken. What happens when someone adds entity to repository, and then removes it before commiting? The code will try to remove not existing objects from database and then it will add it!2. Handling of child objects. For example addresses. In any re