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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:05:07+00:00 2026-05-16T16:05:07+00:00

If I create a library with most functions meant for overwriting, meaning that you

  • 0

If I create a library with most functions meant for overwriting, meaning that you will need to put your logic into some of initial library functions to get what you want from library. will it be normal\usual\OK? will such library be called a framework?

Example In my library I have CreateData function, lots of other functions and one, lets call it Main function, which uses lots of functions in library, has understandable logic and is just grate to receive some result you want to in a wary fast way. Only thing is that it uses CreateData function too. so you can just call Main and get some result on some random\pregenerated by library creator data, but when you will want, not implementing Main on your own, just change logic of data creation you should overwrite CreateData function.

Is such way OK from OOP point of view or I should re-write Main using polymorphism?

But If I will start to use polymorphism I’d probably will need to use it to all 20-50 functions I have in use in main which now are just over-writable…

  • 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-16T16:05:08+00:00Added an answer on May 16, 2026 at 4:05 pm

    I’d say “none of the above – composition is generally best.”

    Polymorphism implies inheritance. In general you’re overriding virtual methods when you’re setting up polymorphic behavior.

    It sounds like what you’re doing is the Template Method Pattern.

    I would strongly suggest writing unit tests for your library (or framework; the terms are often interchangeable). This will force you to use your own code from the perspective of a client developer (the technical term is “dogfooding”). That technique helps to find pain points.

    I’d also recommend reading Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries (2nd Edition) and running its companion tool, FxCop. You’ll learn best practices from the experts.

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

Sidebar

Related Questions

I need to find/create a library that can load hdr images in many formats
I have a need to create a library of Object Oriented PHP code that
I'm looking for a library (or preferably built into java) that will able to
Is it possible to create a library that can be consumed from .Net 2.0
Here's what I'd like to do: I want to create a library project that
If you create a class library that uses things from other assemblies, is it
I'm writing a library in C# that I will later use for an application,
I understand that in Haskell it's important to put the most 'variable' argument (aka
I have created a VB.NET 2008 Class Library that has, for the most part,
I would like to create a library, say foolib, but to keep different subpackages

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.