SlideShare a Scribd company logo
Crafting Web APIs that Others Love
An Introduction to RAML 1.0
All contents © MuleSoft Inc.
About Me
•  API Addict
•  Technology = Love
•  Developer & Open Source
Contributor
•  Traveler or such
•  Community Product Manager
@ MuleSoft
@ChristianVogel_
All contents © MuleSoft Inc.
Expectations vs Reality
APIs are not designed with their
consumers in mind
All contents © MuleSoft Inc.
Imagine you’re building a city using Legos.
“I want my city to have a fire department, a
police department, and a park.”
All contents © MuleSoft Inc.
All contents © MuleSoft Inc.
All contents © MuleSoft Inc.
You didn’t have any specs…
All contents © MuleSoft Inc.
Spec Driven Development – Design before Code
Design Code
All contents © MuleSoft Inc.
Spec Driven Development – Be Agile
Design Code
All contents © MuleSoft Inc.
The goal is that by utilizing agile user testing,
carefully designing, and prototyping your API in
an iterative state, that most design related
issues have already been discovered and
resolved. Allowing you to develop fearlessly.
- Mike Stowe
All contents © MuleSoft Inc.
Some of Today’s Top Spec Formats
All contents © MuleSoft Inc.
Let me introduce you to RAML
All contents © MuleSoft Inc.
Design and
Document your
APIs in a single file
An open spec language
designed to be human
readable and to encompass
the entire API lifecycle
Core
What is RAML?
All contents © MuleSoft Inc.
What does RAML look like?
#%RAML	
  0.8	
  
	
  	
  
title:	
  World	
  Music	
  API	
  
baseUri:	
  http://example.api.com/{version}	
  
version:	
  v1	
  
	
  
/playlist:	
  #	
  resource	
  
	
  	
  get:	
  #	
  HTTP	
  method	
  
	
  	
  	
  	
  responses:	
  
	
  	
  	
  	
  	
  	
  200:	
  #	
  HTTP	
  response	
  code	
  
	
  	
  	
  	
  	
  	
  	
  	
  body:	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  application/json:	
  #	
  HTTP	
  response	
  media	
  type	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  example:	
  |	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  {	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  “playlistID”	
  :	
  1,	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  “playlistName”	
  :	
  “My	
  Awesome	
  Playlist”,	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  “genre”	
  	
  	
  	
  	
  	
  	
  	
  :	
  “top40”,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  “songs”	
  	
  	
  	
  	
  	
  	
  	
  :	
  40	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  }	
  	
  	
  	
  	
  	
  
All contents © MuleSoft Inc.
Indeed, the ratio of time spent reading versus
writing is well over 10 to 1. We are constantly
reading old code as part of the effort to write
new code. ...[Therefore,] making it easy to read
makes it easier to write.
- Robert C. Martin, Clean Code: A Handbook of
Agile Software Craftsmanship
All contents © MuleSoft Inc. 16
All contents © MuleSoft Inc.
The good old duplication problem.
All contents © MuleSoft Inc.
Mobile Order API
my-api.com/products?page=1&limit=50
// get, post
my-api.com/products/{product_id}
// get
my-api.com/orders/{order_id}
// get
my-api.com/orders?page=1&limit=50
// get, post
my-api.com/basket?page=1&limit=50
// get, post
my-api.com/orders/{backetitem_id}
// get
•  every collection has at least a get and post, as
well as two query parameters: page and limit
•  every item in a collection has at least a get
method
All contents © MuleSoft Inc.
All contents © MuleSoft Inc.
Duplication is the primary enemy of a well-
designed system.
- Robert C. Martin, The Robert C. Martin Clean
Code Collection
All contents © MuleSoft Inc.
Reusability &
Pattern
Core
How does RAML help?
An open spec language
designed to be human
readable and to encompass
the entire API lifecycle
Create reusable
pattern-oriented
assets shareable
across multiple
APIs
traits
resource
types
security
schemes
schemas
All contents © MuleSoft Inc.
Hoe does modularization look like?
•  You can use design patterns
•  You can reuse code (traits, resource types)
resourceTypes:	
  
	
  	
  collection:	
  
	
  	
  	
  	
  description:	
  Collection	
  of	
  available	
  <<resourcePathName>>.	
  
	
  	
  	
  	
  get:	
  
	
  	
  	
  	
  	
  	
  description:	
  Get	
  a	
  list	
  of	
  <<resourcePathName>>.	
  
	
  	
  	
  	
  	
  	
  responses:	
  
	
  	
  	
  	
  	
  	
  	
  	
  200:	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  body:	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  application/json:	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  example:	
  |	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <<exampleCollection>>	
  
	
  	
  	
  	
  	
  	
  	
  
All contents © MuleSoft Inc.
Hoe does modularization look like?
/orders:	
  
	
  	
  type:	
  	
  
	
  	
  	
  	
  collection:	
  	
  
	
  	
  	
  	
  	
  	
  exampleCollection:	
  |	
  
	
  	
  	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  "orders":	
  [	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  "id":	
  "order1"	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  ]	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  	
  	
  	
  	
  	
  	
  
All contents © MuleSoft Inc.
Data Modeling
Reusability &
Pattern
Core
RAML’s Evolution to v1.0
An open spec language
designed to be human
readable and to encompass
the entire API lifecycle
traits
resource
types
security
schemes
schemas
Libraries
Overlays &
Extensions
Typed Fragments
Increases RAMLs
core strengths
around reusability
and separation of
concerns; and
introduces a
unified,
streamlined, and
powerful way to
model data
Annotations
All contents © MuleSoft Inc.
Avoid duplication by
creating standardized
reusable patterns /
fragments
Design-first in a human-
readable format to
validate, collect
feedback, and iteratively
improve your design
Enough theory! Let’s see how to
actually do this stuff.
All contents © MuleSoft Inc.
come and visit us on
raml.org
@ramlapi
All contents © MuleSoft Inc.
and the most important
CONTRIBUTE / SEND FEEDBACK
https://github.com/raml-org/raml-spec
All contents © MuleSoft Inc.

More Related Content

What's hot

API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?
Akana
 
RAML - The architecture
RAML  - The architectureRAML  - The architecture
RAML - The architecture
Ankush Sharma
 
API for Beginners
API for BeginnersAPI for Beginners
API for Beginners
Gustavo De Vita
 
Mobile APIs: Optimizing APIs for Many Devices
Mobile APIs: Optimizing APIs for Many DevicesMobile APIs: Optimizing APIs for Many Devices
Mobile APIs: Optimizing APIs for Many Devices
Apigee | Google Cloud
 
Ebook undisturbed rest-v1 [res_tful apis]
Ebook undisturbed rest-v1 [res_tful apis]Ebook undisturbed rest-v1 [res_tful apis]
Ebook undisturbed rest-v1 [res_tful apis]
johnkbutcher
 
REST Development made Easy with ColdFusion Aether
REST Development made Easy with ColdFusion AetherREST Development made Easy with ColdFusion Aether
REST Development made Easy with ColdFusion Aether
Pavan Kumar
 
10 Steps to SEO Success
10 Steps to SEO Success 10 Steps to SEO Success
10 Steps to SEO Success
451 Marketing
 
Aye, Aye, API - What makes Technical Communicators uneasy about API document...
Aye, Aye, API  - What makes Technical Communicators uneasy about API document...Aye, Aye, API  - What makes Technical Communicators uneasy about API document...
Aye, Aye, API - What makes Technical Communicators uneasy about API document...
Ellis Pratt
 
API Technical Writing
API Technical WritingAPI Technical Writing
API Technical Writing
Sarah Maddox
 

What's hot (9)

API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?
 
RAML - The architecture
RAML  - The architectureRAML  - The architecture
RAML - The architecture
 
API for Beginners
API for BeginnersAPI for Beginners
API for Beginners
 
Mobile APIs: Optimizing APIs for Many Devices
Mobile APIs: Optimizing APIs for Many DevicesMobile APIs: Optimizing APIs for Many Devices
Mobile APIs: Optimizing APIs for Many Devices
 
Ebook undisturbed rest-v1 [res_tful apis]
Ebook undisturbed rest-v1 [res_tful apis]Ebook undisturbed rest-v1 [res_tful apis]
Ebook undisturbed rest-v1 [res_tful apis]
 
REST Development made Easy with ColdFusion Aether
REST Development made Easy with ColdFusion AetherREST Development made Easy with ColdFusion Aether
REST Development made Easy with ColdFusion Aether
 
10 Steps to SEO Success
10 Steps to SEO Success 10 Steps to SEO Success
10 Steps to SEO Success
 
Aye, Aye, API - What makes Technical Communicators uneasy about API document...
Aye, Aye, API  - What makes Technical Communicators uneasy about API document...Aye, Aye, API  - What makes Technical Communicators uneasy about API document...
Aye, Aye, API - What makes Technical Communicators uneasy about API document...
 
API Technical Writing
API Technical WritingAPI Technical Writing
API Technical Writing
 

Viewers also liked

Implementing raml in studio
Implementing raml in studioImplementing raml in studio
Implementing raml in studio
Anirban Sen Chowdhary
 
Configuring log4j2
Configuring log4j2Configuring log4j2
Configuring log4j2
Anirban Sen Chowdhary
 
Exploration with workbench with raml
Exploration with workbench with ramlExploration with workbench with raml
Exploration with workbench with raml
Anirban Sen Chowdhary
 
Picking log4j2 for mule
Picking log4j2 for mulePicking log4j2 for mule
Picking log4j2 for mule
Anirban Sen Chowdhary
 
Setting filedynamically
Setting filedynamicallySetting filedynamically
Setting filedynamically
Anirban Sen Chowdhary
 
Pragmatic REST: recent trends in API design
Pragmatic REST: recent trends in API designPragmatic REST: recent trends in API design
Pragmatic REST: recent trends in API design
Marsh Gardiner
 
Caching a simple way
Caching a simple wayCaching a simple way
Caching a simple way
Anirban Sen Chowdhary
 
Calling flow from another application 2
Calling flow from another application 2Calling flow from another application 2
Calling flow from another application 2
Anirban Sen Chowdhary
 
Getting anypoint studios all versions
Getting anypoint studios all versionsGetting anypoint studios all versions
Getting anypoint studios all versions
Anirban Sen Chowdhary
 
ApiAddicts Meetup Sept 2016, Madrid
ApiAddicts Meetup Sept 2016, MadridApiAddicts Meetup Sept 2016, Madrid
ApiAddicts Meetup Sept 2016, Madrid
Christian Heidenreich
 

Viewers also liked (10)

Implementing raml in studio
Implementing raml in studioImplementing raml in studio
Implementing raml in studio
 
Configuring log4j2
Configuring log4j2Configuring log4j2
Configuring log4j2
 
Exploration with workbench with raml
Exploration with workbench with ramlExploration with workbench with raml
Exploration with workbench with raml
 
Picking log4j2 for mule
Picking log4j2 for mulePicking log4j2 for mule
Picking log4j2 for mule
 
Setting filedynamically
Setting filedynamicallySetting filedynamically
Setting filedynamically
 
Pragmatic REST: recent trends in API design
Pragmatic REST: recent trends in API designPragmatic REST: recent trends in API design
Pragmatic REST: recent trends in API design
 
Caching a simple way
Caching a simple wayCaching a simple way
Caching a simple way
 
Calling flow from another application 2
Calling flow from another application 2Calling flow from another application 2
Calling flow from another application 2
 
Getting anypoint studios all versions
Getting anypoint studios all versionsGetting anypoint studios all versions
Getting anypoint studios all versions
 
ApiAddicts Meetup Sept 2016, Madrid
ApiAddicts Meetup Sept 2016, MadridApiAddicts Meetup Sept 2016, Madrid
ApiAddicts Meetup Sept 2016, Madrid
 

Similar to JAX London: Crafting Web APIs that Others Love: An Introduction to RAML 1.0

Manila MuleSoft Meetup #4 January 2019
Manila MuleSoft Meetup #4 January 2019Manila MuleSoft Meetup #4 January 2019
Manila MuleSoft Meetup #4 January 2019
Christopher Co
 
The forgotten route: Making Apache Camel work for you
The forgotten route: Making Apache Camel work for youThe forgotten route: Making Apache Camel work for you
The forgotten route: Making Apache Camel work for you
Rogue Wave Software
 
MuleSoft Madrid Meetup #3 slides 2nd July 2020
MuleSoft Madrid Meetup #3 slides 2nd July 2020MuleSoft Madrid Meetup #3 slides 2nd July 2020
MuleSoft Madrid Meetup #3 slides 2nd July 2020
Ieva Navickaite
 
MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...
MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...
MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...
Manish Kumar Yadav
 
Building Your API for Longevity
Building Your API for LongevityBuilding Your API for Longevity
Building Your API for Longevity
MuleSoft
 
API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages
Akana
 
API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages
Akana
 
IBM Watson & PHP, A Practical Demonstration
IBM Watson & PHP, A Practical DemonstrationIBM Watson & PHP, A Practical Demonstration
IBM Watson & PHP, A Practical Demonstration
Clark Everetts
 
MuleSoft London Community - May 2017 RAML
MuleSoft London Community - May 2017 RAMLMuleSoft London Community - May 2017 RAML
MuleSoft London Community - May 2017 RAML
Pace Integration
 
Mulesoft Connections to different companies, and different services
Mulesoft Connections to different companies, and different servicesMulesoft Connections to different companies, and different services
Mulesoft Connections to different companies, and different services
Byreddy Sravan Kumar Reddy
 
Riyadh Meetup4- Sonarqube for Mule 4 Code review
Riyadh Meetup4- Sonarqube for Mule 4 Code reviewRiyadh Meetup4- Sonarqube for Mule 4 Code review
Riyadh Meetup4- Sonarqube for Mule 4 Code review
satyasekhar123
 
Learn mulesoft from scratch
Learn mulesoft from scratchLearn mulesoft from scratch
Learn mulesoft from scratch
Nikhil More
 
Front-End Web Development
Front-End Web DevelopmentFront-End Web Development
Front-End Web Development
Yash Sati
 
unit1 part 1 sem4 php.docx
unit1 part 1 sem4 php.docxunit1 part 1 sem4 php.docx
unit1 part 1 sem4 php.docx
charvi parth Lastpatel
 
Top 7 wrong common beliefs about Enterprise API implementation
Top 7 wrong common beliefs about Enterprise API implementationTop 7 wrong common beliefs about Enterprise API implementation
Top 7 wrong common beliefs about Enterprise API implementation
OCTO Technology
 
Octo API-days 2015
Octo API-days 2015Octo API-days 2015
Octo API-days 2015
Antoine CHANTALOU
 
Workshop Trends In Open Source Tech 1 20 10
Workshop Trends In Open Source Tech 1 20 10Workshop Trends In Open Source Tech 1 20 10
Workshop Trends In Open Source Tech 1 20 10
NuRelm
 
Manila MuleSoft Meetup - July 2019
Manila MuleSoft Meetup - July 2019Manila MuleSoft Meetup - July 2019
Manila MuleSoft Meetup - July 2019
Ryan Anthony Andal
 
API Description Languages: Which Is The Right One For Me?
 API Description Languages: Which Is The Right One For Me?  API Description Languages: Which Is The Right One For Me?
API Description Languages: Which Is The Right One For Me?
ProgrammableWeb
 
West Yorkshire Mulesoft Meetup #6
West Yorkshire Mulesoft Meetup #6West Yorkshire Mulesoft Meetup #6
West Yorkshire Mulesoft Meetup #6
Francis Edwards
 

Similar to JAX London: Crafting Web APIs that Others Love: An Introduction to RAML 1.0 (20)

Manila MuleSoft Meetup #4 January 2019
Manila MuleSoft Meetup #4 January 2019Manila MuleSoft Meetup #4 January 2019
Manila MuleSoft Meetup #4 January 2019
 
The forgotten route: Making Apache Camel work for you
The forgotten route: Making Apache Camel work for youThe forgotten route: Making Apache Camel work for you
The forgotten route: Making Apache Camel work for you
 
MuleSoft Madrid Meetup #3 slides 2nd July 2020
MuleSoft Madrid Meetup #3 slides 2nd July 2020MuleSoft Madrid Meetup #3 slides 2nd July 2020
MuleSoft Madrid Meetup #3 slides 2nd July 2020
 
MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...
MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...
MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...
 
Building Your API for Longevity
Building Your API for LongevityBuilding Your API for Longevity
Building Your API for Longevity
 
API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages
 
API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages
 
IBM Watson & PHP, A Practical Demonstration
IBM Watson & PHP, A Practical DemonstrationIBM Watson & PHP, A Practical Demonstration
IBM Watson & PHP, A Practical Demonstration
 
MuleSoft London Community - May 2017 RAML
MuleSoft London Community - May 2017 RAMLMuleSoft London Community - May 2017 RAML
MuleSoft London Community - May 2017 RAML
 
Mulesoft Connections to different companies, and different services
Mulesoft Connections to different companies, and different servicesMulesoft Connections to different companies, and different services
Mulesoft Connections to different companies, and different services
 
Riyadh Meetup4- Sonarqube for Mule 4 Code review
Riyadh Meetup4- Sonarqube for Mule 4 Code reviewRiyadh Meetup4- Sonarqube for Mule 4 Code review
Riyadh Meetup4- Sonarqube for Mule 4 Code review
 
Learn mulesoft from scratch
Learn mulesoft from scratchLearn mulesoft from scratch
Learn mulesoft from scratch
 
Front-End Web Development
Front-End Web DevelopmentFront-End Web Development
Front-End Web Development
 
unit1 part 1 sem4 php.docx
unit1 part 1 sem4 php.docxunit1 part 1 sem4 php.docx
unit1 part 1 sem4 php.docx
 
Top 7 wrong common beliefs about Enterprise API implementation
Top 7 wrong common beliefs about Enterprise API implementationTop 7 wrong common beliefs about Enterprise API implementation
Top 7 wrong common beliefs about Enterprise API implementation
 
Octo API-days 2015
Octo API-days 2015Octo API-days 2015
Octo API-days 2015
 
Workshop Trends In Open Source Tech 1 20 10
Workshop Trends In Open Source Tech 1 20 10Workshop Trends In Open Source Tech 1 20 10
Workshop Trends In Open Source Tech 1 20 10
 
Manila MuleSoft Meetup - July 2019
Manila MuleSoft Meetup - July 2019Manila MuleSoft Meetup - July 2019
Manila MuleSoft Meetup - July 2019
 
API Description Languages: Which Is The Right One For Me?
 API Description Languages: Which Is The Right One For Me?  API Description Languages: Which Is The Right One For Me?
API Description Languages: Which Is The Right One For Me?
 
West Yorkshire Mulesoft Meetup #6
West Yorkshire Mulesoft Meetup #6West Yorkshire Mulesoft Meetup #6
West Yorkshire Mulesoft Meetup #6
 

Recently uploaded

WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
Alina Yurenko
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative AnalysisOdoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Envertis Software Solutions
 
Top 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptxTop 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptx
devvsandy
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
Mobile app Development Services | Drona Infotech
Mobile app Development Services  | Drona InfotechMobile app Development Services  | Drona Infotech
Mobile app Development Services | Drona Infotech
Drona Infotech
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
VALiNTRY360
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
Peter Muessig
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
ssuserad3af4
 

Recently uploaded (20)

WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative AnalysisOdoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
 
Top 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptxTop 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptx
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
Mobile app Development Services | Drona Infotech
Mobile app Development Services  | Drona InfotechMobile app Development Services  | Drona Infotech
Mobile app Development Services | Drona Infotech
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
 

JAX London: Crafting Web APIs that Others Love: An Introduction to RAML 1.0

  • 1. Crafting Web APIs that Others Love An Introduction to RAML 1.0
  • 2. All contents © MuleSoft Inc. About Me •  API Addict •  Technology = Love •  Developer & Open Source Contributor •  Traveler or such •  Community Product Manager @ MuleSoft @ChristianVogel_
  • 3. All contents © MuleSoft Inc. Expectations vs Reality APIs are not designed with their consumers in mind
  • 4. All contents © MuleSoft Inc. Imagine you’re building a city using Legos. “I want my city to have a fire department, a police department, and a park.”
  • 5. All contents © MuleSoft Inc.
  • 6. All contents © MuleSoft Inc.
  • 7. All contents © MuleSoft Inc. You didn’t have any specs…
  • 8. All contents © MuleSoft Inc. Spec Driven Development – Design before Code Design Code
  • 9. All contents © MuleSoft Inc. Spec Driven Development – Be Agile Design Code
  • 10. All contents © MuleSoft Inc. The goal is that by utilizing agile user testing, carefully designing, and prototyping your API in an iterative state, that most design related issues have already been discovered and resolved. Allowing you to develop fearlessly. - Mike Stowe
  • 11. All contents © MuleSoft Inc. Some of Today’s Top Spec Formats
  • 12. All contents © MuleSoft Inc. Let me introduce you to RAML
  • 13. All contents © MuleSoft Inc. Design and Document your APIs in a single file An open spec language designed to be human readable and to encompass the entire API lifecycle Core What is RAML?
  • 14. All contents © MuleSoft Inc. What does RAML look like? #%RAML  0.8       title:  World  Music  API   baseUri:  http://example.api.com/{version}   version:  v1     /playlist:  #  resource      get:  #  HTTP  method          responses:              200:  #  HTTP  response  code                  body:                      application/json:  #  HTTP  response  media  type                              example:  |                              {                                    “playlistID”  :  1,                                                “playlistName”  :  “My  Awesome  Playlist”,                                          “genre”                :  “top40”,                                  “songs”                :  40                              }            
  • 15. All contents © MuleSoft Inc. Indeed, the ratio of time spent reading versus writing is well over 10 to 1. We are constantly reading old code as part of the effort to write new code. ...[Therefore,] making it easy to read makes it easier to write. - Robert C. Martin, Clean Code: A Handbook of Agile Software Craftsmanship
  • 16. All contents © MuleSoft Inc. 16
  • 17. All contents © MuleSoft Inc. The good old duplication problem.
  • 18. All contents © MuleSoft Inc. Mobile Order API my-api.com/products?page=1&limit=50 // get, post my-api.com/products/{product_id} // get my-api.com/orders/{order_id} // get my-api.com/orders?page=1&limit=50 // get, post my-api.com/basket?page=1&limit=50 // get, post my-api.com/orders/{backetitem_id} // get •  every collection has at least a get and post, as well as two query parameters: page and limit •  every item in a collection has at least a get method
  • 19. All contents © MuleSoft Inc.
  • 20. All contents © MuleSoft Inc. Duplication is the primary enemy of a well- designed system. - Robert C. Martin, The Robert C. Martin Clean Code Collection
  • 21. All contents © MuleSoft Inc. Reusability & Pattern Core How does RAML help? An open spec language designed to be human readable and to encompass the entire API lifecycle Create reusable pattern-oriented assets shareable across multiple APIs traits resource types security schemes schemas
  • 22. All contents © MuleSoft Inc. Hoe does modularization look like? •  You can use design patterns •  You can reuse code (traits, resource types) resourceTypes:      collection:          description:  Collection  of  available  <<resourcePathName>>.          get:              description:  Get  a  list  of  <<resourcePathName>>.              responses:                  200:                      body:                          application/json:                              example:  |                                  <<exampleCollection>>                
  • 23. All contents © MuleSoft Inc. Hoe does modularization look like? /orders:      type:            collection:                exampleCollection:  |                  {                      "orders":  [                          {                              "id":  "order1"                          }                      ]                  }              
  • 24. All contents © MuleSoft Inc. Data Modeling Reusability & Pattern Core RAML’s Evolution to v1.0 An open spec language designed to be human readable and to encompass the entire API lifecycle traits resource types security schemes schemas Libraries Overlays & Extensions Typed Fragments Increases RAMLs core strengths around reusability and separation of concerns; and introduces a unified, streamlined, and powerful way to model data Annotations
  • 25. All contents © MuleSoft Inc. Avoid duplication by creating standardized reusable patterns / fragments Design-first in a human- readable format to validate, collect feedback, and iteratively improve your design
  • 26. Enough theory! Let’s see how to actually do this stuff.
  • 27. All contents © MuleSoft Inc. come and visit us on raml.org @ramlapi
  • 28. All contents © MuleSoft Inc. and the most important CONTRIBUTE / SEND FEEDBACK https://github.com/raml-org/raml-spec
  • 29. All contents © MuleSoft Inc.