Sagewire Logo

Programming to interfaces with beans?

2 Message(s) by 2 Author(s) originally posted in java programming


From: l-EE Date:   Tuesday, April 17, 2007
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...


From: Edward Diener Date:   Tuesday, April 24, 2007
wrote in message:
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.



Next Message: this is wha i'm working on: any help???


Blogs related to Programming to interfaces with beans?

www : bugs
This is a symptom of long page names... one page in this Space is "Jack hated eating green beans. He thought green beans were the worst food in the world. He didn't know why anyone would want to eat them. There they sat in his plate. ...

Secrets of lightweight development success, Part 2: How to lighten ...
Instead of XML, Pico uses Java code to register beans in the container. Like Spring, Pico also supports setter injection, but the emphasis is strongly on constructors. Pico doesn't have nearly the amount of support that Spring has. ...

comp.lang.java.{help,programmer} - what they're for (mini-FAQ 2006 ...
An unmoderated group for discussion of Java as a programming language. Specific example topics may include: o types, classes, interfaces, and other language concepts o the syntax and grammar of Java o threaded programming in Java ...

Java/J2ee Interview Companion
TERM DESCRIPTION ACID Atomicity, Consistency, Isolation, Duration. aka Also known as. AOP Aspect Oriented Progamming API Application Program Interface AWT Abstract Window Toolkit BLOB Binary Large OBject BMP Bean Managed Persistence ...

Property Support - What Is The Use Case
Java should redefine a "bean direction", after all beans are about meta data and so annotations are a perfect fit here. Sun should write a single JavaBeans spec that would cover all platforms and unify the use of the word "bean". ...

Guice vs. Spring JavaConfig: A comparison of DI styles
This annotation tells Spring JavaConfig that the bean configured in the method is actually AOP advice that implements one of Spring's advice interfaces (such as MethodBeforeAdvice or even AOP Alliance's MethodInterceptor). ...


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional