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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:53:37+00:00 2026-06-12T18:53:37+00:00

I am looking for a design technique to achieve the following. two different data

  • 0

I am looking for a design technique to achieve the following.

  • two different data sources to read data
  • I need to be able to dynamically add or remove more data sources

What I have done so far is, I have created the following :

IDataProvider 
- StartReadData()
- EndReadData()
- List<DataObjs> (contains data)

   XmlDataProvider : IDataProvider
   CsvDataProvider : IDataProvider

IDataProviderManager
- List<IDataProvider> (has a collection of dataprovider)

  DataProviderManager : IDataProvideManager

Now, I am looking for a better technique by which I can instantiate IDataProviders and manage it in a configurable way (add or remove more IDataProviders classes without doing any changes to code or recompiling).

Any nice design techniques or links to similar code are welcome.

Much Thanks.

  • 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-06-12T18:53:38+00:00Added an answer on June 12, 2026 at 6:53 pm

    Use the factory-pattern to abstract away the instantiation of the providers as a first step.

    In that factory you can go either way with the implementation: config, reflection etc.

    But my guess is that you will end up using an IoC-container in the long run as they are doing exactly what you want (and better)

    Most containers can scan assemblies and import them transparent to your application without the need for recompiling.

    I would suggest to invest a little time in getting to know DI instead of losing time on inventing your own solution. (which will be something to learn from too btw)

    Using the factory allows you to change the implementation without breaking your application when you find the final solution that suits you.

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

Sidebar

Related Questions

I'm looking to a design a protocol for a client-server application and need some
I'm looking for feedback on the Data Access Object design pattern and using it
I am looking to design a query in which I need DISTINCT terms in
We are looking to design a security application that does the following on laptops:
I'm looking for design examples (frontend) of how to let the users add an
I am looking for some design advices for the following problem: I am using
I am looking to design a database for a website where users will be
I'm looking to design an application that will require some deep control over IP
I'm looking for a design pattern to manage a pool of objects. A thread
I am looking for some design best practice or heuristic to address performance issues

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.