Your SlideShare is downloading. ×
0
Ruby and Sinatra's Shotgun Wedding
Ruby and Sinatra's Shotgun Wedding
Ruby and Sinatra's Shotgun Wedding
Ruby and Sinatra's Shotgun Wedding
Ruby and Sinatra's Shotgun Wedding
Ruby and Sinatra's Shotgun Wedding
Ruby and Sinatra's Shotgun Wedding
Ruby and Sinatra's Shotgun Wedding
Ruby and Sinatra's Shotgun Wedding
Ruby and Sinatra's Shotgun Wedding
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Ruby and Sinatra's Shotgun Wedding

2,130

Published on

A presentation for Barcamp Nashville 2011 by @jaminguy

A presentation for Barcamp Nashville 2011 by @jaminguy

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,130
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    • 1. Ruby and Sinatra’sshotgun wedding @jaminguy #bcn11
    • 2. Overview• WTF is REST?• Sinatra and Ruby• Case Study (0_0)• Q &A
    • 3. WTF is REST?• Created in 2000 by Roy Fielding in his doctoral dissertation• Representational state transfer• WWW is largest implementation of REST
    • 4. Ummm... The key abstraction of information in REST is a resource. Any information that can be named can be a resource: a document or image, a temporal service (e.g. “today’s weather in Los Angeles”), a collection of other resources, a non-virtual object (e.g. a person), and so on. In other words, any concept that might be the target of an author’s hypertext reference must fit within the definition of a resource. A resource is a conceptual mapping to a set of entities, not the entity that corresponds to the mapping at any particular point in time.http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm#sec_5_2_1_1
    • 5. WTF?RESTful applications maximize theuse of the pre-existing, well-definedinterface and other built-incapabilities provided by the chosennetwork protocol, and minimizethe addition of new application-specific features on top of it. http://en.wikipedia.org/wiki/REST
    • 6. Oooo shiny!
    • 7. HTTP is RESTful!• Methods (verbs) GET, PUT, POST, DELETE• URIs (nouns) map entities to endpoints• Use response codes for success/error 200 OK (content is in response body) 204 No Content 404 Not Found 500 Internal Server Error
    • 8. and Sinatra!• Sinatra is a DSL for quickly creating web applications in Ruby # myapp.rb require rubygems require sinatra get / do Hello world! end
    • 9. get / do .. show something ..endpost / do .. create something ..endput / do .. replace something ..enddelete / do .. annihilate something ..end
    • 10. • http://about.me/jaminguy• http://bitly.com/bundles/jaminguy/2

    ×