REST Easy - Building RESTful Services in Zend Framework
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

REST Easy - Building RESTful Services in Zend Framework

  • 3,531 views
Uploaded on

The epicenter of data sharing in "Web 2.0" are web services. Whether you like it or not, you are consuming literally hundreds of services a day, whether it be searching in Google, running Facebook......

The epicenter of data sharing in "Web 2.0" are web services. Whether you like it or not, you are consuming literally hundreds of services a day, whether it be searching in Google, running Facebook on your mobile device, or searching the App Store on your tablet. Yet, despite our hunger for services, few have ever written one. In this session, you'll learn what are RESTful web services and how to get started creating them in Zend Framework.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,531
On Slideshare
3,527
From Embeds
4
Number of Embeds
3

Actions

Shares
Downloads
22
Comments
0
Likes
1

Embeds 4

https://www.linkedin.com 2
http://coderwall.com 1
http://www.slashdocs.com 1

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
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Transcript

  • 1. REST EasyBuilding RESTful Services in Zend Framework
  • 2. Me• Fightin’ Texas Aggie• .Net and PHP Developer• UNIX and Windows Sysadmin• Senior Consultant at Improving Enterprises• chris@chrisweldon.net
  • 3. Twitter Promotion
  • 4. Twitter Promotion• @neraath
  • 5. Twitter Promotion• @neraath• #bcsphp
  • 6. Twitter Promotion• @neraath• #bcsphp• #rest
  • 7. Twitter Promotion• @neraath• #bcsphp• #rest• #thisguyisawesome
  • 8. Twitter Promotion• @neraath• #bcsphp• #rest• #thisguyisawesome• #bestspeakerever
  • 9. Twitter Promotion• @neraath• #bcsphp• #rest• #thisguyisawesome• #bestspeakerever• #horriblepresenter
  • 10. Twitter Promotion• @neraath• #bcsphp• #rest• #thisguyisawesome• #bestspeakerever• #horriblepresenter• #omgshootme
  • 11. Agile, Microsoft, Open Technologies, UXApplied Training, Coaching, MentoringCertified ConsultingRural SourcingRecruiting Services
  • 12. REST
  • 13. REpresentational State Transfer
  • 14. Why REST?
  • 15. Scalability
  • 16. ArchitectureIndependence
  • 17. Resource Addressing and Management
  • 18. Self-Describing Messages
  • 19. REST is NOT
  • 20. SOAP is Fugly<?xml version="1.0"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:Header> </soap:Header> <soap:Body> <m:GetStockPrice xmlns:m="http://www.example.org/stock"> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </soap:Body></soap:Envelope>
  • 21. RESTs Beauty is in HTTP Verbs
  • 22. http://www.example.org/stock/price/IBM
  • 23. GETRequestGET /stock/price/IBM HTTP/1.1Host: www.example.orgUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4)Accept-Encoding: gzipAccept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7Cache-Control: no-cacheAccept-Language: de,en;q=0.7,en-us;q=0.3Responsedate: Thu, 21 Jun 2012 21:55:57 GMTversion: HTTP/1.1status: 200 OKcontent-length: 26550content-type: text/html; charset=UTF-8cache-control: private, max-age=0expires: -1
  • 24. POSTRequestPOST /stock/price/IBM HTTP/1.1Host: www.example.orgCache-Control: max-age=0User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4)Content-Type: application/x-www-form-urlencodedAccept: text/html,application/xhtml+xml;q=0.9,*/*;q=0.8currentPrice:193.39delta:-5.39locale:en_USResponseDate: Thu, 21 Jun 2012 21:55:57 GMTVersion: HTTP/1.1Status: 201 CREATEDLocation: /stock/price/IBM
  • 25. PUTRequestPUT /stock/price/IBM HTTP/1.1Host: www.example.orgCache-Control: max-age=0User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4)Content-Type: application/x-www-form-urlencodedAccept: text/html,application/xhtml+xml;q=0.9,*/*;q=0.8currentPrice:193.39delta:-5.39locale:en_USResponseDate: Thu, 21 Jun 2012 21:55:57 GMTVersion: HTTP/1.1Status: 200 OK
  • 26. DELETERequestDELETE /stock/price/IBM HTTP/1.1Host: www.example.orgUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4)Accept-Encoding: gzipAccept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7Cache-Control: no-cacheAccept-Language: de,en;q=0.7,en-us;q=0.3Responsedate: Thu, 21 Jun 2012 21:55:57 GMTversion: HTTP/1.1status: 204 NO CONTENT
  • 27. Status Codes are Your Friend
  • 28. 200 =
  • 29. 201 = Created
  • 30. 204 = ?
  • 31. 301 = ?
  • 32. 401 = ?
  • 33. 404, 500, etc.
  • 34. REST Supports{ “person”: { “name”: “Chris Weldon”, “email”: “chris@chrisweldon.net” }}
  • 35. REST Supports<?xml version=”1.0”?><person> <name>Chris Weldon</name> <email>chris@chrisweldon.net</name></person>
  • 36. REST Supports ...
  • 37. DEMO
  • 38. Thanks!spkr8.com/neraath