DATA ACCESS COMPONENT (OBJECT ORIENTED)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DRU

    #1

    DATA ACCESS COMPONENT (OBJECT ORIENTED)

    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(cityc ode.text ,
    cityname.text,c ityregion.text)

    addressform -- front end form variables(addre ss1.text ,
    address2.text,t elephone.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


  • Steve C. Orr, MCSD

    #2
    Re: DATA ACCESS COMPONENT (OBJECT ORIENTED)

    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.

    --
    I hope this helps,
    Steve C. Orr, MCSD

    Hire top-notch developers at http://www.able-consulting.com



    "DRU" <boldm28@yahoo. com> wrote in message
    news:045801c368 3d$49f06190$a60 1280a@phx.gbl.. .[color=blue]
    > 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(cityc ode.text ,
    > cityname.text,c ityregion.text)
    >
    > addressform -- front end form variables(addre ss1.text ,
    > address2.text,t elephone.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
    >
    >[/color]


    Comment

    Working...