Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

Component Interfaces

Prof. Cesare Pautasso
http://www.pautasso.info
[email protected]
@pautasso

API Design

Design Advice

API Examples

Where to find APIs?

Operating Systems

Programming Languages

Standard libraries of any language runtime

Hardware Access

Abstractions to program any kind of hardware device

User Interfaces

Widgets, Gadgets, Controls

Databases

Standardized database access

Web Services

Remote access through standardized protocols:

Examples: Google, Amazon WS, Facebook Graph, Twitter Firehose, Salesforce

API Evolution

Only one chance...

...to get the design right:

API Evolution

API Compatibility

3 Versions Rule

Claus Hagen

Up to 3 versions of an API exist at the same time:

Before v4.0 can be added, v1.0 needs to be retired

1435mm Standard Gauge
1668mm Iberian Gauge
1524mm Russian Gauge
1000mm RhB (Swiss Alps)

Compatible Interfaces

Adapter

Wrapper

Mismatch Example

A
id upload(user, image); image download(id); setTitle(id, title); title getTitle(id); ids[] list(user);
B
id upload(user, image, title); {user, title, time} getImageMetaData(id); image getImageData(id); ids[] list();

Are Interfaces A and B equivalent?

References

Use a spacebar or arrow keys to navigate