3 ms·
I disagree. Constructor: > Foo f = new Foo(a, b, c); Factory: > FooFactory ff = new FooFactory(); > ff.setA(a); > ff.setB(b); > ff.setC(c); > f = ff.create()
by oriolid 6y ago
I disagree. Constructor:
> Foo f = new Foo(a, b, c);
Factory:
> FooFactory ff = new FooFactory();
> ff.setA(a);
> ff.setB(b);
> ff.setC(c);
> f = ff.create();
...or the same in XML. Fluent APIs turn it into oneliner, but it's still good only for adding hours to your bill.
- watwut 6y agoIf this "adding hours to your bill" you need to speed up. And learn IDE of learn type or just watcy other programmers a bit. Cause no one I know spends hours on this. Second, factory methods today have arguments combinations too. fd.create(a, b, c) is the most normal thing in the world. Seriously, this is ridiculous.