• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using beans.

 
Flemming Mertz
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all
I have the old FlyByNight assignment, but I guess that by question is relevant in all assignments.
I was wondering if anyone has mapped the supplid data structure into beans? In my case the methods in the supplied databse returns something called a DataInfo object, which contains the data. This is, however, stored in an array of Strings.
What I would like to do, is create an adapter for this class, that offers the same methods as the original database class, but converts all DataInfo object to some bean class, mapping the properties of the databse. This would, to me at least, make the data more convenient to work with.
Now, my problem is that the instructions states that my client should offer all the public methods of the original Database class. If I do as i describe above, I will offer all of the same methods, but not with the exact same method signature, since all DataInfo objects will be replaced with FlightInformationBeans, or what I choose to call my bean.
Are there anyone here that has taken this approach? Or what do you think about it?
Regards,
Flemming Mertz
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Flemming
Welcome to JavaRanch.
While using Beans is an interesting design plan, I would be concerned with the fact that you will have different signatures on the methods you are providing remotely.
The way the instructions were written, I got the impression that they wanted a semi standard interface that could be used for automated testing. Or to keep it in a business perspective, they wanted an interface that could be provided to another programmer writing a different application so that the other programmer could connect to your database server. This would not become far more problematic (to put it mildly) when you change the signatures.
In the new assignments they have been far more explicit in that they state that there will be automated testing, and they provide an interface that has to be coded to.
Just my 2 cents worth.
Regards, Andrew
 
Flemming Mertz
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Andrew
>The way the instructions were written, I got the impression that they >wanted a semi standard interface that could be used for automated testing.
This, the automated testing, and perhaps automated failing, was exactly what I am afraid of. So I think I'm going to play it safe, and just continue with class supplied by the assignment, and then perhaps bitch a bit about the greatness of using beans in the readme.txt.. ;o)
Thanks,
Flemming Mertz
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic