>Another aspect is that an
interface usually makes it more complex. If there is
no
> foreseeable need for an interface when
should you use an interface and when shouldn't you?
there
is no hard and fast rule. I guess I am groping after expected design
patterns that use interfaces. Data Access Object (DAO) is definetely
such a pattern. Distributed framworks (EJBHome) is another. You
can get away without using the interfaces, and it is often not "immediately
apparent" that you should use an interface, but experience will eventually tell
you what to do and when. And sometimes, you have to go back and refactor
the code, no matter how good your architecture design is, because "business
needs change all the time". So don't worry -- code what comes naturally,
refactor often, and be happy!
:-)
Greg
____________________________________________________To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm
Be respectful! Clean up your posts before replying
____________________________________________________
