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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:49:52+00:00 2026-05-17T18:49:52+00:00

I am designing a .Net library that exposes methods all of which can be

  • 0

I am designing a .Net library that exposes methods all of which can be tagged only as helper methods. Takes in PersonID, RoleID etc returns calculated salary, Salary for the entire year, Bonus etc.

  • Is it ok to design just a static class that has methods like GetSalary(), GetBonus(), GetHistoricSalary().
  • Or should I have an interface ISalaryProcessor and have these methods in there ?

With option 2 the implementing class just has behaviour and not data, in trying to bring in a contract am I creating a unwanted pure fabrication ?

  • 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-17T18:49:53+00:00Added an answer on May 17, 2026 at 6:49 pm

    If you supply an interface (or several interfaces, as per ISP), your clients can provide their own implementations for parts of your library and easily switch it if needed (for example for testing purposes).

    It also allows clients to program to an interface and follow LSP in their program, making the implementation decoupled from their application.

    For such flexibility, I would go with interfaces.

    With a static library, there is no way to switch it out and a direct dependency is introduced (against LSP).

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

Sidebar

Related Questions

I am designing a Framework library which can be used to store a hierarchically
I am designing a shared add-in using VB.Net 2008 and VSTO that has to
I'm in a process of designing a multi-tier ASP.NET web application that is supposed
I am designing a library for my application, that wraps Windows smartcard subsystem. Physically,
I'm in the process of designing a .NET library and I'm looking for some
I am designing an ASP.NET web application (.NET 4.0) which basically has a page
Designing a web application with ASP.NET MVC I asked myself how can I also
My requirement is to create a framework that can consume standard ASP.NET Profile provider.
I am designing a typical ASP.NET site which will connect to database to retrieve
I'm designing a re-usable class library that contains 2 assemblies (amongst others) named core.xml.dll

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.