Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/keller-michael/value_objects

🔒 examples of value objects (and immutability)
https://github.com/keller-michael/value_objects

abap example immutability immutable immutable-objects learning-by-doing value-object

Last synced: 13 days ago
JSON representation

🔒 examples of value objects (and immutability)

Awesome Lists containing this project

README

        

# :lock: Value Objects

Here's the explanation of value objects from [Wikipedia](https://en.wikipedia.org/wiki/Value_object):

_"In computer science, a value object is a small object that represents a simple entity whose equality is not based on identity:
i.e. two value objects are equal when they have the same value, not necessarily being the same object."_

A very interesting aspect of value objects is their immutability - they are [immutable objects](https://en.wikipedia.org/wiki/Immutable_object).

As Wikipedia says:
_"In object-oriented and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created."_

That means they have their final state after creation. A more than interesting concept for your software design. Therefore I wrote two examples in ABAP, inspired by the book "Clean ABAP".