Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce value object interface / abstract #4

Open
adenhertog opened this issue Apr 20, 2019 · 0 comments
Open

Introduce value object interface / abstract #4

adenhertog opened this issue Apr 20, 2019 · 0 comments
Labels
good first issue Good for newcomers

Comments

@adenhertog
Copy link
Contributor

Create a new base class (ie; ValueObject<PropertyType>) that can be inherited to create a value object concrete definition.

Value objects are a core concept of DDD and represent things that are identified by their value rather than their hash/id/reference etc. See: https://martinfowler.com/bliki/ValueObject.html

There're already some examples on the web on this practice in typescript (eg https://khalilstemmler.com/articles/typescript-value-object/) that can be used. This task can be used to create a similar base and exposed in ddd.

Side note: operator overloading provides a cleaner way to do this in other languages, but that doesn't appear to be coming to java/typescript: microsoft/TypeScript#6936

@adenhertog adenhertog added the good first issue Good for newcomers label Apr 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant