Implementing DDD, CQRS and Event Sourcing in Node.js
Implementing DDD, CQRS and Event Sourcing in Node.js (Book & Code)
$29.99
Minimum price
$34.99
Suggested price
Implementing DDD, CQRS and Event Sourcing in Node.js

This book is 80% complete

Last updated on 2020-05-29

About the Book

Note: The book is 80% complete. The current version is missing Chapter 12-14 (Event Sourcing, Remote communication, User Interface). While there is no fixed release date, the first version of the book should be 100% complete by the end of June 2020.

Abstract

This book explains and illustrates how to implement Domain-Driven Design, Command Query Responsibility Segregation and Event Sourcing in Node.js. The reader is taught to build software that is problem centered, well designed, event-based, reactive and scalable. Domain-Driven Design (DDD) is a methodology that focuses on the actual problem to solve and its involved knowledge areas. Command Query Responsibility Segregation (CQRS) promotes to separate a software into a write side and a read side. Event Sourcing is an architectural pattern where state is represented as a series of immutable events. All concepts are described in theory and put into practice with standalone examples and a fully functional sample application. This is done without third party technologies or frameworks. The code is written in JavaScript and uses Node.js as runtime. This book includes a source code bundle with all standalone examples and the sample application implementation. The bundle contains more than 5000 lines of JS code.

Target audience

The target reader is experienced with Node.js and wants to implement DDD, CQRS and Event Sourcing without deep-diving into theory. Naturally, this also implies advanced skills in JavaScript. The second potential reader has theoretical knowledge about the mentioned concepts, but struggles with translating them into actual code. For such a person, it might be required to build up the respective JavaScript and Node.js knowledge. Apart from the first four chapters, which cover the more conceptual parts, this book heavily focuses on code and implementation. Also, some of the covered topics are not explained to their full extent, but rather as far as needed. As a consequence, the book is not recommended to be used as a reference.

  • Share this book

  • Feedback

    You must own a copy of this Book to access the forums

    Email the Author(s)

About the Author

Alex Lawrence
Alex Lawrence

I am a software developer with knowledge and experience in architecture, automation, backend, frontend, lecturing, operations, technical leadership and testing. Since 2014, my focus lies on full stack web application development with JavaScript as language and Node.js as backend runtime. As part of a software architecture, I apply and implement CQRS and/or Event Sourcing wherever it makes sense. For the frontend, I work with many different libraries and tools, including the obligatory use of HTML and (S)CSS. Most recently, I started to work with React and redux. In parallel, I am learning more about the theory and concepts of Functional Programming. Since a few years, I am a strong supporter for Free/Libre Open Source Software.

Packages

Book & Code

Includes:

  • extras
    Code bundle (Release 2020-05-29)
  • English

  • PDF

  • EPUB

  • MOBI

  • WEB

$29.99
Minimum price
$34.99
Suggested price
Book & Code - 5 copies (20% discount)

This package is meant for 5 individual readers, such as a team.

Includes:

  • extras
    Code bundle (Release 2020-05-29)
  • English

  • PDF

  • EPUB

  • MOBI

  • WEB

$119.99
Minimum price
$139.99
Suggested price
Book & Code - 10 copies (30% discount)

This book is meant for 10 individual readers.

Includes:

  • extras
    Code bundle (Release 2020-05-29)
  • English

  • PDF

  • EPUB

  • MOBI

  • WEB

$209.99
Minimum price
$244.99
Suggested price

Table of Contents

  • Preface
    • Current status
    • About the author
    • Target audience
    • Content and structure
    • Formatting and highlighting
    • Programming paradigms
    • Code examples
  • Chapter 1: Domain
    • Technological and business domains
    • Domain Experts
    • Subdomains and their types
    • Identification of Subdomains
    • Sample application: Domains
  • Chapter 2: Domain Model
    • Tangibility
    • Difference to expert knowledge
    • Model creation
    • Representation possibilities
    • Ubiquitous Language
    • Sample application: Domain Model
  • Chapter 3: Bounded Context
    • Model and context size
    • Relation to subdomains
    • Contexts and language
    • Technological boundaries
    • Sample application: Bounded Contexts
  • Chapter 4: Common architectural patterns
    • Parts of a software
    • Layered Architecture
    • Onion Architecture
    • Approach used in this book
    • Sample application: Software architecture
  • Chapter 5: Useful code qualities
    • Model binding
    • Refactoring
    • Readability
    • Behavior and state
    • Focus and responsibilities
    • Command-Query-Separation
  • Chapter 6: Value Objects, Entities and Services
    • Value Objects
    • Entities
    • Domain Services
    • Invariants
    • Sample application: Model implementation
  • Chapter 7: Domain Events
    • Event-driven Architecture
    • Naming conventions
    • Structure and content
    • Distribution and processing
    • Advanced distribution scenarios
    • Sample application: Context integration
  • Chapter 8: Aggregates
    • Transactions
    • Structure and handling
    • Concurrency
    • Design considerations
    • Eventual Consistency
    • Sample application: Aggregates and consistency
  • Chapter 9: Repositories
    • Emphasis on the model
    • Design and implementation
    • Optimistic Concurrency
    • Interaction with Domain Events
    • Sample application: Repositories and event publishing
  • Chapter 10: Application Services
    • Design and implementation
    • Different service scenarios
    • Transactions and Processes
    • Cross-cutting concerns
    • Authentication and Authorization
    • Sample application: Application Services
  • Chapter 11: Command Query Responsibility Segregation
    • Architectural overview
    • Write and Read Model
    • Read Model synchronization
    • Commands and Queries
    • Command and Query Handlers
    • Sample application: CQRS
  • Chapter 12: Event Sourcing
  • Chapter 13: Remote communication
  • Chapter 14: User interface
  • Bibliography

Authors have earned$8,948,210writing, publishing and selling on Leanpub,
earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.

Learn more about writing on Leanpub

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub