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

  • SEARCH
  • Home
  • 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 8992175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:53:37+00:00 2026-06-15T22:53:37+00:00

We have a classic order management application developed in Java on a Controller /

  • 0

We have a classic order management application developed in Java on a Controller / Service / DAO architecture. Data objects are POJOs representing the data in the database. Basically we have 1 class which maps 1 table in the database but we don’t use any ORM or entity mechanism These data objects are passed between all layers to create/modify/get orders through Web GUI.
This application also has a WebService layer which allow external systems to manage those orders through SOAP. The WebService layer relies on the Service layer to make sure same logic is used between WebService and GUI.

We try to make the WebServices API as stable as possible but, as we are currently using our data objects as parameters of our WebService methods, that API is likely to change frequently (at least each time we had or modify any field in the database). Moreover, we would like to hide some complexity of the database structure to WebService clients. For example, the database contains multiple fields which we would like to hide from the clients.

Concrete question(s):

  • What kind of design pattern is commonly used to hide database
    structure and fields through client API?

  • Are there any good practices to handle “mappings” between public
    methods parameters and internal data objets?

  • Is the Data Transfer Object the answer to my question?

  • 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-06-15T22:53:38+00:00Added an answer on June 15, 2026 at 10:53 pm

    You should not be passing data objects across process boundaries. It makes your application brittle and guarantees a lot of rework every time you make a schema change. My suggestion is this:

    -The data access layer should be just that: dealing with Creating, Reading, Updating and Deleting database objects. Users of the DAL must know how the database works in order to use it.

    ex (in psuedo-code):

    Person = {
    PERSON_ID:'1234567jksjgkhsduw0909wueioksgt',
    FIRST_NAME:'CHRIS',
    LAST_NAME:'MCCALL',
    TITLE:'',
    GENDER:'M',
    LAST_NAME_SUFFIX:null,
    Addresses = [{ADDRESS_ID:1234,...}]
    }
    

    etc
    -The service layer transforms database schema to hide complexity and cast opinions on what’s really useful to the developer trying to make apps with this data

    ex:

    Person = {
    name:'Chris McCall',
    primary_address:'123 Main St',
    secondary_address:null
    }
    

    You may decide to include the ID or not. You may decide to change the case on the field names, and you might project the data into a form that makes more sense to the app developer, and is more stable than your database schema. Maybe you leave a bunch of stuff out, so there’s less data going over the wire. Stuff like that.

    Your DBAs are tasked with making a database that performs well and maximizes storage via normalization. That’s a different goal than the service layer, which does not expect the results of its calls to be persisted.

    Different architectures have differentnames for the View Model (which is what I call it). DTO is another name.

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

Sidebar

Related Questions

I have a classic CoreData application, displaying it's data in NSTableView with Binding (all
I have made a site with classic php and mysql functions. I order to
I have a classic ASP application which inserts some values into a word file
I'm trying to solve a classic problem - I have a multi-threaded application which
I have a classic Order -> Order Row scenario something like this: public class
We have a large ASP (classic ASP) application and we would like to convert
I have an older ASP.NET MVC application that uses classic web forms views. As
I am calling Classic ASP Webservices from a .NET application. I have two instances
I have to use the XMLHttp object in classic ASP in order to send
Supposing a classic 3 tier application. In DAL, you have a GenericRepository where T

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.