Hacker News new | past | comments | ask | show | jobs | submit login

Using 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?




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.


If 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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: