DATA ACCESS COMPONENT (OBJECT ORIENTED)

  • Thread starter Thread starter DRU
  • Start date Start date
D

DRU

Hi People

I have a design issue

I have atleast 6 to 7 forms whose main functionality is to
add a new record , delete a record and update records

zipcodeform -- front end form variables( zipcode.text ,
zipstate.text)

citycodeform-- front end form variables(citycode.text ,
cityname.text,cityregion.text)

addressform -- front end form variables(address1.text ,
address2.text,telephone.text)
..
..
..
----
..
..
----
..
..


The above forms have the same functionality as in adding a
new record , updating old records or deleting some records

So wont it be easy to write a class with 3 methods

DBinsert()
DBupdate()
DBdelete()

and over load these functions to

get desired result instead of having a class like
zipcodeclass , citycodeclass and addressform class and
having
to repeat the same functionality

instead I am having a basedbclass and the overlaoding the
methods

Is it the rite way to do this


Suggestions , comments of any type accepted


Thanks
DRU
 
Sounds like a fairly standard approach if I understand you correctly.
You have a few business objects (zipcode, citycode and address) that in turn
use your data access class that encapsulates the database work.
Pretty typical 3 tier system. Nothing wrong with that.
 
Back
Top