wangyaodi@gmail.com	     2011/07/24	  Copyright 2010, Intridea Inc. All Rights Reserved.
About Me	                     Symbol - yorzi	                      Details - about.me/wangyaodi                      	   ...
What’s Grape?	    Copyright 2010, Intridea Inc. All Rights Reserved.
Copyright 2010, Intridea Inc. All Rights Reserved.
https://github.com/mbleigh	     https://github.com/intridea/omniauth	https://github.com/mbleigh/acts-as-taggable-on	      ...
Ok, BUTWhat’s Grape?	    Copyright 2010, Intridea Inc. All Rights Reserved.
“An opinionated      micro-framework     for creating REST-like         APIs in Ruby”	        https://github.com/intridea/...
Ruby makes hard  things easy	     Copyright 2010, Intridea Inc. All Rights Reserved.
But APIs still aren’t easy	    Copyright 2010, Intridea Inc. All Rights Reserved.
APIs in Rails are too entangled	     Copyright 2010, Intridea Inc. All Rights Reserved.
APIs in Sinatra are   too manual	      Copyright 2010, Intridea Inc. All Rights Reserved.
Copyright 2010, Intridea Inc. All Rights Reserved.
Copyright 2010, Intridea Inc. All Rights Reserved.
How To Use Grape?	      Copyright 2010, Intridea Inc. All Rights Reserved.
Copyright 2010, Intridea Inc. All Rights Reserved.
Remember:    Grape APIs are   Rack applications	http://ruby.about.com/od/rack/a/What-Is-Rack.htm	                 Copyrigh...
Basic API	  Copyright 2010, Intridea Inc. All Rights Reserved.
Result,JSON Serialization	      Copyright 2010, Intridea Inc. All Rights Reserved.
Add Prefix	  Copyright 2010, Intridea Inc. All Rights Reserved.
Add Version   Copyright 2010, Intridea Inc. All Rights Reserved.
Add Namespace     Copyright 2010, Intridea Inc. All Rights Reserved.
Other Namespacing     Key words	      Copyright 2010, Intridea Inc. All Rights Reserved.
Add Basic Auth     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.
Error Details	   Copyright 2010, Intridea Inc. All Rights Reserved.
How To Run Grape APIs?	     Copyright 2010, Intridea Inc. All Rights Reserved.
Remember: Grape APIs areRack applications	      Copyright 2010, Intridea Inc. All Rights Reserved.
Run As a Rack App	Run `rackup` in Rack App(API) folder	          Copyright 2010, Intridea Inc. All Rights Reserved.
Grape with Rails 2.3.x	        Copyright 2010, Intridea Inc. All Rights Reserved.
Grape with Rails 3.x	       Copyright 2010, Intridea Inc. All Rights Reserved.
Any Future Feature?       YES!	        Copyright 2010, Intridea Inc. All Rights Reserved.
Near Future	         *Support for XML formatting	        *Multiple-file APIs (modularity)	   *OAuth 1.0a and 2.0 authentica...
Medium Future	YARD extensions for self-documenting APIs	    Plugin System for easy extension	           Internal API Acces...
Far Future	Streaming API support	   PubSubHubBub	    Copyright 2010, Intridea Inc. All Rights Reserved.
Resources  References	     RubyConf 2010 presentation about Grape.	 http://confreaks.net/videos/475-rubyconf2010-the-     ...
Demo  Sample	    Demo API with Sinatra App.	https://github.com/mbleigh/conf_ask	http://www.arailsdemo.com/posts/30	   Well...
Copyright 2010, Intridea Inc. All Rights Reserved.
Thank You!	   Copyright 2010, Intridea Inc. All Rights Reserved.
Upcoming SlideShare
Loading in …5
×

Rapid-ruby-api-on-grape

10,086 views

Published on

this presentation is for a Rails Meetup event which happened on July 24th 2011, Beijing.

Published in: Technology
1 Comment
22 Likes
Statistics
Notes
No Downloads
Views
Total views
10,086
On SlideShare
0
From Embeds
0
Number of Embeds
24
Actions
Shares
0
Downloads
98
Comments
1
Likes
22
Embeds 0
No embeds

No notes for slide

Rapid-ruby-api-on-grape

  1. 1. wangyaodi@gmail.com 2011/07/24 Copyright 2010, Intridea Inc. All Rights Reserved.
  2. 2. About Me  Symbol - yorzi Details - about.me/wangyaodi Senior Engineer at Intridea Inc. More Links:  http://github.com/yorzi  http://twitter.com/yorzi Andy Wang  http://more-sites/yorzi Copyright 2010, Intridea Inc. All Rights Reserved.
  3. 3. What’s Grape? Copyright 2010, Intridea Inc. All Rights Reserved.
  4. 4. Copyright 2010, Intridea Inc. All Rights Reserved.
  5. 5. https://github.com/mbleigh https://github.com/intridea/omniauth https://github.com/mbleigh/acts-as-taggable-on Copyright 2010, Intridea Inc. All Rights Reserved.
  6. 6. Ok, BUTWhat’s Grape? Copyright 2010, Intridea Inc. All Rights Reserved.
  7. 7. “An opinionated micro-framework for creating REST-like APIs in Ruby” https://github.com/intridea/grape http://www.infoq.com/articles/rest-introduction Copyright 2010, Intridea Inc. All Rights Reserved.
  8. 8. Ruby makes hard things easy Copyright 2010, Intridea Inc. All Rights Reserved.
  9. 9. But APIs still aren’t easy Copyright 2010, Intridea Inc. All Rights Reserved.
  10. 10. APIs in Rails are too entangled Copyright 2010, Intridea Inc. All Rights Reserved.
  11. 11. APIs in Sinatra are too manual Copyright 2010, Intridea Inc. All Rights Reserved.
  12. 12. Copyright 2010, Intridea Inc. All Rights Reserved.
  13. 13. Copyright 2010, Intridea Inc. All Rights Reserved.
  14. 14. How To Use Grape? Copyright 2010, Intridea Inc. All Rights Reserved.
  15. 15. Copyright 2010, Intridea Inc. All Rights Reserved.
  16. 16. Remember: Grape APIs are Rack applications http://ruby.about.com/od/rack/a/What-Is-Rack.htm Copyright 2010, Intridea Inc. All Rights Reserved.
  17. 17. Basic API Copyright 2010, Intridea Inc. All Rights Reserved.
  18. 18. Result,JSON Serialization Copyright 2010, Intridea Inc. All Rights Reserved.
  19. 19. Add Prefix Copyright 2010, Intridea Inc. All Rights Reserved.
  20. 20. Add Version Copyright 2010, Intridea Inc. All Rights Reserved.
  21. 21. Add Namespace Copyright 2010, Intridea Inc. All Rights Reserved.
  22. 22. Other Namespacing Key words Copyright 2010, Intridea Inc. All Rights Reserved.
  23. 23. Add Basic Auth Copyright 2010, Intridea Inc. All Rights Reserved.
  24. 24. Use Helpers Copyright 2010, Intridea Inc. All Rights Reserved.
  25. 25. Raise Error Copyright 2010, Intridea Inc. All Rights Reserved.
  26. 26. Error Details Copyright 2010, Intridea Inc. All Rights Reserved.
  27. 27. How To Run Grape APIs? Copyright 2010, Intridea Inc. All Rights Reserved.
  28. 28. Remember: Grape APIs areRack applications Copyright 2010, Intridea Inc. All Rights Reserved.
  29. 29. Run As a Rack App Run `rackup` in Rack App(API) folder Copyright 2010, Intridea Inc. All Rights Reserved.
  30. 30. Grape with Rails 2.3.x Copyright 2010, Intridea Inc. All Rights Reserved.
  31. 31. Grape with Rails 3.x Copyright 2010, Intridea Inc. All Rights Reserved.
  32. 32. Any Future Feature? YES! Copyright 2010, Intridea Inc. All Rights Reserved.
  33. 33. Near Future *Support for XML formatting *Multiple-file APIs (modularity) *OAuth 1.0a and 2.0 authentication support Filters/Callbacks https://github.com/makandra/modularity http://code.dblock.org/modularizing-a-ror-grape-api Copyright 2010, Intridea Inc. All Rights Reserved.
  34. 34. Medium Future YARD extensions for self-documenting APIs Plugin System for easy extension Internal API Access Rate Limiting Lifecycle Automation Copyright 2010, Intridea Inc. All Rights Reserved.
  35. 35. Far Future Streaming API support PubSubHubBub Copyright 2010, Intridea Inc. All Rights Reserved.
  36. 36. Resources References RubyConf 2010 presentation about Grape. http://confreaks.net/videos/475-rubyconf2010-the- grapes-of-rapid https://github.com/downloads/intridea/grape/The %20Grapes%20of%20Rapid.pdf Example Rails implementation http://martinciu.com/2011/01/mounting-grape-api- inside-rails-application.html Copyright 2010, Intridea Inc. All Rights Reserved.
  37. 37. Demo Sample Demo API with Sinatra App. https://github.com/mbleigh/conf_ask http://www.arailsdemo.com/posts/30 Well Documented Sample API. https://gist.github.com/892282 Copyright 2010, Intridea Inc. All Rights Reserved.
  38. 38. Copyright 2010, Intridea Inc. All Rights Reserved.
  39. 39. Thank You! Copyright 2010, Intridea Inc. All Rights Reserved.

×