Preface

Welcome to this book on Domain-driven design with Golang!

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 contexts, Ubiquitous Language, aggregates, and more. The latter half of this book deals with the real-world implementation of Domain-driven design patterns, and teaches you to build two systems whilst 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.

Who this book is for

This book is intended for intermediate Go developers who are looking to take their enterprise skills to the next level, however, I really hope I have made it accessible enough that beginners can follow along too.

If you have never written Go before, but have some familiarity with DDD, I hope this book will help you use your expertise to write Domain-driven Go in an idiomatic way.

Finally, if you are an expert in DDD and in Golang, I hope this book serves as a great reference that you can pick up from time to time when you can’t quite remember something.

What this book covers

Chapter 1, A Brief History of Domain-Driven Design helps you learn about the origins of DDD – no Golang in this chapter!

Chapter 2, Understanding Domains, Ubiquitous Language, and Bounded Contexts teaches you these core domain-driven topics.

Chapter 3, Entities, Value Objects, and Aggregates will help you learn a few more DDD topics.

Chapter 4, Exploring Factories, Repositories, and Services is the final chapter of Part 1, and sees us learn three more DDD patterns that will help cement our understanding.

Chapter 5, Applying DDD to a Monolithic Application teaches how we can apply domain-driven design to both an existing monolithic application, but also to a new one we will build together.

Chapter 6, Building a Microservice using DDD shows how to build a microservice using DDD that is resilient to failure.

Chapter 7, DDD for Distributed Systems takes you through how DDD can be applied to entire distributed systems as well as covering topics such as message queues at a foundational level.

Chapter 8, TDD, BDD and BDD is a bonus chapter that covers how test-driven development, behaviour-driven development, and domain-driven development can be complimentary patterns.

To get the most out of this book

Software/hardware covered in the book

Operating system requirements

Go 1.19.3 or above

Windows, macOS, or Linux

VS Code or Goland

Docker

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Domain-Driven-Design-with-GoLang. If there’s an update to the code, it will be updated in the GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://packt.link/lXo4T.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “Firstly, we will define a Point in the following code block.”

A block of code is set as follows:

=== RUN Test_Point
value_objects_test.go:13: a and b were not equal
--- FAIL: Test_Point (0.00s)

Tips or important notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at [email protected] and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you’ve read Domain-Driven Design With Golang, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.

Download a free PDF copy of this book

Thanks for purchasing this book!

Do you like to read on the go but are unable to carry your print books everywhere?

Is your eBook purchase not compatible with the device of your choice?

Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.

Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.

The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily

Follow these simple steps to get the benefits:

  1. Scan the QR code or visit the link below

https://packt.link/free-ebook/9781804613450

  1. Submit your proof of purchase
  2. That’s it! We’ll send your free PDF and other benefits to your email directly
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.124.40