Skip to content

Good OO-structure!?

Mattias Nyqvist

Asked May 4, 2006, 6:03 AM EDT1 answer
Share
LinkedInX

Hi.
I am stuck when it comes to plan my application.

The purpose is to importdata from a database and export it to a cvs file. During the transfer should some data be validated (email adress). How shuld one build such a thing in good OO-structure.

I have writen a main class wich have communciate with a dbConn class, importClass, exportClass. The data is sent all over by Hashtable and strings, this does't feel like good OO.

Plase give me a hint in the right direction.

Br
Matt
Sweden

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • +1
    A dbclass is good, and a convert class is good. One to convert from the DB to cvs and just in case cvs to DB. Also might be a good idea to make classes for all the data. That way you can do any conversions that needs to be done and do the validation. The convert class can just hold an array of the data classes and then you call the convert function in each data class to change the data.
    +1