Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3335068
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:58:32+00:00 2026-05-17T23:58:32+00:00

I am working on a client / server system: There is a database, an

  • 0

I am working on a client / server system:

There is a database, an application server and a user interface (client) app. The application server handles connections from the client applications which in turn talks to the database when the client app requests a list of users for instance, or a particular object by id.

Currently I have a set of data objects like “user”, “area”, etc. which map to tables in the database. These data objects are defined in a shared library that gets linked into the client and the appserver on compile. They inherit a class that allows them to be serialised so they can pass between client and server, and they take a “data provider” as a dependency injection to allow the commit to either send to the application server or send to the database depending on if they’re being used at the client or the server end.

When the user of the client app wants to edit a user, it requests that object from the app server, uses it to populate the user interface with the current values, allows the user to edit those values, and then “commits” the object back to the appserver which in turn commits it to the database.

This is fine for this very simple scenario, but as it gets more complicated the user interface will want objects that are perhaps consisting of several of the bottom layer database objects so I’m thinking I need to abstract away from the database model to some degree.

This being the case, I should not be passing what I suppose would be called “DAL” objects to the user interface (via the serialisation), so I’m thinking I need some DTOs (data transfer objects).

I’m also finding in the application service where I do the business logic, I’m currently handling it all by switching on the type of object being committed from the client, doing whatever is neccessary and then committing to the database. I’m thinking perhaps here I need business objects instead, which each object knowing how to validate and act.

So I’d perhaps end up with:

Shared:
 * UserDTO (data transfer object)

Application Server:
 * UserDAL (data access object)
 * UserBO (business object, contains UserDAL)
 * UserDTO (data transfer object as defined in shared lib)

Client:
 * UserDTO (data transfer object as defined in shared lib)

So, the client requests a user DTO, displays or updates as neccessary, the “save” method is called, it gets serialised and sent to the application server which de-serializes it, creates the business object which does whatever it likes with it (such as validate, save to DB, etc.).

This means removing all my serialisation logic from the DAL objects to the DTO objects, and removing my big business logic class, and would stop the presentation layer (client) having to know anything about the database structure.

Does this sound about right?

Someone else did suggest having the business objects in a shared library and not having data transfer objects. The problem with this though is I have business logic in 2 places, and it’d nice to be able to update the business logic in one place, rather than potentially having to update 100’s of client apps talking to the one application service. It also means the business objects would have to also have all the get/set routines of the DTO objects.

I hope this makes sense. Any thoughts would be appreciated 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:58:33+00:00Added an answer on May 17, 2026 at 11:58 pm

    My initial thought is – what’s your actual problem? Because from what I can see you’re not doing anything wrong.

    Yes – putting multiple objects into a DTO, and then serializing that for transfer “over the wire” between client / server sounds right to me.

    Yes – having a shared library of types / business objects is fine; I’m assuming they are nothing more than really ‘dumb’ data structures with no logic, and that they don’t change often.

    so I’m thinking I need to abstract away from the database model to some degree.

    Yes. You could possibly do the same between client and server. If you were in using the Microsoft platform / .Net you could use WCF which allows for different types of binding, so no more manual serialization.

    The problem with this though is I have business logic in 2 places

    Yes havingit in two places is not ideal – but it does have some advantages. One advantage of duplicating some of the business logic at the client-end (I’m thinking of “validation” rules here) is that the UI could provide a much more interactive experience for users, in that they wouldn’t have to wait for a round-trip to tell them they can’t add their surname into the phone number field. You’d still provide proper validation and full business rules on the server-end: “defense in depth” so to speak.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a client-server application that uses boost::serialization library for it's serialization
I've got a working SOAP::Lite client. It works against an established server, but so
My asp.net site has to run on several client servers. It's working fine on
I'm working with a client that needs to generate millions of the alphanumeric codes
I'm working with a client to plan the topology for a public facing SharePoint
I am working on a client proposal and they will need to upgrade their
I am currently working for a client who are petrified of changing lousy un-testable
Hiya I am working on an FTP client, can someone tell me the difference
We are working on a website for a client that (for once) is expected
We're working on a rich client (written in Flex) that is connected to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.