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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:22:49+00:00 2026-05-13T23:22:49+00:00

In my system I have two different projects, one defining its interfaces and another

  • 0

In my system I have two different projects, one defining its interfaces and another defining its domain objects. So far I managed to have the interface definitions independent of the domain objects but I am feeling now the need to include certain domain objects either as parameters of the methods defined in the interfaces or as return values of such.

Should I resist and try to keep interfaces independent of the domain objects or is this a unfounded concern?

EDIT – after posting the question I thought about defining an interface for each domain object, this way they can kept separate – don’t know if it is overkill or if it is the price to pay so they remain independent.

EDIT # 2 – I was asked to give an example so I’ll try to keep it simple. I have a process that handles image transformation and one of my domain objects is a class that holds information such as resolution, list of pages, hash, etc. Let it be called DocumentInfo. I have a class that uses DocumentInfo to perform actions such as GeneratePdfFromTiff; I had defined GeneratePdfFromTiff first as an interface method of IImageHandler, which is then implemented by ImageHandler.

The problem is – one of the parameters to GeneratePdfFromTiff is DocumentInfo. Here I have the method defined at the interface level having to be aware of DocumentInfo which was defined at the domain level. This is the kind of dependency I am concerned about.

  • 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-13T23:22:50+00:00Added an answer on May 13, 2026 at 11:22 pm

    This is a tough one, I’ll give a try. +1 for the question.

    Domain Models should know how to interact with each other’s inner workings if they do it in the real world I think. That, of course, depends heavily on your exact domain model, because different models of the same thing would come up with very different representations.

    The issue with the interfaces for each domain model class is that your domain model itself is already a specific view on reality, just like the interfaces. An interface is only valid within that specific domain. You can’t use the same ICar for transportation planning, household-income calculators and car aerodynamics optimization.

    Therefore, I doubt it is very useful to isolate their dependencies too far.

    From what I know, interfaces are mostly (always?) public, which gives rise to access issues. The interface should not expose details about the implementation, but the domain model classes contain the actual implementation. Thus, instead of ‘just accessing some value’, you’d have to create another abstraction mechanism for each and every detail. You can’t, for example, access any ID, User, etc. in the system. You’d need an abstract ID type, an ID Provider, etc. I believe this could be extremely cumbersome in a large real-world model.

    Certain ‘natural domain borders’ should still be isolated, of course. If you build a social text editor, all domain classes that would also occur in a traditional text editor should be completely isolated from the social-network related items. Thus, the text-editor should only know an IUser. But I guess I’m not telling you anything new…

    This is not too satisfying I’m afraid, but it seems it is essentially a thin line to walk.

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

Sidebar

Ask A Question

Stats

  • Questions 379k
  • Answers 379k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You are searching for ;SERVER_NAME|s:" which clearly is not present… May 14, 2026 at 9:42 pm
  • Editorial Team
    Editorial Team added an answer If your consumer of the content provider is in the… May 14, 2026 at 9:42 pm
  • Editorial Team
    Editorial Team added an answer 1) Add all user controls inside a parent page with… May 14, 2026 at 9:42 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.