Skip to content

Instantly share code, notes, and snippets.

@gregoryyoung
Last active March 9, 2023 14:19
Show Gist options
  • Save gregoryyoung/3ca79b4f9ce02df81916d01b2d96bdd6 to your computer and use it in GitHub Desktop.
Save gregoryyoung/3ca79b4f9ce02df81916d01b2d96bdd6 to your computer and use it in GitHub Desktop.
Who came up with the concept of value objects and why are they used?
The concept of value objects originated in the field of object-oriented programming, and it is generally attributed to Eric Evans, who introduced the concept in his book "Domain-Driven Design: Tackling Complexity in the Heart of Software" published in 2003.
Value objects are used to represent immutable values or concepts in a domain model. They are objects that have no identity and are defined entirely by their attributes. In other words, two value objects with the same attributes are considered to be the same, regardless of their individual identities.
Value objects are useful because they provide a way to encapsulate complex data and behavior into a single object. They help to reduce the complexity of domain models by providing a way to represent complex concepts in a simple, self-contained manner. Additionally, value objects are often used to help enforce business rules and constraints, as they can be designed to only allow valid values to be assigned to their attributes.
In general, value objects are a powerful tool for creating robust and maintainable domain models, as they help to ensure that the code is easy to understand, modify, and extend over time.
What is the history of value objects who was involved with the idea?
The concept of value objects has its roots in object-oriented programming (OOP) and has been around for several decades. However, the term "value object" and its specific definition were introduced in Eric Evans' book "Domain-Driven Design: Tackling Complexity in the Heart of Software" published in 2003.
Eric Evans is widely credited with popularizing the concept of value objects, although other programming experts have also contributed to its development over the years. For example, Martin Fowler, a well-known software engineer and author, has written extensively on the topic of domain modeling and has discussed the use of value objects in his work.
In addition, the ideas behind value objects can be traced back to other programming paradigms, such as functional programming, where immutable data structures are used to represent values.
Since the concept of value objects was introduced, it has become a widely accepted and commonly used technique in domain-driven design and OOP in general. Today, many programming languages and frameworks provide built-in support for creating and working with value objects, including Java, C#, and Ruby on Rails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment