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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:42:12+00:00 2026-05-22T14:42:12+00:00

Possible Duplicate: Interface vs Abstract Class (general OO) Hi Experts, I am reading on

  • 0

Possible Duplicate:
Interface vs Abstract Class (general OO)

Hi Experts,

I am reading on Factory patterns

  1. Based on article- http://aspalliance.com/809_Working_with_Factory_Design_Pattern_using_C

We define interface, interface is implemented by classes. Based on certain attribute we decide which class is instantiated

  1. Looked at another article-
    http://csharpdesignpatterns.codeplex.com/wikipage?title=Factory%20Method%20Pattern&referringTitle=Home

We define abstract class and implement it in the subclasses.

Both the examples listed are quite different. Based on fundamentals that I remember.

  • When do we use interface – When we need to implement polymorphic behavior
  • When do we use abstract class – to provide default base functionality

Help me understand how both using interaces vs using abstract classes is called as factory pattern ?

Are these two valid approaches ?

Apologies for formatting issues.

Thanks in advance

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

    Since patterns are abstract concepts, they are not strictly dependent on implementations; so using interfaces or abstract classes are both valid approaches imo.

    The main idea of Factory pattern is to “simplify” object creation by making an abstraction.

    Whether you use interfaces or abstract classes depends on your implementation. In my experience, factory pattern usually came to play when the class structure is already defined. For example, I’ve already made the decision to use interfaces or abstract classes in my model and now I want to refactor so that object creation is simpler => I go for the factory pattern.
    Hope this helps.

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

Sidebar

Related Questions

Possible Duplicate: Interface vs Abstract Class (general OO) When to use abstract class or
Possible Duplicate: Interface vs Abstract Class (general OO) I'm not exactly clear on the
Possible Duplicate: Interface vs Abstract Class (general OO) Hi guys, I decided to dig
Possible Duplicate: Why are interfaces preferred to abstract classes? Abstract class and Interface class?
Possible Duplicate: PHP: What is the difference between an interface and abstract class? As
Possible Duplicate: When to use an interface instead of an abstract class and vice
Possible Duplicate: When to use abstract class or interface? I am a newbie in
Possible Duplicate: StructureMap singleton usage (A class implementing two interface) I'm currently designing a
Possible Duplicate: Interface vs Base class A class implementing an interface has to implement
Possible Duplicate: Why would one declare a Java interface method as abstract? The following

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.