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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:51:53+00:00 2026-05-13T07:51:53+00:00

In the project I work on, we handle Medical Billing. Every time the state

  • 0

In the project I work on, we handle Medical Billing.

Every time the state makes a change to the official form (which our data classes represent), in order to maintain backward compatibility with previous forms, we add the new properties but leave the old ones intact, and have a document version property which is used to determine what validation is done and UI actions to display it.

This has lead to bloated classes over the life of the project (almost 5 years of State-mandated changes), and simply not supporting old document formats is not an option.

I would like to try creating a new class for each document version, but even then we will have several copies of very similar (though slightly changed) code. And class names such as ProgressNoteV16, ProgressNoteV17 look horrible.

Inheritance can’t be used, because that would still result in the same problem (classes having properties that are no longer needed). Interfaces would make the Interface just as bloated, which wouldn’t solve the issue.

What are the solutions and best practices used to solve this problem?

  • 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-13T07:51:53+00:00Added an answer on May 13, 2026 at 7:51 am

    This is a fairly classic problem for any agency that works with the public in any capacity, especially if its a government or government monitored agency. The solution is non-trivial, and it will probably require some significant work to create, as well as maintain afterwards.

    This has worked for me in the past when dealing with similar issues for clients, it might not work for you though, you will need to draft out what your trying to accomplish and if it makes sense to do this.

    There are a couple of patterns to be familiar with (if you arent already):

    1. Factory which has already been previously mentioned
    2. Composition which will hopefully get you out of some of the ugly inheritance problems
    3. Template for separating out the logic of what the form does from the versions

    There are two books that are pretty good for explaining these (and a few other useful ones):

    1. Head First Design Patterns (Cant remember off the top of my head)
    2. Patterns of Enterprise Application Architecture (Fowler)

    Now to the process I have used in the past:

    1. Start by taking all of your current versions of the forms, separate them into different classes and look for common overlap. You can do this in draft mode or as your current plan to have different classes for each version
    2. Derive from this class structure a number of “base” objects which you can use to be the inheritance root for each significant set of versions for a form. You may have several of these, but they should be less than you have total form objects.
    3. Now in each of these base objects, group together common functionality (i.e. Name and Address structures, etc) and abstract this out into its own class hierarchy, inject this hieararchy back into your base classes through constructor injection.
    4. Apply the composition pattern to your base class hierarchy now and work to get as much common class structure out as possible. Ideally your forms at this point would just be the minimal functionality that has changed in each form and have a constructor that takes all common (and perhaps slightly varying) functionality.
    5. Apply the Template pattern now to abstract out all of the common “functionality” from your classes, such as common validation, and persistence logic, use constructor injection again to get this functionality back into your base classes.
    6. Extract Interface adapter definitions from your base classes and use these as the basis for your application to work with your forms
    7. Build your factory classes to handle all the grungy work of setting this up.

    Hope that gives you some ideas of what to do.

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

Sidebar

Related Questions

For my work I have to set up a project in Matlab, which is
Our current project at work is a new MVC web site that will use
I work in a small team (4-5 developers) on a single project. Every member
I've inherited a project at work recently that was written by one of our
I started to work in a project which must reuse a Microsoft SQL Server
My project work ok on the emulator. But hardware show me that i make
I work on a pretty large rails project at work. Sometimes I need to
For a project at work, we're considering using the Maven plugin for Eclipse to
I ask since a project I work on generates a single, monolithic DLL of
I have a large c# project at work that controls a radar jammer. When

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.