Re: RE: How to generally decide between FACTORY and constructor?

Szymon Pobiega <[email protected]>
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <CAEPUun821pkhBF41R0zAkuUEFRf5z2Y+_Df=0_4+PDJ58tgGWw@mail.gmail.com>
Personally I haven't seen a case where you would need a factory or factory
method for AR or Entity. Regarding VOs, factories and factory methods
allows to better capture the language e.g. instead of var er = new
ExchangeRate(x, y) i would use var er = ExchangeRate.Between(x,y) or
something like this.

Szymon


2014-02-14 19:56 GMT+01:00 <[email protected]>:

>
>
> There's a choice between factory method, static class factory method, an
> explicit factory instance, abstract factory, ... choose wisely.
>  
>
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.