adapting a set of API's to be an invisibe bean - ideas or examples

Hi,

I have a set of API's, (typically called in a particular sequence) which is used to carry on a text based dialog.

Example of some of the API would be something like so:
start(...)
askQuestion(...)
answerQuestion(...)
stop(...)
etc...

To get an idea of the program, think of it as just a command line app that allows a user to be asked something, then able to answer it, over and over again until they are done. The app may eventually be used in server environments with JSP, able to handle multiple different conversations simultaneously.

I am new to the concept of beans. The challenge is to be able to adapt such an interface to use getter and setter methods and properties.

Anyone out there have any suggestions or know of any great tutorials on the web for this sort of thing?

TheDownsizerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
0
TheDownsizerAuthor Commented:
I read that tutorial before. It makes things clear for GUI beans, which are relatively simple. It doesn't address invisible beans, nor applications with state-like behavior.
0
CEHJCommented:
Actually non-gui beans are the same, but simpler. As for state, if you mean by that persistence, there's a chapter devoted to that, but you may wish to have another entity implement your persistence in a web application
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

TheDownsizerAuthor Commented:
I wish that were true, but in my case they aren't simpler (or doesn't seem to be) or I would have just gone ahead and done it without posting a question here. Gui beans seem relatively obvious how to create because they have properties that are apparent, which also lend themselves to creating getter and setter methods easily. I gave an example above, which does not have that convenience. Either that, or I just haven't thought it through enough yet.
0
CEHJCommented:
It would seem that in your case you have more 'verbs' than 'nouns', so an EJB may be a better fit in your web app
0
TheDownsizerAuthor Commented:
Thanks for the pointer. I'm not familiar at all with EJB. I'll look into it a get back with a response when I can.
0
objectsCommented:
Why would you suggest EJB's for this?? I don't see any need.
0
objectsCommented:
using EJB is only going to greatly overcomplicate your application for no apparent gain.
0
TheDownsizerAuthor Commented:
It was much simpler than I thought. Didn't realize that my api's did not require any changing, until a little more reading. Just made the class Serializable, put it in the classpath, ran a webserver and accessed it through JSP. Eventually I may make it EJB for the RMI functionality.


0
TheDownsizerAuthor Commented:
Thanks.. I thought the invisible beans were gonna require all sorts of interfaces and convoluted changes to my api.. I see what you meant CEHJ and you too Objects.
0
CEHJCommented:
:-)

EJBs are not necessary. I only suggested it since normal simple beans have properties more than methods, but again, that doesn't have to be the case
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.