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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:57:30+00:00 2026-05-13T14:57:30+00:00

The situation is this: You have two classes that both implement the same interface

  • 0

The situation is this: You have two classes that both implement the same interface and both classes work together to complete some business process.

For example networkUserManager and localUserManager implement IUserManager which has a method getUser(). networkUserManager.getUser() puts a request to get a User on the queue and returns the reply. localUserManager.getUser() gets a request off the queue, finds the user information in some database, and then replies with the user data.

When I saw something similar to this being done, I couldn’t help but wonder if this was bad design. Is this bad design and if not what is an example where doing something like this would be a good idea?

  • 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-13T14:57:31+00:00Added an answer on May 13, 2026 at 2:57 pm

    You seem to be describing the Decorator pattern. In this case, the NetworkUserManager provides additional functionality over that provided by the LocalUserManager. You don’t say what language you’re using, but this pattern appears throughout the java.io package.

    On the other hand, your description of LocalUserManager.getUser() pulling a message off the queue seems wrong — it’s backward from the way NetWorkUserManager works. I would see this as being a proper decorator if LocalUserManager accessed the database, in response to something else (perhaps a NetworkUserManagerService) invoking getUser().

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

Sidebar

Ask A Question

Stats

  • Questions 291k
  • Answers 291k
  • 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 Well I'm too late to answer this but, I have… May 13, 2026 at 5:57 pm
  • Editorial Team
    Editorial Team added an answer Create a script that sleeps for a configurably long time… May 13, 2026 at 5:57 pm
  • Editorial Team
    Editorial Team added an answer http://msdn.microsoft.com/en-us/library/system.linq.enumerable.intersect.aspx var intersection = list1.Intersect(list2); or var intersection = list1.Where(i… May 13, 2026 at 5:57 pm

Related Questions

I have a large .NET remoting project using the 2.0 framework. The server's API
I'm writing an iterative function to search a binary tree for a certain value.
It is common to have classes with methods with string parameters that must be
When implementing IDisposable correctly, most implementations, including the framework guidelines, suggest including a private
As discussed in similar questions here and here I want to protect my code

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.