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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:14:23+00:00 2026-05-10T22:14:23+00:00

This is a C# question, but really could be language-agnostic I have inherited a

  • 0

This is a C# question, but really could be language-agnostic

I have inherited a large object model (100+ types), with a hierarchy of objects that ‘own’ 0..n of other typed objects that all share a base (where there is a ‘relatively’ strict type hierarachy).

I want to start decoupling these objects though inheritance to put together an IoC based system to start to implement some unit tests with greater depth than currently exist.

Where would be the best place to start?

I can start at the top of the hierarchy, which is quite simple but would have the least initial benefit, and would be quite rote until I get further down the chain, but that would require me to implement a few cludges at the base object to overload function signatures to accept base interfaces until I get full coverages.

I could start at the bottom of the hierarchy, which would be much trickier, as there is alot more interaction between classes down there, but would ‘force’ us to take a more holistic view of the refactoring.

I could also start at the Base objects (those which all the objects are inheriting from) which would start the process off at the logical point, but would almost certainly create an uncompilable application until we get to swap out all the objects inheritances and function calls.

Any thoughts?

  • 1 1 Answer
  • 5 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. 2026-05-10T22:14:23+00:00Added an answer on May 10, 2026 at 10:14 pm

    if you can complete the entire process in a reasonable amount of time, start with the bases and go through the whole thing; the app will be broken until you are done

    if you must keep the app working in the meantime, start at the top and work your way down a few classes at a time

    i would look at the bottom-up perspective also, but doubt that it will be a practical way to implement since it likely will break everything and take longer than the other two approaches, but Your Mileage May Vary 😉

    the base questions are:

    • how long will each approach take?
    • will each tactic eventually end up producing the same final code?
    • how important is it to keep the app(s) working while the transformation is being completed?
    • do you have enough unit tests to trust a massive refactoring?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I realize this question is pretty basic, but I'm really stuck. I have a
This post asks this question but doesn't really give an answer, so I thought
I've never really been poised with this question: But would it be a terrible
I know this might seem a controversial question but it really is not meant
Apologies for the open endedness of this question, but I really don't know what
This question might be closed as it sounds vague but I'm really asking this
This might sound a silly question but I've really spend hours in trying to
This is a kind of a newb question but I'm really new to programming
I've seen this question asked already - but none of the answers really gelled
I know this isn't a programming question but I would really like the users

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.