Re: Programming to interfaces with beans?
- From: Edward Diener <diener896092_no_spam_here@xxxxxxxxxxxxx>
- Date: Tue, 24 Apr 2007 20:13:16 -0400
l-EE wrote:
If I'm writting a bean - and I mean just a plain old Java Bean not an EJB or anything like that - is there any merit to seperating the interface out of the class? I do this with pretty much every other kind of class I write but Beans...
Just like any class, if you separate out the interface you can have other developers implement the interface in order to extend your JavaBean ideas. Of course you might also want to provide an empty implementation of the interface as a convenience class of those who just want to extend the interface with just a subset of changes from the default.
Another advantage of separating out an interface, as a common idea, is that you can have collections of the interface quite easily, and this sort of collection will extend to other developers building JavaBeans from your interface.
.
- References:
- Programming to interfaces with beans?
- From: l-EE
- Programming to interfaces with beans?
- Prev by Date: Re: Java Web Start
- Previous by thread: Programming to interfaces with beans?
- Next by thread: why does Sun JVM have a hard max mem limit of 93meg on 2gig pc with no setting done
- Index(es):
Relevant Pages
|