Slide 1

Slide 1 text

API Thinking 2

Slide 2

Slide 2 text

Creating the digital future together. 3 codecentric AG Hoher Wall 15 44137 Dortmund Daniel Kocot Head of API Expierence & Operations Senior Solution Architect AsyncAPI Ambassador +49 151 10 86 70 74

Slide 3

Slide 3 text

Selfie time! 4

Slide 4

Slide 4 text

Differentation from pure integration mindset 5

Slide 5

Slide 5 text

6

Slide 6

Slide 6 text

7

Slide 7

Slide 7 text

Pure Integration 8 Focus on connectivity Implementation-dri ven approach Limited scope and scalasbility

Slide 8

Slide 8 text

New way of thinking 9

Slide 9

Slide 9 text

10

Slide 10

Slide 10 text

New way of thinking 11 Broader strategic vision Emphasises reusability and user experience Scalability and flexibility

Slide 11

Slide 11 text

API first 12

Slide 12

Slide 12 text

API first 13 PRIORITISING APIS WITHIN THE ORGANISATION APIS BECOME A MAIN PART OF THE BUSINESS MODEL OF THE ORGANISATION API FIRST IS NOT A PARADIGM FOR YOUR DEVELOPMENT TEAM!

Slide 13

Slide 13 text

API as a Product API Product 14

Slide 14

Slide 14 text

Definition 15 VALUE PROPOSITION ANALYTICS AND MAYBE SOME KIND OF MONETISATION OWNERSHIP AND LIFECYCLE MANAGEMENT DOCUMENTATION AND DEVELOPER EXPERIENCE

Slide 15

Slide 15 text

Everything we do now is becoming consumer-centric 16

Slide 16

Slide 16 text

But an API is not the panacea 17

Slide 17

Slide 17 text

APIs are not the panacea 18 In some situations they are not the best fit Security Dependencies Complexity

Slide 18

Slide 18 text

Design first 19

Slide 19

Slide 19 text

Design first Principles 20 Planning before coding Collaboration Early Validation Consistency and Standardization

Slide 20

Slide 20 text

API Thinking 21

Slide 21

Slide 21 text

Classical Design Thinking 22 Empathise Define Ideate Prototype Test

Slide 22

Slide 22 text

API Development API Thinking 23 Empathise with stakeholders Data definition API definition API endpoint and backend implementation Test by stakeholders

Slide 23

Slide 23 text

Business & Developer Success As the definite goal 24

Slide 24

Slide 24 text

What does that mean? 25 With the idea of Business or Developer Success, we take the concept of Developer Experience in your organisation to the next level by also including the User Experience of the application that uses an API. Another factor, the Value Experience, refers to the exchange of values that make APIs sustainable and worthwhile for your organisation to invest in their development and maintenance.

Slide 25

Slide 25 text

Empathise with stakeholders 26

Slide 26

Slide 26 text

Who is going to use the API? 27

Slide 27

Slide 27 text

Use Cases Describing why the API is needed and what systems are involved. 28

Slide 28

Slide 28 text

But… 29

Slide 29

Slide 29 text

You are not the consumer! 30

Slide 30

Slide 30 text

Techniques / Methods 31 Persona Empathic conversation Empathy map Extreme user Job shadowing What – How - Why Domain-Driven Design Event Storming Domain Storytelling

Slide 31

Slide 31 text

API Interaction Patterns 32

Slide 32

Slide 32 text

Definition 33 Different API interaction patterns exist to accommodate various use cases, requirements, and preferences of API consumers. These pattern provide different ways for clients to interact with APIs and can be chosen based on factors such as the nature of the application the desidered level of control and flexibility, and the specific goals of the API design

Slide 33

Slide 33 text

Overview 34 Resource / Hypermedia Tunnel Query Event-Based

Slide 34

Slide 34 text

Resource / Hypermedia 35 EXECUTE A SPECIFIED SET OF METHODS ON REMOTE RESOURCES. HTTP, ODATA, GRPC

Slide 35

Slide 35 text

Tunnel 36 CALL A PROCEDURE/COMMAND ON A REMOTE SERVER AS YOU WOULD LOCALLY CALL A FUNCTION IN YOUR PROGRAMMING LANGUAGE SOAP, XML/JSON-RPC,GRPC, ODATA

Slide 36

Slide 36 text

Query 37 FORMULATE A QUERY AGAINST A REMOTE DATASET AS IF THE API WERE A DATABASE (CF. SQL) ODATA, GRAPHQL

Slide 37

Slide 37 text

Event-Based 38 FETCH EVENTS COMING TO AND FROM MESSAGE BROKER AMQP, MQTT, KAFKA, CLOUDEVENTS AS THE UNDERLYING SPECIFICATION

Slide 38

Slide 38 text

39 Data definition

Slide 39

Slide 39 text

Daily Routine: Searching for data and creating new value for the organisation 40

Slide 40

Slide 40 text

Discovery of Data 41

Slide 41

Slide 41 text

Awareness of Data Products and Data Contracts 42

Slide 42

Slide 42 text

Data what? 43

Slide 43

Slide 43 text

Data Product 44 VALUE DRIVEN OUTPUT USER INTERACTION CROSS-DISCIPLI NARY DEVELOPMENT MONITORING AND MAINTEANCE

Slide 44

Slide 44 text

Data Product – Schematic View 45

Slide 45

Slide 45 text

Data Contract 46 FORMAL AGREEMENT SCHEMA DEFINITION DATA GOVERNANCE INTERFACE SPECIFICATION

Slide 46

Slide 46 text

More Details 47

Slide 47

Slide 47 text

Only data products that add value can lead to equally valuable API products. 48

Slide 48

Slide 48 text

Data Representation 49 XML JSON Schema JSON for Linking Data (JSON-LD) RDF (Resource Description Framework) CBOR (Concise Binary Object Representation)

Slide 49

Slide 49 text

Data minimization Data observability As the declared goals 50

Slide 50

Slide 50 text

API definition 51 openapi: 3.0.3 servers: - url: 'http://localhost:8080' info: version: 1.0.0 title: News API contact: name: Daniel Kocot url: 'http://www.codecentric.de' email: [email protected] license: name: MIT url: 'https://www.tldrelgal.com/mit' description: An API to provide news

Slide 51

Slide 51 text

Specifications 52 - ProtoBuf - GraphQL Schema

Slide 52

Slide 52 text

Challenges within API Design 53 - Long Running Operations - Paging / Filtering - Large Payloads

Slide 53

Slide 53 text

Establishing a design library and guidelines over time As the declared goal 54

Slide 54

Slide 54 text

API endpoint and backend implementatio n 55

Slide 55

Slide 55 text

API Design First 56 This is where we sketch out the API endpoints, data structures, and use cases before we even think about code. The benefit? We get clarity on what our API needs to do and the best way to structure it, saving us time and headaches down the line.

Slide 56

Slide 56 text

API mediation 57 • Architectural layer to manage, protect and enrich an API • Intercepting API traffic • Concept of "outer" APIs • No business logic should be handled within this layers

Slide 57

Slide 57 text

API Type Classification • Platform APIs • Service APIs 58

Slide 58

Slide 58 text

Platform APIs 59 • Use a framework the development team is proficient with • To create a first representation of the data • Transformation is maybe needed

Slide 59

Slide 59 text

60 Service APIs

Slide 60

Slide 60 text

Transformations 61 • Use Enterprise Integration Patterns • Apache Camel, Spring Integration, Apache Nifi, SaaS Service (e.g. Make), ...

Slide 61

Slide 61 text

Aggregations 62 • Use again a framework the development team is proficient with • To create aggregated or composed representation of data from Platform APIs • These APIs help to create a better experience for the user

Slide 62

Slide 62 text

Generating model classes for clients 63

Slide 63

Slide 63 text

Test by stakeholders 64

Slide 64

Slide 64 text

Based on the description 65

Slide 65

Slide 65 text

Description becomes a contract 66

Slide 66

Slide 66 text

Provide a Postman Collection of the API (product) 67

Slide 67

Slide 67 text

Contract Testing with Portman CLI https:/ /github.com/apideck-libraries/portman 68

Slide 68

Slide 68 text

69 • Smoke • Load • Stress • Soak Performance Testing with k6

Slide 69

Slide 69 text

API Development API Thinking 70 Empathise with stakeholders Data definition API definition API endpoint and backend implementation Test by stakeholders

Slide 70

Slide 70 text

Delivery to a platform of choice (APIOps) 71

Slide 71

Slide 71 text

API Operations Pipeline 72

Slide 72

Slide 72 text

Q&A 73

Slide 73

Slide 73 text

Reading material and recommendations 74 • https:/ /blog.codecentric.de • codecentric magazine „Der Softwerker“ • IT Spektrum / https:/ /www.sigs.de/autor/daniel.kocot • https:/ /architectural-bytes.ghost.io In case of interest in more posts around API topics, follow me on LinkedIn or contact me.

Slide 74

Slide 74 text

References 75 • Cover Slide: Photo by Anthony Tori on Unsplash

Slide 75

Slide 75 text

codecentric AG | Hochstraße 11 | 42697 Solingen Creating the digital future together. 76 codecentric AG | Hochstraße 11 | 42697 Solingen Creating the digital future together. Thank you!