Network programming question

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

    Network programming question

    Hi,

    I am writing a client / server application for one of my University
    projects and I would like some guidance reguarding the transfer of
    data from the client to the server.

    I have two methods that I can use and these are the use of Strings or
    Object arrays, of custom objects. Now I can use the client to turn
    all the objects into strings that insert data into the MySQL databases
    that the application is using. Or pass object arrays to the server
    that then turns these objects into Strings to place the information
    into the database.

    Which approach would be the most 'progressional' way of transferring
    the data and building the strings.
    1. Client side generating the SQL statements then pass to the server?
    2. Client passes Object arrays to the server, which generates the SQL
    statements?

    Thanks in advance.

    Grant Collins
  • Jared Dykstra

    #2
    Re: Network programming question

    Grant Collins <gcollins_07@ya hoo.com> wrote in message news:<o5v630do8 j6a6veeujuqdhon 8i13v6ba18@4ax. com>...[color=blue]
    > Hi,
    >
    > I am writing a client / server application for one of my University
    > projects and I would like some guidance reguarding the transfer of
    > data from the client to the server.
    >
    > I have two methods that I can use and these are the use of Strings or
    > Object arrays, of custom objects. Now I can use the client to turn
    > all the objects into strings that insert data into the MySQL databases
    > that the application is using. Or pass object arrays to the server
    > that then turns these objects into Strings to place the information
    > into the database.
    >
    > Which approach would be the most 'progressional' way of transferring
    > the data and building the strings.
    > 1. Client side generating the SQL statements then pass to the server?
    > 2. Client passes Object arrays to the server, which generates the SQL
    > statements?
    >
    > Thanks in advance.
    >
    > Grant Collins[/color]


    Rule of thumb whenever designing an interface: The caller should know
    as little as possible about the callee. This keeps the data abstract
    from implementation.

    If the client generated SQL statements for the server, what would
    happen if you wanted to change the table structure? ...You would have
    to rewrite the client--and that's just a waste of time.

    ---
    Jared Dykstra

    Comment

    Working...