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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:13:04+00:00 2026-05-14T04:13:04+00:00

I currently have a client that wants me to ‘abstract’ out a domain model

  • 0

I currently have a client that wants me to ‘abstract’ out a domain model from the existing code but they specifically said that I shouldn’t refactor the existing code itself. My question is 1) whether or not this is advisable and 2) what techniques would you apply in this scenario if you can’t refactor the code yet they expect you to come up with a model for it?

(EDIT: I can’t quite put my finger on it, but somehow, not being able to refactor in this case just feels wrong. Has anyone else run into this type of scenario?)

  • 1 1 Answer
  • 3 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-14T04:13:04+00:00Added an answer on May 14, 2026 at 4:13 am

    This sounds to me almost impossible to achieve.

    The only limited thing you could do that might meet what they want is to restructure your projects/assemblies to introduce proper heriarchies.

    From what you describe, I’m imagining a big code base with everything in a single assembly, perhaps with business logic classes sitting alongside data access classes, maybe even so UI code if you are really unlucky.

    From this you could introduce a (very poor) approximation of a domain model by moving all your business logic into its own assembly that references the data access logic.

    Doing that, you would only need to change how classes are references and not change existing code. However you would not have a domain model… you’d have one assembly that kind of has domain logic within it.

    Introducing a proper and useful domain model is impossible without refactoring. The whole point of the process is to identify the actual business entities that you are expressing and then reflect these entities in the domain model. That will require introducing new classes, extracting methods out, fiddling with your abstractions. (That just being the start of the process)


    After seeing your comment, I thought it worth mentioning two approaches that explicitly deal with the problem of legacy code in an evolving code base.

    Both other these approaches could help you move towards what the client is asking for. I’d still stand by my main answer – that you aren’t introducing a domain model, but this could be a first step of creating a useful domain model that does not require major rewrites of the legacy code.

    • Martin Fowler’s Strangler Application

    The idea here is that you build your new application up over an existing application, much like a vine, slowly surrounding and then killing off parts of the original application as they are replaced.

    It is very intentionally a slow process, reducing risk and making the gradual phasing out of the legacy system understandable.

    • The Anti Corruption Layer (from the DDD book)

    There is a description of the Anti Corruption Layer here. The main idea is you create an interface over legacy code that manages is and shields your domain model from the complexity.

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

Sidebar

Related Questions

I have a client that receives messages from a Queue. I currently have a
I currently have an archaic system of client records that I am trying to
I currently have a Service in Android that is a sample VOIP client so
I'm currently implementing a client application that POST's a file over HTTP and have
I currently have a datasource from a client in the form of XML, this
I currently have a client website on the Grid server on MediaTemple that will
I have site that has a Vimeo video where the client wants to hide
currently I have this client code in my PHP MVC web app: try {
Currently I have tasked to prepare Document service for client side parser that user
I am currently finishing a site that the client wants to work on all

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.