Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying JavaScript Domain-Driven Design
  • Table Of Contents Toc
JavaScript Domain-Driven Design

JavaScript Domain-Driven Design

By : Philipp Fehre
3 (2)
close
close
JavaScript Domain-Driven Design

JavaScript Domain-Driven Design

3 (2)
By: Philipp Fehre

Overview of this book

If you are an experienced JavaScript developer who wants to improve the design of his or her applications, or find yourself in a situation to implement an application in an unfamiliar domain, this book is for you. Prior knowledge of JavaScript is required and prior experience with Node.js will also be helpful.
Table of Contents (10 chapters)
close
close
9
Index

Objects defined as entities


As we have seen, having objects primarily defined by their properties can be really useful and helps us deal with a lot of scenarios when designing a system. So, we often see that certain objects have a different lifecycle attached to them. In such a case, the object is defined by its ID, and in domain-driven design terms, it is considered an entity. This is a contrast to value objects that are defined by their properties, and are considered to be equal when their properties match. An entity is only ever equal if it has the same ID, even if all the properties match; as long as the ID is different, the entity is not the same.

Entity objects manage the lifecycle inside the application; this can either be the lifecycle spread across the application as a whole, but it might well be a transaction happening in the system. In the dungeon, we are dealing with a lot OF cases where we don't really care about the lifecycle of an object itself, but rather WE care about its...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
JavaScript Domain-Driven Design
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon