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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:34:50+00:00 2026-05-23T14:34:50+00:00

I came across one issue as to how to package interface, interface client and

  • 0

I came across one issue as to how to package interface, interface client and inheritance. That is, in the book below, author mentioned that Switachable is more appropriate to deploy with Switch together as a component, rather than Light.

What I want to understand is the reasoning behind it (Both Switch and Switchable are packaged in one component, rather Switchable and Light) , and example if possible.

I think there are cases where both scenarios are valid. One example that is oppoiste of that design is, IStream, FileStream are in one component, ISream client is in another component.

Below is from unclebob’s agile in C# ch 33, p497.

enter image description here

  • 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-23T14:34:50+00:00Added an answer on May 23, 2026 at 2:34 pm

    Since Light inherits from Switchable, it could also be deployed with Switchable – it seems, however, due to the naming, that the primary class interacting with the Switchable interface will be Switch – which means that the two are tightly-coupled: you should never put tightly-coupled class/interface definitions in separate assemblies.

    You could also conceive of other Switchable classes, such as Outlet or a whole set of Appliances. These could be added at a later date, and they would have nothing to do with Light, meaning that Light and Switchable aren’t necessarily part of the same component. However, the Switch class would still apply to these new classes and would apply.

    (It is true that a different consumer of the Switchable interface could be conceived, but it would likely be an awkward adaptation, such as a ToggleButton that toggled the on/off state by remembering the last method called. However, with the names chosen, Switchable still implies that a Switch could be involved.)

    I hope this answers your question.

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

Sidebar

Related Questions

While investigating an issue with application I'm working on, I've came across one behavior
I came across the following regular expression below on one of my code, anyone
While testing a new application, we came across an issue that sometimes a stored
I came across this issue when refactoring code recently: The method getList() below has
I came across an issue with one of our utility classes today. It is
I was debugging an issue in an RoR application and came across with below
I came across one very good library for parsing CUE files. But when I
I've been reading up on conditional-style expressions in ruby. However I came across one
I have a question regarding the following code snippet I came across in one
I came across the Dell Studio One 19 on the web the other day,

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.