Use of beans in my design possible?

M

mike

Hi,

I am considering using java beans ( and it was a while since I used
it) to store/update data.
I use a series of commands to access a 3:rd party system. I parse the
data ( output from command) and generate an Activity object with
getters/setters.

I am considering using beans since I remember that updates/new objects
can be done easier using beans. Is that correct?

How will beans be updated if new data for an object is generated when
commands are executed?

What do I have to do in order to use beans? ( I am using jdk 1.5 ....
yes I know it is old ).

br,

//mike
 
M

markspace

What do I have to do in order to use beans? ( I am using jdk 1.5 ....
yes I know it is old ).


There are at least 3 to 4 different types of beans floating around out
there. You're going to have to do some research into what it is you
want to accomplish exactly. There's no "bean that makes updates easy
and works with third party products." It's all how you use them.

Here are some beany tutorials.

<http://download.oracle.com/javase/tutorial/javabeans/>

<http://download.oracle.com/javaee/5/tutorial/doc/bnblt.html>

<http://netbeans.org/kb/docs/java/gui-binding.html>
 
L

Lew

mike said:
I am considering using java [sic] beans ( and it was a while since I used
it) to store/update data.

"Bean" just means "class that adheres to certain conventions".
I use a series of commands to access a 3:rd party system. I parse the
data ( output from command) and generate an Activity object with
getters/setters.

It's already a bean!
I am considering using beans since I remember that updates/new objects
can be done easier using beans. Is that correct?
No.

How will beans be updated if new data for an object is generated when
commands are executed?

By a caller setting properties of the bean.
What do I have to do in order to use beans? ( I am using jdk 1.5 ....
yes I know it is old ).

Have your classes adhere to the JavaBean conventions, at minimum exposing properties strictly through accessors ("getters") and mutators ("setters").

JDK 5 is old but modern in its sensibilities. If I may ask, why aren't you using Java 6?
 
A

Arne Vajhøj

I am considering using java beans ( and it was a while since I used
it) to store/update data.
I use a series of commands to access a 3:rd party system. I parse the
data ( output from command) and generate an Activity object with
getters/setters.

I am considering using beans since I remember that updates/new objects
can be done easier using beans. Is that correct?

How will beans be updated if new data for an object is generated when
commands are executed?

What do I have to do in order to use beans? ( I am using jdk 1.5 ....
yes I know it is old ).

Most likely your data classes are already so close to beans
that making them beans will have no impact on your code
at all.

That is assuming "java beans" not "enterprise java beans" or
"managed beans".

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top