Re:

Jörgen Andersson <[email protected]>
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <CAFp=OHmA2E5Xiy66FkBm5nGMC_VJCH8s=hiqsuP_T=7NaOhp6Q@mail.gmail.com>
Hi,

IMO that is the simplest form of Value Objects and as such really useful as
a "place of gravity" to attract future functionality such as validation. I
tend to use them a lot.
However, at least when developing in Java there is a trade-of due to the
boiler-plate code involved in implementing null-checks in constructor,
equals- and hashcode-methods. Those needs to be in place, otherwise these
domain object cause more problems than the solve. So, due to that I make
some trade-off and opts for a simple primitive in cases where I think an
extra object doesn't add to the clarity of the model.

Jörgen
Den 12 apr 2013 16:35 skrev "Fabrício Cabral" <[email protected]>:

> **
>
>
> Hi everybody!
>
> What do you think about usage of tiny types as part of your
> domain model? Do you agree or disagree? What kind of benefits it
> put into your system's model?
>
> Some links about this subject:
>
> http://darrenhobbs.com/2007/04/11/tiny-types/
> http://martinfowler.com/ieeeSoftware/whenType.pdf
>
> Thanks for your attention!
>
> --
> --fx
>  
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.