5 ms·
It's not difficult, it's tedious and ugly.
by oriolid 6y ago
It's not difficult, it's tedious and ugly.
- watwut 6y agoUsing factory someone else made is tedious? In what way it is more tedious then using constructor? It is just that thing ... there are patterns that are tedious. The object mapping before hibernate was extremely tedious for example. But factory pattern ... seriously?
- oriolid 6y agoI 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.