anonymous wrote : Being dependent on the implementation in one place (at construction) is
better than being dependent on the implementation in N places (each place the class is
used), so it's an improvement.
I agree, but that is what IOC is all about, it class doesnt have to worry about how a
pluggable component is constructed.
anonymous wrote : 1) Makes testing a whole lot easier since can easily create mock / fake
implementions i agree
anonymous wrote : 2) Makes code easier to read / understand
again i agree
anonymous wrote : 3) If user wants to create their own implementation of the interface
they can. If it's a concrete class they'd have to extend that class. That may not
be possible or desirable.
defo.
I'm not against using interfaces where we can, just making a point. We have to make
sure that we dont just introduce interfaces that are dragged out of the implementation,
the abstraction still needs to make sense.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132492#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...