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

REST Easy - Building RESTful Services in Zend Framework

on

  • 3,364 views

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 ...

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.

Statistics

Views

Total Views
3,364
Views on SlideShare
3,361
Embed Views
3

Actions

Likes
1
Downloads
20
Comments
0

3 Embeds 3

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

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \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

REST Easy - Building RESTful Services in Zend Framework REST Easy - Building RESTful Services in Zend Framework Presentation Transcript

  • REST EasyBuilding RESTful Services in Zend Framework
  • Me• Fightin’ Texas Aggie• .Net and PHP Developer• UNIX and Windows Sysadmin• Senior Consultant at Improving Enterprises• chris@chrisweldon.net
  • Twitter Promotion
  • Twitter Promotion• @neraath
  • Twitter Promotion• @neraath• #bcsphp
  • Twitter Promotion• @neraath• #bcsphp• #rest
  • Twitter Promotion• @neraath• #bcsphp• #rest• #thisguyisawesome
  • Twitter Promotion• @neraath• #bcsphp• #rest• #thisguyisawesome• #bestspeakerever
  • Twitter Promotion• @neraath• #bcsphp• #rest• #thisguyisawesome• #bestspeakerever• #horriblepresenter
  • Twitter Promotion• @neraath• #bcsphp• #rest• #thisguyisawesome• #bestspeakerever• #horriblepresenter• #omgshootme
  • Agile, Microsoft, Open Technologies, UXApplied Training, Coaching, MentoringCertified ConsultingRural SourcingRecruiting Services
  • REST
  • REpresentational State Transfer
  • Why REST?
  • Scalability
  • ArchitectureIndependence
  • Resource Addressing and Management
  • Self-Describing Messages
  • REST is NOT
  • 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>
  • RESTs Beauty is in HTTP Verbs
  • http://www.example.org/stock/price/IBM
  • 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
  • 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
  • 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
  • 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
  • Status Codes are Your Friend
  • 200 =
  • 201 = Created
  • 204 = ?
  • 301 = ?
  • 401 = ?
  • 404, 500, etc.
  • REST Supports{ “person”: { “name”: “Chris Weldon”, “email”: “chris@chrisweldon.net” }}
  • REST Supports<?xml version=”1.0”?><person> <name>Chris Weldon</name> <email>chris@chrisweldon.net</name></person>
  • REST Supports ...
  • DEMO
  • Thanks!spkr8.com/neraath