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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:19:00+00:00 2026-05-30T22:19:00+00:00

I have a tightly coupled app that I am rewriting. The data model is

  • 0

I have a tightly coupled app that I am rewriting. The data model is stored in a class library currently exposing all objects as public. There are several UI components which operate on the various objects. The main window has a routine for generating a report by looping through the base classes stored in the model and adding relevant pages based on object type.

My intention is to implement the factory pattern so the UI only knows about an interface. I will then keep objects in the model as private. But this means I to have push reporting into the model and expose a GetPages() method in the interface for compiling the report. Each concrete object will supply their own part of the report.

I would rather the model not have knowledge of how it is reported. How can I work this?

  • 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-30T22:19:01+00:00Added an answer on May 30, 2026 at 10:19 pm

    You can follow DDD/messaging/event stream practices and make any possible reports you need from a stream of events your domain model produces. It eliminates coupling between your model and the reporting system completely. I would suggest this as a way to go.

    Otherwise you will have to expose your object to something that knows how to build reports. I wouldn’t make it as a responsibility of the UI. You can build some additional logic (application service?) that will “visit” your model and produce some data that can be used by the UI for reporting. But you understand that in this case you always will have coupling between your model and something that sits on top and interrogates it for reporting purposes.

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

Sidebar

Related Questions

Our domain model is very tightly coupled and some classes that are mapped with
I have a class built with Moose that's essentially a data container for an
I have a model that requires loading external data from an auxiliary source. A
I have a django site that's tightly coupled with a wordpress blog. I want
Best way to load seed data? I have an Author table that is tightly
I have the following use case , lot of code which was tightly coupled
I have a QueueProcessor class that processes a work queue. I want to send
I have a WPF application which tightly coupled to linq2sql through WCF. It now
I have some legacy code that I'm rewriting using SubSonic to help the future
Currently I have a class, TransactionData , which is just a little bit more

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.