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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:32:57+00:00 2026-06-06T04:32:57+00:00

In the 3 stack layer world of Java EE (domain, DAO, services) What do

  • 0

In the 3 stack layer world of Java EE (domain, DAO, services)

What do you can a domain helper object that is meant to help the user interface world. For example:

domain.Users

represents users who post a message to a forum, such users can submit a message anonymously. When a service finds that a user needs to be “anonymous” via a piece of logic a

xyz.Anonymous

class is created and the user reference is passed to it via the constructor:

Anonymous anon = new Anonymous(user);

The anonymous class is meant for the user interface.

However, Anonymous is not a domain object because it does not have a DAO associated with it. So what should xyz be?

  • 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-06T04:33:00+00:00Added an answer on June 6, 2026 at 4:33 am

    Domain objects have got nothing to do with persistence. Domain objects are objects which model the domain. If the domain includes the idea of anonymous posts, then there will be domain objects which cater for that.

    Some domain objects may be persistent, but don’t get hung up on that.

    Regardless, don’t split your classes into packages simply along layer lines, do it by functional area. So, one package for users and identity, another for messages, another for chatrooms, etc. If you have code which is generic across a whole layer, then sure, put that in a layer-specific package, but that doesn’t need to be the default.

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

Sidebar

Related Questions

Stack: I'm trying to turn my website's user profile into more of a feed
Imaging having a stack of protocols and some c/cpp code that neatly covers sending
I am working on a project that requires me to generate a java .class
I have a method under test. Within its call stack, it calls a DAO
When using [self.view addSubview:foo]; is there a way to specify which layer the object
We are planning on developing a layer of REST services to expose services hosted
This stack trace comes as a result of an error that reads Provider name
I have a Java application that calls lots of different native methods of a
I have a java program that runs a bunch of queries against an sql
Stack Overflow. Let's say I want to initialize a non-static class of variables, two

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.