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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:14:45+00:00 2026-06-08T09:14:45+00:00

When designing your domain model, one should stick with things that represent the problem

  • 0

When designing your domain model, one should stick with things that represent the problem domain, and the domain model should not contain auditing information.

So, if I were designing a Cat, it might look something like this:

public Cat {
    private Color furColor;
    private Color eyeColor;
    private boolean isDeclawed;
    etc...
} 

I should never have attributes like “updateDate” and “createTime”, correct?

Now, if a web application is going to show a table of cats on the screen, you might have something like:

Name    Eye Color  Claws?    Last Updated
------  ---------  ------    ------------
Fluffy  Green      No        10/31/2012
etc...

So, if you don’t keep the last update time in your domain model, how does one (properly) get that data to the page?

Obviously, I could have a poorly designed domain model, but I want to do it better.

I had considered creating an object that accepts a generic so that I could keep my domain model pristine.
i.e.

public PersistableObject<T,K> {

    private T domainObject;
    private Date updateDate;
    private User updateUser;

    getters, setters, etc...
}

However, I’m afraid I’m going to run into some problems with this.

I’ve done a lot of searches on “domain model” and “update date”, etc… but I think I’m missing out on the proper terminology.

Can someone point me in the right direction?

  • 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-08T09:14:47+00:00Added an answer on June 8, 2026 at 9:14 am

    In your scenario, I’m not sure if I agree with the first sentence. If the general use of your domain includes needing to present those dates, then they could (and likely should) be part of your normal domain objects.

    If you want to clean up your domain objects, you could simply create an interface to hold those common fields.

    public interface ITrackedObject
    {
        DateTime LastUpdated { get; set; }
        //etc....
    }
    
    public class Cat : ITrackedObject
    {
        public DateTime LastUpdated { get; set; }
        //....
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are several applications that use your domain credentials for login. Eg: Custom Corporate
One often reads how it's worth designing your code to avoid needing to make
I'm trying to understand and figure good practices for designing your app/domain models (POCOs/DTOs).
I am hearing people say you should not use Service Locator for your Dependency
I just want to ask for your experience. I'm designing a public website, using
Im designing a website, and often I need to present information in a nice
while designing my user control, i encountered the following problem: i would like to
While designing a new WPF application I noticed exceptions not being thrown during data
My question is: how would you create exception hierarchy in your application? Designing the
When designing a web service that will allow the consumer of the service to

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.