In this session, Jerome Louvel, Restlet's Chief Geek, highlights different approaches to Web API development, along with their pros & cons. Whether you're starting with code, a contract, tests, documentation, or data, you'll get a glimpse of light into the tasty book of API development recipes.
12. @jlouvel 12
You don’t always have the choice
Inheriting existing code bases, services, Web APIs?
• not a choice, you’ll work code-first!
Mitigation: safe-guards
• derive a contract
• build step to check
contract conformance
An API contract diff
tool would be handy,
any taker?
13. @jlouvel 13
Textual diff vs semantic diff?
– Renamed path /users/{user_id} into /v1/users/{user_id}
+ Added path /v1/users
Also messages
warning the changes
are backward
incompatible?
14. @jlouvel 14
Pros and cons
Easy to get
started with for
a developer
Refactoring might
easily break the
implicit contract
Cross-cutting
concerns
intermixed
Often annotation
heavy in Java:
Annotation driven
development
24. Can derive &
generate
useful artifacts
Client SDKs Server skeletons
Static, dynamic,
live mocks
Test stubs
Sandbox & live
playgrounds
Static
documentation
Documentation
portal
28. @jlouvel 28
Pros and cons
Contract as
the source of
truth
Facilitate
team
collaboration
Can derive &
generate useful
artifacts
Code generation
can overwrite
customization
33. Harder to derive
& generate
useful artifacts
Not impossible, but
not available yet
34. Hard to define
tests without
anything to test
Mitigation:
Solutions with live mocks
can ease authoring tests
for defining the behavior
35. @jlouvel 35
Pros and cons
Behavior driven:
clarifies how the
API is working
Harder to derive
& generate
useful artifacts
Hard to define
tests without
anything to test
Can ensure API
implementation
and behavior
are in sync
42. @jlouvel 42
Five-sided prism polarizing APIs development
API
prism
TEST
No good or one way of
tackling Web API
development,
just tradeoffs! Pick your side,
but do it well!
43. @jlouvel 43
Master API DevOps at our Restlet meetup
Thursday, September 22nd - 7pm at our Palo Alto office
With 2 million developers on the Restlet Platform and decades of experience with API
development, Jerome will quickly catch you up with the latest in API design, testing, and
deployment.
For this hands-on workshop, you will craft your first API with the help of an API guru and the best visual API
designer on the market. You just need to come with your laptop, there’s nothing to install!
Interested? Register by clicking the link in our
pinned tweet. You will receive all the information
required prior to the meetup.