473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Programming to interfaces with beans?

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...
Apr 17 '07 #1
1 2452
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.
Apr 25 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Glen | last post by:
I have a list of beans that I retrieved from a database. These beans are all of the same class. Now I want to display these beans in a struts form so that the user can modify the data in the...
0
by: Cruinne | last post by:
Hello, In a JBoss 3.2.4 server, I have deployed several enterprise javabeans (each as a separate .jar, not in an .ear bundle). These beans are completely self-contained, as they include all...
1
by: milkyway | last post by:
Hello out there, I have seen the docuemntation for the accessing of an array of beans from a .jsp here at: http://struts.apache.org/faqs/indexedprops.html Has anyone acutally done this? I...
0
by: DD | last post by:
Hi Guys! Just would like to share with you my experiense in this matter. I was trying to evaluate how suitable Oracle OLAP for our applications. As probably you did, I have downloaded from OTN...
34
by: Pmb | last post by:
Hi. I'm new to this group. I'm refreshing/learning C++ and am starting to learn Object Oriented Programming (OOP). In discussing this with people I came up short as to what the benefits of OOP are....
5
by: Patrick Kristiansen | last post by:
Hi group! I've been reading Juval Löwys "Programming .NET Components", and I think it is a very good book, giving nice guidelines on how to really exhaust the possibilities of .NET in general. ...
6
by: Ricky W. Hunt | last post by:
It's dawning on my a lot of my problems with VB.NET is I'm still approaching it in the same way I've programmed since the late 70's. I've always been very structured, flow-charted everything, used...
1
by: maya | last post by:
I started a new job recently for which I need to learn both beans and taglibs (at my last job also did JSP but they didn't use beans or taglibs..) reading up on this in oreilly (JSP, 3rd ed.) I...
15
by: Herr von Ribbeck aus Ribbeck im Havelland | last post by:
What kind of coffee do C programmers drink, and why? Me, for breakfast I usually drink green tea, but when programming in C, I drink extra strong Espresso without milk and sugar, except when...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.