An application programming interface (API) is the specification for which software is meant to be used by other software.

learn more… | top users | synonyms

5
votes
2answers
281 views

Requiring Explicit Null Reference Handling

One of the problems I have with null references is that they may not be exceptional. In my current position, there are few requirements and you are lucky if conventions are followed. This means being ...
28
votes
1answer
1k views

Why have hardware-accelerated vector graphics not taken off?

I'm working on an app that involves real-time manipulation of vector paths at 60fps, and I'm very surprised by how little information there is on the subject. At first, I tried to implement my idea ...
2
votes
2answers
118 views

What endpoints should I provide, if any, to permit connectivity testing for my web services?

What endpoints should I provide, if any, to permit connectivity / availability testing for my web services / Web API? TL;DR I am developing both the server and client in an enterprise environment. ...
3
votes
2answers
501 views

design practice for business layer when supporting API versioning

Is there any design pattern or practice recommended for business layer when dealing with multiple API version. For example, I have something like this. http://site.com/blogs/v1/?count=10 which ...
2
votes
1answer
277 views

How to count hits in an HTTP API without bogging down the DB

I'm building an API and want to count hits for each user. It's a HTTP API implemented in Python. I could keep the count in a database (using PostGreSQL) but it'll be a very busy API, so I don't want ...
13
votes
3answers
2k views

Joda Time vs Java Time

Although Joda is feature rich and more sophisticated than standard Java time, it may not always be the best thing to use. How do I decide if I should use Joda Time or Java Time in any Java code? Is ...
0
votes
1answer
113 views

Would it be possible to publish my code on an official site with a third-party library?

I'm building a rather large and extensive wrapper in Delphi for an email system called Mandrill. There are wrappers for this API in many other languages, but not for Delphi. So, I'm hoping to produce ...
1
vote
0answers
91 views

Designing a loosely coupled app -> stored proc interface for PostgreSQL. A couple of questions

I am in the middle of designing a next generation database access class for one of the programs I am building. We use PostgreSQL exclusively. Our current approach is procedural (largely inspired ...
5
votes
6answers
2k views

Testing a REST client against a REST Server. How to do fixtures?

When writing unit tests, it's common to use fixtures: little testable data, so we can say: 1. Get all clients should include Willy Wonka. 2. Delete client 3, and now get clients should not include ...
1
vote
2answers
205 views

Managing Alerts in Web Application Using RESTful API

I have designed a RESTful API and I am now working on creating a web application to use the service. One thing I am struggling with is how to manage alerts in the web application (similar to the ...
12
votes
4answers
581 views

Using natural language grammar in fluent API

I'm tinkering with a query abstraction over WebSQL/Phonegap Database API, and I find myself both drawn to, and doubtful of, defining a fluent API that mimics the use of natural English language ...
2
votes
3answers
395 views

How to optimize calls to multiple APIs at once and return as one set?

I have a web app that searches across 2 APIs right now. I have my own Restful web service that I call, and it does all the work on the backend to asynchronously call the 2 APIs and concatenate them ...
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 ...
8
votes
1answer
570 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 ...
1
vote
2answers
216 views

Is it possible to use a “non-commercial” REST API in a for-pay app?

I am interested in integrating the results of 3rd-party news API's into my for-pay application. The APIs would be a very small part of the app (e. g. the app is not just reselling the APIs). I have ...
2
votes
2answers
310 views

Workflow for building a RESTful API

I am building a RESTful API, and so far, to make sure that my resources work as I need them to, I am using a REST client called Postman. This makes it easy for me to store routes and quickly make ...
5
votes
1answer
2k 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
2answers
139 views

Encapsulate external JavaScript library

I am about to develop a ASP.NET MVC 4 project that will make use of maps. Our company has it's own map API which is very basic at the moment, but is intended to be further developed in future to match ...
9
votes
2answers
2k views

Trailing slash in RESTful API

I have been having a debate about what to do with a trailing slash in a RESTful API. Lets say I have a resource called dogs and subordinate resources for individual dogs. We can therefore do the ...
1
vote
2answers
179 views

Management wants an API in purchased software

My company wants to purchase new software for our General Ledger. We want to be able to interface it with various other sytems, all purchased. Nothing is custom built. The software our Accountants ...
2
votes
1answer
856 views

OCR API (in Java) with Word (NOT MS-WORD) extraction [closed]

My Situation I need to develop an application which does crowd-sourced Image-To-Text service (just like google's reCaptcha). So I need an OCR API which can find words in an image with some text. ...
3
votes
2answers
1k views

Library design: provide a common header file or multiple headers

There are essentially two camps of library designers concerning the design of the final header file inclusion: Provide a single header file that includes every other header file that makes up the ...
6
votes
2answers
2k 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 ...
14
votes
3answers
655 views

Does decoupling trump DRY in REST?

I am building a REST API to expose most of functionality of an existing Java API. Both APIs are for internal use within my organization; I do not have to design for external use. I have influence ...
1
vote
0answers
593 views

Google Maps - Geofence a route

I'm looking at implementing a PHP based application, where by you have a certain route for example London to Edinburgh. Along this route, I want to calculate say a 10mi Radius or Polygon around the ...
3
votes
1answer
197 views

Building dedicated codepad in PHP

I am author of growing framework, which is focused around User Interface building in PHP. Essential requirements for the up-coming website redesign is ability to run code examples. I am willing to ...
4
votes
3answers
159 views

Establishing an API to provide end-user apps/scripts access to multiple types of databases

Question and Context I am currently working on a project where the main question is, how do we insert an API between the database and end-users who may develop applications/scripts of their own that ...
21
votes
2answers
1k views

What does it mean to expose a C++ code publicly as a C API and what are the advantages of doing it?

I often hear people say that C++ programmers should expose their library's/product's public API as a C API. What does that mean and what are the advantages of that?
8
votes
1answer
896 views

Generate commercial license key for web service

Background I have a business question regarding web-based software licensing. A number of web sites offer software as a service for various APIs. A good example is Google's Custom Search API. The ...
8
votes
2answers
225 views

event listener pattern in api - what should adding the same listener twice do?

In designing an API that provides an event listening interface, it seems there are two conflicting ways of treating calls to add/remove listeners: Multiple calls to addListener will only add a ...
10
votes
3answers
705 views

How to do external API testing (blackbox)

Assume you are using APIs from a vendor, how to make sure their API is working as expected? My main concern is sometimes the vendor pushed the changes to their code and break the API, we want to have ...
0
votes
1answer
158 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 ...
1
vote
2answers
116 views

Is the copy/paste approach professionally viable when working with the Google Maps API?

I find that I understand much of the Javascript concepts used in the Google Maps API code, but then again there is quite a bit that is way over my head in syntax. For example, the geocoder ...
1
vote
1answer
1k views

GMail API for a small app (Rails? Javascript? PHP?)

I want to create an app that accesses the GMail API, but I'm finding that it isn't as simple as I thought it might be. I'm hoping somebody in the community here might have some experience working ...
2
votes
2answers
175 views

Questions to ask a 3rd party API provider [closed]

I'm due to meet with a developer/sales person from a new 3rd party resource we're about to start using. The main topic I'll be interested in, is their API as I will be the developer making use of it ...
6
votes
3answers
219 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, ...
1
vote
2answers
286 views

DB API for shell scripting (any shell)

I am faced with some legacy shell scripts that run batch data processing jobs in Oracle using SQL+. For the most part, the data tier does not have to communicate back to the script with retrieved ...
3
votes
2answers
456 views

Too complex/too many objects?

I know that this will be a difficult question to answer without context, but hopefully there are at least some good guidelines to share on this. The questions are at the bottom if you want to skip the ...
5
votes
1answer
227 views

Asynchronously returning a hierarchal data using .NET TPL… what should my return object “look” like?

I want to use the .NET TPL to asynchronously do a DIR /S and search each subdirectory on a hard drive, and want to search for a word in each file... what should my API look like? In this scenario I ...
2
votes
2answers
1k views

Sharing authentication methods across API and web app

I'm wanting to share an authentication implementation across a web application, and web API. The web application will be ASP.NET (mostly MVC 4), the API will be mostly ASP.NET WEB API, though I ...
1
vote
1answer
215 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 ...
5
votes
2answers
527 views

Is there an API for determining congressional districts?

I'm looking to determine the congressional district based on an address my user is providing. This will avoid having the user to look it up themselves. Does an API of this sort exist? Note Through ...
3
votes
1answer
118 views

How to automate the API Diff document? [closed]

We can use doxygen to do the documentation, but how can I do the API Diff? Any open source or free solution for that? Or I need manually prepare? Thanks.
3
votes
2answers
165 views

Developing JSON API for a Carpool Engine

I am developing a new set of API methods for carpooling/cab booking, so if a developer needs to develop an app or webportal for carpooling, he can call my JSON API. Basically making it easy for ...
6
votes
6answers
542 views

Should I continue teaching old Java input methods alongside the new ones?

I've been imparting a Java introduction course for several years. Some slides explain how to read from files and keyboard using BufferedReaders, InputStreams, FileInputStreamReaders etc. I'm adding ...
6
votes
1answer
342 views

REST API rule about tunneling

Just read this in the REST API Rulebook: GET and POST must not be used to tunnel other request methods. Tunneling refers to any abuse of HTTP that masks or misrepresents a message’s intent and ...
0
votes
2answers
579 views

MVC or Extract Service Layer

we have an application that is built with .Net MVC. We are now tasked with exposing API's to third parties. Members on our team want to just continue down our current path and just use more ...
5
votes
3answers
821 views

What is the need for 'discoverability' in a REST API when the clients are not advanced enough to make use of it anyway?

The various talks I have watched and tutorials I scanned on REST seem to stress something called 'discoverability'. To my limited understanding, the term seems to mean that a client should be able to ...
0
votes
1answer
113 views

Directly copying third-party API

I'm currently planning on implementing API for HgLab and the obvious role model for me here is GitHub. My API obviously won't be an exact copy due to inherent differences between Mercurial and Git ...
8
votes
3answers
157 views

How to document experimental or incomplete APIs like @deprecated?

Is there a good term that is similar but different than "deprecate" to mean that a method or API is in the code base but should not be used because its implementation is not complete or will likely ...