Re:

Edno Silva <[email protected]>
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <CAAsXb-xOHwaX6aNhmoZbv=V+SarP-nKe=Yy58Ct8fck72P4uHg@mail.gmail.com>
We use a lot of Tiny Types in my Company. We have PhoneNumber, ZipCode,
EmailAddress and so on.


2013/4/12 Dennis Traub <[email protected]>

> **
>
>
> Hi Fabricio,
>
> I think that's better than using too many primitives in your domain model,
> which sometimes is also refered to as "primitive obsession".
>
> Using custom types even for simple values makes them much more explicit.
> It helps enforce invariants: e.g. an email type could validate itself,
> using a string instead would need something external. It also makes code
> much more redable.
>
> Best
> Dennis
>
>
> --
> Dennis Traub
> Software Development Consultancy
>
> Am Bogen 7
> 33178 Borchen
>
> Phone:  05293/73942-73
> Fax:    05293/73942-74
> Mobile: 0170/2842385
> Mail:   [email protected] <[email protected]>
>
>
> On Fri, Apr 12, 2013 at 4:35 PM, Fabrício Cabral <[email protected]>wrote:
>
>> **
>>
>>
>> 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
>>
>>
>  
>



-- 
Sem mais,
Edno.
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.