API & SMÖR, BRÖD, MJÖLK, Öl...



JUST KIDDING!

(-:

NORDIC APIs

Stockholm, Sweden

DEVELOPER EXPERIENCE (DX)

by Ronnie Mitra

the sum of interactions between
the developer and an API owner

the emotive impact of API usage on the developer

You can't design for usability if you don't know who is using your API

DESIGNING AN API IS EASY

effective API design is difficult

effective == meeting our design and business goals

testing

  • Uptime & response time measurements
  • security tests (auth, encryption, stb. )
  • functional testing
  • include testers early!
  • test usability of API
  • supply tests to customers
  • SoapUI

EAT YOUR OWN DOGFOOD


DOCS

  • Client specific documentation
  • API and docs have to change together, the same time.
  • inconsistent documentation is disappointing -> DX--

VERSIONING

EASY WAY

Everyone tries to avoid
(api.facebook.com, graph.facebook.com)
It might work if you have small traffic

VERSIONING

SOLUTIONS

  • Don't use too much versions in the same time
  • Deprecate old versions (Twitter legacy API)
  • Versioning variations:
    • parameters (?version=2.0.0)
    • in subdomain (api.twitter.com, v2.api.twitter.com)
    • in url (/api/v2/)
    • content negotiation (Accept: application/json;v=1.0.1)

VERSIONING

Semantic MODE

MAJOR.MINOR.PATCH rule

  • MAJOR version when you make incompatible API changes
  • MINOR version when you add functionality in a backwards-compatible manner
  • PATCH version when you make backwards-compatible bug fixes.

VERSIONING

API MODIFICATION

  • Minor update may break code
  • Type (re)casting (float -> int) may break code
  • Changing structure may break code (lat-lng exchange)
  • We had a similar case: unnecessary "&"  in the url

  • Good to know:
    Olykor a hibaüzentek szövegére is építenek a fejlesztők!

ERROR HANDLING

Use communicative error descriptions!

EVOLVING FROM A MONOLITHIC TO A DISTRIBUTED PUBLIC API

by Matthew Gray, 7digital


INTERNAL APIS

downsides

Less consistency between APIs

Focused teams = knowledge silos?

Fewer code dependencies, but implicit dependencies between APIs, datastores

MORE CHAOS

LIMITING THE CHAOS

Smaller APIs are easier to understand

Continous delivery and single-click deployment

Measure things (statsd, newrelic, logstash)

Dogfood things (build your own apps on your API)

Share knowledge

Cross team pairing and collaboration

People can move between teams

Knowledge sharing sessions

MONOLITHIC CODEBASE

4 years to separate the codebase 
"Single source of truth"

ABSOLUTE

INTERESTING

by Eva Sjökvist


API Docs

StÖckholm

  • Beautiful and clean city!
  • Rent-a-bike
  • Airport is far from ~ (1-2h with coach)
  • Invoice
  • Really expensive (plate of food ~3500 ft == 100 SEK)

Questions?

slides from conf is comming soon

Thanks

@kisPocok

nordic

By kispocok

nordic

  • 337