SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
Copyright 2010, Intridea Inc. All Rights Reserved.	

RESTful API
On Grape
andy@intridea.com
2013/07/27 @XianOpenParty
Copyright 2010, Intridea Inc. All Rights Reserved.	

Introduction
王要弟 == Andy Wang
WangYaodi.com
Senior Ruby/Rails Enginner @intridea
Weibo/Twitter/Github/RubyChina: @yorzi
Copyright 2010, Intridea Inc. All Rights Reserved.	

What’s Grape?
Copyright 2010, Intridea Inc. All Rights Reserved.	

Generalized
Rapid
APIs
Erector
https://github.com/intridea/grape/blob/master/README.md
Copyright 2010, Intridea Inc. All Rights Reserved.	

“An opinionated
micro-framework
for creating RESTful
APIs in Ruby”
Copyright 2010, Intridea Inc. All Rights Reserved.	

REpresentational
State
Transfer	

http://www.ruanyifeng.com/blog/2011/09/restful.html
Copyright 2010, Intridea Inc. All Rights Reserved.	

Grape APIs are
Rack applications
Copyright 2010, Intridea Inc. All Rights Reserved.	

http://guides.rubyonrails.org/rails_on_rack.html
Copyright 2010, Intridea Inc. All Rights Reserved.	

Basic API
Copyright 2010, Intridea Inc. All Rights Reserved.
Copyright 2010, Intridea Inc. All Rights Reserved.	

Add Prefix
Copyright 2010, Intridea Inc. All Rights Reserved.	

Add Namespace
Copyright 2010, Intridea Inc. All Rights Reserved.	

Add Version
Copyright 2010, Intridea Inc. All Rights Reserved.	

Authentication
Copyright 2010, Intridea Inc. All Rights Reserved.	

Use Helpers
Copyright 2010, Intridea Inc. All Rights Reserved.	

Raise Error
Copyright 2010, Intridea Inc. All Rights Reserved.	

Exception Handling
Copyright 2010, Intridea Inc. All Rights Reserved.	

JSONP & CORS
Copyright 2010, Intridea Inc. All Rights Reserved.	

Rabl Template
Copyright 2010, Intridea Inc. All Rights Reserved.	

Cookies
Copyright 2010, Intridea Inc. All Rights Reserved.	

Redirecting
Copyright 2010, Intridea Inc. All Rights Reserved.	

Logging
Copyright 2010, Intridea Inc. All Rights Reserved.	

https://github.com/intridea/grape/blob/master/README.md	

More Features
Copyright 2010, Intridea Inc. All Rights Reserved.	

Run Rack App
Copyright 2010, Intridea Inc. All Rights Reserved.	

Work with Rails
Copyright 2010, Intridea Inc. All Rights Reserved.	

Resources
https://github.com/intridea/grape/wiki
Copyright 2010, Intridea Inc. All Rights Reserved.	

Question?
Copyright 2010, Intridea Inc. All Rights Reserved.	

Thank You!

Contenu connexe

Similaire à Restful API On Grape

Build Blog As a Professional
Build Blog As a ProfessionalBuild Blog As a Professional
Build Blog As a ProfessionalAndy Wang
 
Riding on rails3 with full stack of gems
Riding on rails3 with full stack of gemsRiding on rails3 with full stack of gems
Riding on rails3 with full stack of gemsAndy Wang
 
Android Development: Approach for Agile Teams
Android Development: Approach for Agile TeamsAndroid Development: Approach for Agile Teams
Android Development: Approach for Agile TeamsAnay Kamat
 
At&T Interactive: The Many Facets Of Ruby
At&T Interactive: The Many Facets Of RubyAt&T Interactive: The Many Facets Of Ruby
At&T Interactive: The Many Facets Of RubyCoby Randquist
 
Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09Shaer Hassan
 
Ionic adventures - Hybrid Mobile App Development rocks
Ionic adventures - Hybrid Mobile App Development rocksIonic adventures - Hybrid Mobile App Development rocks
Ionic adventures - Hybrid Mobile App Development rocksJuarez Filho
 
How to Plan Web Development Career the Right way?
How to Plan Web Development Career the Right way?How to Plan Web Development Career the Right way?
How to Plan Web Development Career the Right way?Intellipaat
 
REST API Doc Best Practices
REST API Doc Best PracticesREST API Doc Best Practices
REST API Doc Best PracticesMarta Rauch
 
SoundCloud API Do:s and Don't:s
SoundCloud API Do:s and Don't:sSoundCloud API Do:s and Don't:s
SoundCloud API Do:s and Don't:sEric Wahlforss
 
Cross platform mobile apps using rhomobile and jquery mobile
Cross platform mobile apps using rhomobile and jquery mobileCross platform mobile apps using rhomobile and jquery mobile
Cross platform mobile apps using rhomobile and jquery mobileSPRITLE SOFTWARE PRIVATE LIMIT ED
 
Microservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and DockerMicroservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and DockerDhilipsiva DS
 
Ruby Kaigi09 China Rubyupdate20090718
Ruby Kaigi09 China Rubyupdate20090718Ruby Kaigi09 China Rubyupdate20090718
Ruby Kaigi09 China Rubyupdate20090718tengu
 
Api Lifecycle Operation with Open Source Products
Api Lifecycle Operation with Open Source ProductsApi Lifecycle Operation with Open Source Products
Api Lifecycle Operation with Open Source ProductsDevOps Indonesia
 
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016Prateek Jain
 
Application Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoftApplication Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoftBui Kiet
 
OSS Tools: Creating a Reverse Engineering Plug-in for r2frida
OSS Tools: Creating a Reverse Engineering Plug-in for r2fridaOSS Tools: Creating a Reverse Engineering Plug-in for r2frida
OSS Tools: Creating a Reverse Engineering Plug-in for r2fridaNowSecure
 
Social networking api for Android Developers
Social networking api for Android DevelopersSocial networking api for Android Developers
Social networking api for Android DevelopersSatyam Twanabasu
 

Similaire à Restful API On Grape (20)

Build Blog As a Professional
Build Blog As a ProfessionalBuild Blog As a Professional
Build Blog As a Professional
 
Riding on rails3 with full stack of gems
Riding on rails3 with full stack of gemsRiding on rails3 with full stack of gems
Riding on rails3 with full stack of gems
 
Android Development: Approach for Agile Teams
Android Development: Approach for Agile TeamsAndroid Development: Approach for Agile Teams
Android Development: Approach for Agile Teams
 
At&T Interactive: The Many Facets Of Ruby
At&T Interactive: The Many Facets Of RubyAt&T Interactive: The Many Facets Of Ruby
At&T Interactive: The Many Facets Of Ruby
 
Designing an API
Designing an APIDesigning an API
Designing an API
 
Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09
 
Ionic adventures - Hybrid Mobile App Development rocks
Ionic adventures - Hybrid Mobile App Development rocksIonic adventures - Hybrid Mobile App Development rocks
Ionic adventures - Hybrid Mobile App Development rocks
 
Hybrid mobile apps
Hybrid mobile appsHybrid mobile apps
Hybrid mobile apps
 
How to Plan Web Development Career the Right way?
How to Plan Web Development Career the Right way?How to Plan Web Development Career the Right way?
How to Plan Web Development Career the Right way?
 
REST API Doc Best Practices
REST API Doc Best PracticesREST API Doc Best Practices
REST API Doc Best Practices
 
SoundCloud API Do:s and Don't:s
SoundCloud API Do:s and Don't:sSoundCloud API Do:s and Don't:s
SoundCloud API Do:s and Don't:s
 
Cross platform mobile apps using rhomobile and jquery mobile
Cross platform mobile apps using rhomobile and jquery mobileCross platform mobile apps using rhomobile and jquery mobile
Cross platform mobile apps using rhomobile and jquery mobile
 
Microservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and DockerMicroservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and Docker
 
Ruby Kaigi09 China Rubyupdate20090718
Ruby Kaigi09 China Rubyupdate20090718Ruby Kaigi09 China Rubyupdate20090718
Ruby Kaigi09 China Rubyupdate20090718
 
Api Lifecycle Operation with Open Source Products
Api Lifecycle Operation with Open Source ProductsApi Lifecycle Operation with Open Source Products
Api Lifecycle Operation with Open Source Products
 
Node.js as an IOT Bridge
Node.js as an IOT BridgeNode.js as an IOT Bridge
Node.js as an IOT Bridge
 
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
 
Application Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoftApplication Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoft
 
OSS Tools: Creating a Reverse Engineering Plug-in for r2frida
OSS Tools: Creating a Reverse Engineering Plug-in for r2fridaOSS Tools: Creating a Reverse Engineering Plug-in for r2frida
OSS Tools: Creating a Reverse Engineering Plug-in for r2frida
 
Social networking api for Android Developers
Social networking api for Android DevelopersSocial networking api for Android Developers
Social networking api for Android Developers
 

Plus de Andy Wang

构建微信公众平台应用
构建微信公众平台应用构建微信公众平台应用
构建微信公众平台应用Andy Wang
 
WeChat Platform Introduction
WeChat Platform IntroductionWeChat Platform Introduction
WeChat Platform IntroductionAndy Wang
 
HTML5 Storage/Cache
HTML5 Storage/CacheHTML5 Storage/Cache
HTML5 Storage/CacheAndy Wang
 
远程工作那些事儿
远程工作那些事儿远程工作那些事儿
远程工作那些事儿Andy Wang
 
The Mina Way
The Mina WayThe Mina Way
The Mina WayAndy Wang
 
Map Basics For Noob
Map Basics For NoobMap Basics For Noob
Map Basics For NoobAndy Wang
 
Join In OpenSource
Join In OpenSourceJoin In OpenSource
Join In OpenSourceAndy Wang
 
Git Workflow Practice
Git Workflow PracticeGit Workflow Practice
Git Workflow PracticeAndy Wang
 

Plus de Andy Wang (8)

构建微信公众平台应用
构建微信公众平台应用构建微信公众平台应用
构建微信公众平台应用
 
WeChat Platform Introduction
WeChat Platform IntroductionWeChat Platform Introduction
WeChat Platform Introduction
 
HTML5 Storage/Cache
HTML5 Storage/CacheHTML5 Storage/Cache
HTML5 Storage/Cache
 
远程工作那些事儿
远程工作那些事儿远程工作那些事儿
远程工作那些事儿
 
The Mina Way
The Mina WayThe Mina Way
The Mina Way
 
Map Basics For Noob
Map Basics For NoobMap Basics For Noob
Map Basics For Noob
 
Join In OpenSource
Join In OpenSourceJoin In OpenSource
Join In OpenSource
 
Git Workflow Practice
Git Workflow PracticeGit Workflow Practice
Git Workflow Practice
 

Dernier

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Dernier (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Restful API On Grape