 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ben Guest
|
Posted: Sat Dec 02, 2006 1:21 am Post subject: Interfaces are they always needed - best practise debate? |
|
|
Hi,
I'd like your views on the following to help settle an in team debate.
Common best design practise is to interface business and data access
objects.
I work in a team where this is being done for non ejb based projects
that use struts and spring, but the design and implementations don't
(currently) require any other implementations of these objects. We
follow an XP methodology.
So the question is - for these approximately 30 classes in one non ejb
project, are interfaces necessary for these singular implementations?
My personal opinion "thinking out of the box" is that I believe they are
not, since it goes against XP methodology, that it is following the
interface design paradigm blindly, it increases complexity, it increases
the required maintenance and can even reduce performance (very
debateable last point I know). IMHO Interfaces should be implemented
when the design specifically calls for it, e.g. for Spring beans that
can have multiple implementations.
I am however in the minority for thinking this in my team.
Thanks,
Ben |
|
| Back to top |
|
 |
William Guest
|
Posted: Thu Jan 04, 2007 8:04 am Post subject: Re: Interfaces are they always needed - best practise debate |
|
|
i think to use or not depends on the scale of your project.
in my project, there are 170 classes, and we have to use
interfaces to take use of AOP of spring.
On Sat, 02 Dec 2006 03:21:48 +0800, Ben <na (AT) na (DOT) com> wrote:
| Quote: | Hi,
I'd like your views on the following to help settle an in team debate.
Common best design practise is to interface business and data access
objects.
I work in a team where this is being done for non ejb based projects
that use struts and spring, but the design and implementations don't
(currently) require any other implementations of these objects. We
follow an XP methodology.
So the question is - for these approximately 30 classes in one non ejb
project, are interfaces necessary for these singular implementations?
My personal opinion "thinking out of the box" is that I believe they are
not, since it goes against XP methodology, that it is following the
interface design paradigm blindly, it increases complexity, it increases
the required maintenance and can even reduce performance (very
debateable last point I know). IMHO Interfaces should be implemented
when the design specifically calls for it, e.g. for Spring beans that
can have multiple implementations.
I am however in the minority for thinking this in my team.
Thanks,
Ben |
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|