Application Programming Interface (API) Design discusses best practises for creating libraries intended for general purpose or public use.
2
votes
2answers
118 views
RESTful URI's, Creating a new noun/uri or add a queryparameter
I have a Person class with a one to many relationship to Employment. A Person in the CRM can have multiple Employments (historic data).
My current REST URI for this class looks like this:
...
0
votes
2answers
120 views
How does API design differ from general web application development design? [duplicate]
If I was working on a web application designing and writing an API how does that differ from a general web application development?
What things would I need to consider and take into account? Are ...
1
vote
2answers
213 views
Choosing between words with different spellings for function names
A question has been bothering me for a while: when developing international projects, it is common sense to use English as the reference language since it is the language that the most people ...
0
votes
1answer
61 views
How does public API designer come to the conclusion what shall be provided for future and what not?
Often working with various jars and exploring the features specially in corner cases, I often realize and think that how is that they thought that it might be a useful scenario somewhere in future ...
1
vote
2answers
84 views
Designing an API for service operations with closely related parameters
I'm having trouble deciding how to design this service API.
public class GetCurrentValuesRequest
{
public int ReferenceID { get; set; }
public int[] FilterIDs { get; set; }
}
public class ...
0
votes
4answers
296 views
C++ library API: new or getters?
I'm writing a C++ wrapper for my C library (my C++ skills are a bit rusty) and I'm wondering what's preferable: allowing user to construct objects themselves or give them objects via getters?
What ...
7
votes
3answers
230 views
Is it safe to assume that one controller will only ever use one primary model?
So, I'm designing an MVC framework. In the name of keeping everything statically typed and non-magical, I've come to quite a problem with "automatically" passing models to a controller.
So, ...
1
vote
1answer
61 views
Storage Client Library 2.0 - Why is the API not as intuitive to use as 1.7?
I am migrating to using the new Storage Client Library for my Azure Table Storage.
Querying with the previous Storage Client Library 1.7 namespace:
var orders = serviceContext
...
19
votes
8answers
1k views
“Public APIs are forever: Only one chance to get it right”?
In an OS book I just read that, "Public APIs are forever: Only one chance to get it right". Is it true? Is it applicable only in APIs of Operating Systems or other APIs too? For example, will this be ...
7
votes
1answer
445 views
What API design for storing generic data in a more specific format?
for In the project I am working on we send messages about widgets over message queues, serializing them onto the queues as XML. The XML schema contains tags for properties that are common to all types ...
4
votes
1answer
160 views
When to use nested resources in a RESTful API
I have two resources: users and links.
Users can have several links associated with them. I have designed my RESTful API so that you can reach the links associated with a user at the following URI:
...
0
votes
1answer
83 views
Configuration file for an API - should it be web.config?
I have a remote procedure call API where the connection parameters need to be stored somewhere that the API code can access. This API is expected to be used mainly to create web services.
I ...
2
votes
1answer
191 views
Node.js API Architecture
I am currently working on a web app and want to design the interface between nodejs / mongoose and the backbone app.
A short description of the app:
A user signs up to the application and gets a ...
4
votes
2answers
326 views
Implementing the command pattern in a RESTful API
I'm in the process of designing an HTTP API, hopefully making it as RESTful as possible.
There are some actions which functionality spreads over a few resources, and sometime needs to be undone.
I ...
22
votes
4answers
934 views
When creating an api should I stick with small functions and many calls, or a few calls and large functions?
I have a rails platform that I maintain. It has a lot of different web applications built on top of it. However now a client is asking for an API so that they can keep users on their site, but take ...
30
votes
2answers
3k views
What is an Anti-Corruption layer, and how is it used?
I'm trying to figure out what the Anti-Corruption layer really means. I know that it's a way to transition/work around legacy code or bad APIs. What I don't understand is how it works and what makes ...
13
votes
3answers
532 views
Detecting IEnumerable “State Machines”
I just read an interesting article called Getting too cute with c# yield return
It made me wonder what the best way is to detect whether an IEnumerable is an actual enumerable collection, or if it's ...
0
votes
1answer
117 views
Rails-API gem, Is there such thing as an API only application?
I've built a few API's using the complete rails stack. In each project there have been multiple uses for rails core features. Each of the API has had management screens for monitoring usage, managing ...
6
votes
3answers
188 views
Does a mobile app need more access than the public API of a site?
I have a site with a public API, and some mobile app developers have been brought in to produce an iPhone app for the site. They insist they need to see the database schema, but as I understand it, ...
5
votes
2answers
176 views
Designing a plug-in system
I'm working on a Java project and I would like to add a plug-in system. More precisely, I would like to let the user design his own module, pack it into a jar, leave it in a "plugins/" subfolder of my ...
1
vote
1answer
131 views
RESTful API design - should a PUT return related data?
I have an API which allows a user to update their system status; and a separate call to retrieve system status updates from other users. Would it make sense to unify them under a PUT request where a ...
2
votes
3answers
105 views
Should static parameters in an API be part of each method?
I am currently creating a library that is a wrapper for an online API. The obvious end goal is to make it as easy for others to use as possible. As such I am trying to determine the best approach when ...
8
votes
1answer
222 views
Versioning APIs
Suppose that you have a large project supported by an API base. The project also ships a public API that end(ish) users can use.
Sometimes you need to make changes to the API base that supports ...
6
votes
3answers
233 views
Style bits vs. Separate bool's
My main platform (WinAPI) still heavily uses bits for control styles etc. (example).
When introducing custom controls, I'm permanently wondering whether to follow that style or rather use individual ...
4
votes
1answer
522 views
Authentication for users on a Single Page App?
I have developed a single page app prototype that is using Backbone on the front end and going to consume from a thin RESTful API on the server for it's data.
Coming from heavy server side ...
1
vote
5answers
3k views
Why does java.util.ArrayList allow to add null?
I wonder why java.util.ArrayList allows to add null. Is there any case where I would want to add null to an ArrayList?
I am asking this question because in a project we had a bug where some code was ...
2
votes
2answers
517 views
C++ Library API Design
I'm looking for a good resource for learning about good API design for C++ libraries, looking at shared objects/dlls etc. There are many resources on writing nice APIs, nice classes, templates and so ...
3
votes
1answer
159 views
When designing an enterprise API, what level is appropriate for separating libraries?
Assume we are developing a REST system for an enterprise company to expose the companies resources in a Java based application. Ultimately you have one web application, and domain libraries. My ...
7
votes
1answer
226 views
How To Handle Login For An Unofficial API?
I am building a tool to access some data on a site (Fitocracy) and I would like to turn it into an unofficial partial API, as no official API exists.
If you are not logged in, you cannot get access ...
4
votes
1answer
172 views
Data service API design
We're designing a data service that will store a large number of statistics about stocks, including historical data. The client will be a web application, which will need to pull various bits of data ...