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 3339078
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:27:03+00:00 2026-05-18T00:27:03+00:00

I am in the process of designing a web interface that would support 2

  • 0

I am in the process of designing a web interface that would support 2 or more versions of a data schema. Data schema represented in JAVA could look like

PersonV1 {
  String fname
}

PersonV2 {
  String fname
  String lname
  String email
}

In the future I am anticipating new versions being added. Is there any best practices for how this kind of UI would need to be built based on DRY principles etc.

A little bit of background on this. We have a product A and for every version of this product we might have a different schema. So per instance version I create a new schema. This schema is then made into a bunch of Java objects via jaxb and stored as a library. This process is repeated every time there is a new version of product A.

Product B will make use of the library and will fetch the xml from product A, since we know which version it is coming from we will be able to populate the correct objects and use them as the domain objects in a sense for the UI.

Thank you

  • 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-18T00:27:04+00:00Added an answer on May 18, 2026 at 12:27 am

    Depending on the type and diversity of your web interface clients, you can go two routes:

    1. Add schema version information to the path or in each object. Each client will then have to translate an object of a specific schema version into a form it can use. The safest approach for versions newer than that of the client software is probably to reject it completely.

    2. Have clients indicate their preferred/only accepted schema version in their requests to the server. It will then be up to the server to either translate from its current schema to the one the client is requesting, or fail with 400 indicating the requested schema cannot be supported.

    So, lets say you have a web client that only cares about fname. On receiving Person it will extract fname regardless of the schema version and carry on.

    Let’s say another web client needs the email address. It will accept a v2 person object, but inform the user that the server is not compatible if it returns a v1 person.

    Finally, lets assume v3 replaces fname and lname with name. In this case v2 can be transformed to v3 by appending fname and lname and perhaps v3 can be transformed to v1 by splitting name on space, but it would probably be hard to do something meaningful from v1 to v3.

    There will obviously be a lot of situations where either the client or server must give up and simply report the service or client is incompatible. But since you’re designing your service from the ground up with changes in mind, you will hopefully devote a lot more thought and caution to your schema changes.

    There are plenty of popular file format standards that struggle with this kind of problem. For example, there are multiple revisions of the Zip file format. Producers and consumers must each have a strategy for how to handle specific versions of the file format. The Java binary class format is another example.

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

Sidebar

Related Questions

Java process control is notoriously bad - primarily due to inadequate support by the
There is a conversion process that is needed when migrating Visual Studio 2005 web
I'm in the process of designing a small website and was curious when an
I am in a process of designing a custom SharePoint application. On a previous
I am in the process of designing a daily build routine for my project.
I am in the process of designing a build system and the directory structure
I'm in the process of weeding out all hardcoded values in a Java library
I have 1 process that receives incoming connection from port 1000 in 1 linux
I'm in the process of refactoring some code which includes moving folders around, and
A Windows process created from an exe file has access to the command string

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.