Upgrade to Pro — share decks privately, control downloads, hide ads and more …

API Experience

API Experience

Daniel Kocot

March 21, 2022
Tweet

More Decks by Daniel Kocot

Other Decks in Technology

Transcript

  1. codecentric AG Hoher Wall 15 44137 Dortmund Telefon: +49 (0)

    151. 10 86 70 74 Daniel Kocot Head of API Experience [email protected] www.codecentric.de Innovative - Trustful - Competent - Pragmatic 2
  2. 5 API first When we talk about API-first, it's important

    that you and your organisation recognise that APIs need to be prioritised so that your teams can achieve connectivity, productivity and quality.
  3. Consumer Journey 6 Discovery by the business and the development

    API Thinking Delivery to a platform of choice Usage
  4. 9

  5. API Thinking 11 Empathise with stakeholders Data definition API definition

    API endpoint and backend implementation Test by stakeholders
  6. What does that mean? 13 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.
  7. Techniques / Methods 19 Persona Empathic conversation Empathy map Extreme

    user Job shadowing What – How - Why Domain-Driven Design Event Storming Domain Storytelling
  8. API Interaction Patterns 20 Different API interaction patterns exist to

    accommodate various use cases, requirements, and preferences of API consumers. These patterns provide different ways for clients to interact with APIs and can be chosen based on factors such as the nature of the application, the desired level of control and flexibility, and the specific goals of the API design.
  9. API Interaction Patterns 21 Resource / Hypermedia Idea: Execute a

    specified set of methods on remote resources. Protocols: HTTP, gRPC is also possible for Resource Tunnel Idea: Call a procedure/command on a remote server as you would locally call a function in your programming language. Protocols: SOAP, XML/JSON-RPC, gRPC Query Idea: Formulate a query against a remote dataset as if the API were a database (cf. SQL). Protocols: HTTP (Query), GraphQL Event-Based Idea: Fetch events coming from a message broker Protocols: AMQP, MQTT, CloudEvents
  10. Internal vs. external data model 23 Ø Does the existent

    data model support the required use cases? Ø Is a middleware for the aggregations and/or transformations needed?
  11. Data Representation 25 Ø XML Ø JSON Schema Ø JSON

    for Linking Data (JSON-LD) Ø RDF (Resource Description Framework) Ø CBOR (Concise Binary Object Representation)
  12. API definition 27 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
  13. API Design First 33 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.
  14. Protype First 34 This method involves creating a mock-up or

    prototype of the API to test its functionality. This allows us to experiment, gather feedback, and adjust before committing to full-scale development. It’s all about learning quickly and adapting effectively.
  15. Proxy First 35 The focus is on creating a façade

    that routes requests to existing services. This approach helps ensure smooth integration with legacy systems, making it easier to modernize incrementally.
  16. Code First 36 While it might seem counterintuitive in an

    API First world, Code First isn't obsolete. It's just got a different focus - it's great for those times when the API’s requirements are clear from the start, and we want to get straight into coding.
  17. API mediation 37 • 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
  18. Platform APIs 39 • Use a framework the development team

    is proficient with • To create a first representation of the data • Transformation is maybe needed
  19. Transformations 42 • Use Enterprise Integration Patterns • Apache Camel,

    Spring Integration, Apache Nifi, SaaS Service (e.g. Make), ...
  20. Aggregations 43 • 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
  21. Reading material and recommendations 53 • https://linktr.ee/danielkocot • https://danielkocot.github.io •

    https://blog.codecentric.de • codecentric magazine „Der Softwerker“ • medium.com/@danielkocot In case of interest in more posts around API topics, follow me on LinkedIn or contact me.
  22. codecentric AG Hoher Wall 15 44137 Dortmund Telefon: +49 (0)

    151. 10 86 70 74 Daniel Kocot Head of API Experience [email protected] www.codecentric.de Innovative - Trustful - Competent - Pragmatic 54