Design First API's with RAML and SoapUI
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Design First API's with RAML and SoapUI

on

  • 2,910 views

Daniel Feist, Architect @ Mulesoft ...

Daniel Feist, Architect @ Mulesoft
Matti Hjelm, SoapUI Product Manager @ SmartBear

In this workshop we'll develop a real-world API together using RAML to define the interface and SoapUI to simulate and test the interface and API consumer experience before even thinking about the implementation. In doing this we'll cover the powerful design-first features of RAML as well as the tooling available to facilite this approach. We’ll also cover the mocking and prototyping features of SoapUI. Finally we'll implement, deploy and test our new API in a production environment.

Statistics

Views

Total Views
2,910
Views on SlideShare
2,729
Embed Views
181

Actions

Likes
4
Downloads
43
Comments
2

2 Embeds 181

https://twitter.com 105
http://www.scoop.it 76

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Design First API's with RAML and SoapUI Presentation Transcript

  • 1. API First Development with RAML and SoapUI Daniel Feist @dfeist Principal Architect, MuleSoft Matti Hjelm Product Manager, SmartBear
  • 2. Me?
  • 3. API Testing and Mocking
  • 4. Use Case
  • 5. •  (Fictitious) Global Shipping & Logistics Company •  Shipping via Truck/Ship/Air from Warehouses •  Two tiers of customers: •  Pay as you go (small medium business) •  Premium Customers (e.g. Amazon, Macy’s, etc.) •  Mythical looking for new ways to increase revenue •  Currently use FTP integration for partner enablement Mythical Logistics Inc
  • 6. •  New revenue channel - Perishable Inventory •  Unused shipping capacity •  Last minute deals •  Low rates for premium subscription customers •  Operational efficiency •  API Initiative •  Build new API for perishable inventory quote/shipment •  Leverage existing RateFinder Service for quote •  Enable mobile apps with new API New Business Opportunity 6
  • 7. New ‘Business Shipping API’ /quote RateFinder API Perishable Inventory Application /shipment Business Shipping APIConsumer apps API Implementation Premium
  • 8. API Development Lifecycle
  • 9. API Development Lifecycle Test   Build   Publish   Operate  Design   Engage  Mock  
  • 10. Design
  • 11. •  The Client Application? •  The Service Implementation? So, what should we ‘Design’ first?
  • 12. ü  Interface is most important part of your API ü where consumers touch you ü your front door, your lobby, your façade ü your brand ü Good API helps achieve Adoption ü  Enables parallel development. ü  Allows you to start testing early. Neither! The API interface..
  • 13. Model your API.. •  design for them your users •  iterate quickly •  model cleanly and consistently •  gather feedback •  test! Validate Capture Feedback API à APX
  • 14. Collaborate on API Design Business Shipping API Tom Shafii Product Manager, API’s Mythical Logistics Inc. Jason Hall Senior Developer Mythical Logistics Inc.
  • 15. Design: The Contract
  • 16. WSDL? **
  • 17. What then? ** Format Strength Reusable Patterns Sponsor WADL (XML) Swagger (JSON) IODocs (JSON) RestDoc (JSON) API Blueprint (Markdown) RAML (YAML) RestDoc
  • 18. WADL
  • 19. Swagger
  • 20. IOdocs
  • 21. API Blueprint
  • 22. Design:
  • 23. RAML A new open spec for RESTful APIs that's as clean and as structured as REST itself RESTful API Modeling Language the RAML Workgroup: raml.org
  • 24. RAML: Clean & Structured.
  • 25. RAML: Reuse resource type schema trait
  • 26. Covers Full HTTP optional version in baseUri template URIs query parameters headers (on request and response) response per status code example (and schema) per media type
  • 27. Patterns: Resource Types externalizable inheritance pull in traits parametrize
  • 28. Patterns: Method-level traits mix-ins
  • 29. Patterns: body schemas or just use good ol' form data: XML schema JSON schema examples
  • 30. Patterns: security schemes username/password; cleartext or use digest end user allows app to access their data better to put token in header, not query the OAuth multi-step dance
  • 31. Design Demo
  • 32. Demo
  • 33. Collaborate on API Design Business Shipping API Tom Shafii Product Manager, API’s Mythical Logistics Inc. Jason Hall Senior Developer Mythical Logistics Inc.
  • 34. Mock
  • 35. Why Mock? ü  To try it out! ü Minimal investment ü Find design issues early ü  Provide early access to API for feedback. ü  Start building clients
  • 36. Demo - Mock
  • 37. Prototype / Iterate Business Shipping API Tom Shafii Product Manager, API’s Mythical Logistics Inc. Jason Hall Senior Developer Mythical Logistics Inc. Ruby Mobile App Developer, Amazon Inc. Feedback New Reqs. Mock
  • 38. Test
  • 39. Manual Testing
  • 40. Testing for Real.. ü  Scenario based testing ü  Automated ü  Reusable (design, dev, prod) ü  Test Performance
  • 41. Demo - Test
  • 42. First, Test your Mock API Business Shipping API Jason Hall Senior Developer Mythical Logistics Inc. Mock API Tests
  • 43. •  SoapUI testing the API •  Import RAML •  Mock the API •  Test the API (Mocked) •  Improve the API •  Add cancel (verb DELETE) •  Use the mock from client (Android) Demo
  • 44. Testing actually improves Design MockDesign Test
  • 45. Build
  • 46. Demo
  • 47. Test your API in Development Business Shipping API Jason Hall Senior Developer Mythical Logistics Inc. API Implementation API Tests
  • 48. Publish
  • 49. Demo - Publish
  • 50. Test your API in Production Business Shipping API API Implementation Ruby Rails Mobile App Developer, Amazon Inc. Invoke API
  • 51. Operate
  • 52. •  Contract Enforcement •  Security •  Analytics •  Monetization API Management
  • 53. Demo - Management
  • 54. Monitoring: Quality in production •  Monitoring •  Synthetic vs RUM (real user monitoring) •  Use Alertsite •  Samma testsuite i design, utveckling, pre prod test and post deploy •  Root cause APM tools •  Debug API in production
  • 55. Demo - Monitoring
  • 56. API Operation Business Shipping API API Implementation Invoke API
  • 57. Engage
  • 58. •  Having a delightful API! •  Prototyping tools •  Interactive Console •  Notebook •  Social Tools •  Rate, discuss •  Provide feedback •  Forum Engage Developers
  • 59. Demo – API Portal
  • 60. Demo - API Notebook
  • 61. API Development Lifecycle Test   Build   Publish   Operate  Design   Engage  Mock  
  • 62. Thank You!