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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:03:02+00:00 2026-06-13T11:03:02+00:00

I have a business logic like below and I would like to know which

  • 0

I have a business logic like below and I would like to know which design pattern should be used here.

Basically I have an input and number of factories which creates objects which are derived from the same base class.

Input => factory1 => Output1

Input => factory2 => Output2

Input => factoty3 => Output3

……..

……..

The number of factories varies.
This is the kind of logic which will be enclosed in a method which will create a collection of Output1, Output2… and returns it.

Which is the right design pattern in this scenario ?

Another most matching real time example..

I have a filename/pattern and there are different Finders. One for finding the word docs matching the pattern, one for finding the excel docs. one for finding the ppt docs matching the pattern.
At the end all docs(word,xl,ppts) should be returned.

  • 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-13T11:03:03+00:00Added an answer on June 13, 2026 at 11:03 am

    It seems fairly simple as I see it and you may not need a design pattern.

    Lets call this object a Processor instead of Factory so as not to confuse with the Factory pattern.

    So your code could be simply like this :

    interface Input;
    interface Output;
    interface Processor {
      Output process (Input i);
    }
    
    MainClass {
      List<Processor> processors = initializeProcessors();
    
      List<Output> process(Input i) {
          List<Output> outputs = ...;
          foreach (Processor p in processors) {
              Output o = p.process(i);
              outputs.add(o);
          }
          return outputs;
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm starting new application. I would like to have all business logic and domain
I have the business logic of an workflow-like application in a C# class library,
Okay, I have a business logic class like this: Note: For context, Vendor Briefs
Let's say you have a business logic method that can perform some operation across
In an N-Tier app you're supposed to have a business logic layer and a
I am creating a series of UserControls that all have some similar business logic.
We have DB that has massive amount of business logic stored in triggers inside
I have a service object that is responsible for some business logic validation. What
I have a struts project and my client give me full business logic classes.He
I have a library that I created with some business logic that includes writing

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.