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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:44:04+00:00 2026-05-16T04:44:04+00:00

I am writing an API for my application and have a few open questions

  • 0

I am writing an API for my application and have a few open questions (with versioning in mind).

  • Should users call directly my objects or need I provide some abstraction?
  • Should code that users wrote with version X of the API only work with version X or should it work also with the latest version?

Initially I thought “abstraction” and “latest”. But .Net (or Silverlight) for example exposes concrete classes, ships with all previous versions, and also a 2.0 dll will run with 2.0 CLR even if 4.0 is installed.

I am looking for examples of API strategy of known .Net projects (client apps). For example NUnit and NHibernate but any other library you know of is great.

  • 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-16T04:44:05+00:00Added an answer on May 16, 2026 at 4:44 am

    I think both answers depend on your necessities and must importantly: business constraints.

    • Abstraction or not? That depends on whether it makes sense for the consumer to work with the objects themselves or, more importantly, if the users are ALLOWED to do so. If users can use them (in a business logic way) then expose the classes.

    Also remember that you do not have to externalize all of the object’s functionality, you can keep attributes for the internal use of the class or even for the DLL using the “friend” modifier: http://msdn.microsoft.com/en-us/library/08w05ey2.aspx

    Ex. You are designing an API for a bank and you want to let your consumers work with the “Client” class but you sure don’t want them calling Client.GetTotalBalance().

    Taking that into account is perfectly safe for you to externalize the objects, if you keep what’s private, private; .NET is really strong there.

    • Forward Compatibility? You should always try and design your APIs in a way that allows for expansion, be sure to use strong naming convention so that you can keep the method’s names for as long as you need them, in that order you will guarantee that old code runs with newer versions even if it doesn’t consume all the new resources available.

    That doesn’t mean, though, that you cannot take methods away if you need to, specially if security risks are involved.

    Hope that helps :).

    2 more things: As “Reed Copsey” suggested, take a look at: http://msdn.microsoft.com/en-us/library/ms229042.aspx.

    And I’d like to suggest, if you are starting from scratch and have the time to, that you implement serialization for your classes, it may come in really handy depending on the use for your API: http://msdn.microsoft.com/en-us/library/7ay27kt9(VS.80).aspx

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

Sidebar

Related Questions

I'm writing an API which is used to receive some data from another application.
I've been writing an application which will need to expand environment strings in a
I am writing a virtual desktop application which utilises the DeferWindowPos API functions. The
I have writing Java code Using Jersey library to call Rest APIs. For my
I'm writing a backend application with REST API for iPhone and Android. It's an
I'm writing a Java EE application using JBoss AS 6 and I have a
I am using this article of architecture http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/ I have this one function where
I have a Rails 3 application using Devise for authentication. Now I need to
I'm writing C# code that uses the windows IP Helper API. One of the
Writing my first Linq application, and I'm trying to find the best way to

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.