Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
When in Doubt, Create an Interface (coliveira.net)
3 points by coliveira on May 19, 2009 | hide | past | favorite | 1 comment


I am of a contrary opinion, because I am consulting on a project where all of this was done in spades. Abstract class, interface, concrete class, spring runtime injection, and occasionally a factory, all for a single concrete implementation of a class.

I think all of this should be done iteratively. Do the concrete class. If it turns out you need multiple implementations or subclasses, then go ahead with all the complexity. Too much of "best practices" leads to overdesign and implementation and maintenance costs.




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

Search: