SlideShare a Scribd company logo
REST Easy
Building 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, UX
Applied Training, Coaching, Mentoring
Certified Consulting
Rural Sourcing
Recruiting Services
REST
REST Easy - Building RESTful Services in Zend Framework
REpresentational State
      Transfer
Why REST?
Scalability
Architecture
Independence
Resource Addressing
 and Management
Self-Describing Messages
REST is NOT
REST Easy - Building RESTful Services in Zend Framework
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
GET
Request
GET /stock/price/IBM HTTP/1.1
Host: www.example.org
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4)
Accept-Encoding: gzip
Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7
Cache-Control: no-cache
Accept-Language: de,en;q=0.7,en-us;q=0.3

Response
date: Thu, 21 Jun 2012 21:55:57 GMT
version: HTTP/1.1
status: 200 OK
content-length: 26550
content-type: text/html; charset=UTF-8
cache-control: private, max-age=0
expires: -1
POST
Request
POST /stock/price/IBM HTTP/1.1
Host: www.example.org
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4)
Content-Type: application/x-www-form-urlencoded
Accept: text/html,application/xhtml+xml;q=0.9,*/*;q=0.8

currentPrice:193.39
delta:-5.39
locale:en_US

Response
Date: Thu, 21 Jun 2012 21:55:57 GMT
Version: HTTP/1.1
Status: 201 CREATED
Location: /stock/price/IBM
PUT
Request
PUT /stock/price/IBM HTTP/1.1
Host: www.example.org
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4)
Content-Type: application/x-www-form-urlencoded
Accept: text/html,application/xhtml+xml;q=0.9,*/*;q=0.8

currentPrice:193.39
delta:-5.39
locale:en_US

Response
Date: Thu, 21 Jun 2012 21:55:57 GMT
Version: HTTP/1.1
Status: 200 OK
DELETE
Request
DELETE /stock/price/IBM HTTP/1.1
Host: www.example.org
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4)
Accept-Encoding: gzip
Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7
Cache-Control: no-cache
Accept-Language: de,en;q=0.7,en-us;q=0.3

Response
date: Thu, 21 Jun 2012 21:55:57 GMT
version: HTTP/1.1
status: 204 NO CONTENT
Status Codes are Your
        Friend
200 =
REST Easy - Building RESTful Services in Zend Framework
201 = Created
204 = ?
REST Easy - Building RESTful Services in Zend Framework
301 = ?
REST Easy - Building RESTful Services in Zend Framework
401 = ?
REST Easy - Building RESTful Services in Zend Framework
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

More Related Content

PPTX
REST Easy with AngularJS - ng-grid CRUD EXAMPLE
PDF
How to connect AngularJS to servers
PDF
RESTful Web Services with Spring MVC
PPTX
REST & RESTful Web Service
PDF
Angularjs & REST
PPTX
Designing REST services with Spring MVC
PPTX
REST API Design
PPT
Using RESTFUL APIs in ANGULARJS
REST Easy with AngularJS - ng-grid CRUD EXAMPLE
How to connect AngularJS to servers
RESTful Web Services with Spring MVC
REST & RESTful Web Service
Angularjs & REST
Designing REST services with Spring MVC
REST API Design
Using RESTFUL APIs in ANGULARJS

What's hot (20)

PDF
Preparing your web services for Android and your Android app for web services...
PPTX
Implementation advantages of rest
PPT
RESTful services
PPT
Scalable Reliable Secure REST
PDF
Cwinters Intro To Rest And JerREST and Jersey Introductionsey
PDF
AJAX - An introduction
PPTX
Android and REST
ODP
The Internet as Web Services: introduction to ReST
PDF
JSON REST API for WordPress
PPTX
REST & RESTful Web Services
PPTX
The JSON REST API for WordPress
PDF
HTML5 - An introduction
PDF
Building RESTful applications using Spring MVC
KEY
Designing a RESTful web service
PDF
Learn REST in 18 Slides
PDF
RESTful web
PDF
Android webservices
PDF
Cross site calls with javascript - the right way with CORS
PPT
Rest services caching
PPT
Understanding REST
Preparing your web services for Android and your Android app for web services...
Implementation advantages of rest
RESTful services
Scalable Reliable Secure REST
Cwinters Intro To Rest And JerREST and Jersey Introductionsey
AJAX - An introduction
Android and REST
The Internet as Web Services: introduction to ReST
JSON REST API for WordPress
REST & RESTful Web Services
The JSON REST API for WordPress
HTML5 - An introduction
Building RESTful applications using Spring MVC
Designing a RESTful web service
Learn REST in 18 Slides
RESTful web
Android webservices
Cross site calls with javascript - the right way with CORS
Rest services caching
Understanding REST
Ad

Similar to REST Easy - Building RESTful Services in Zend Framework (20)

ZIP
Grown-up javascript with AngularJS
PDF
Embracing HTTP in the era of API’s
PDF
Sustainable Agile Development
PDF
Webware - 문서에서 운영 체제 까지 - 윤석찬 (2014)
PPT
performance.ppt
PDF
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
PDF
Grokking REST (ZendCon 2010)
PDF
Web performance optimization
PPTX
Best Practices for WordPress in Enterprise
PDF
Complete SEO Report with checklist required
PDF
Best practices-wordpress-enterprise
PPT
Ajax to the Moon
PPT
Fast and Easy Website Tuneups
PPT
DDoS Attacks and Countermeasures
PPTX
Implementing Partial Trust In Share Point
PPTX
Introduction to Azure DocumentDB
PDF
HTMX: Web 1.0 with the benefits of Web 2.0 without the grift of Web 3.0
PDF
Web Development Foundation & Team Collaboration
PDF
Mastering Migration - How to Manage a Move From Another CMS to WordPress with...
PDF
Nuts and Bolts of WebSocket Devoxx 2014
Grown-up javascript with AngularJS
Embracing HTTP in the era of API’s
Sustainable Agile Development
Webware - 문서에서 운영 체제 까지 - 윤석찬 (2014)
performance.ppt
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
Grokking REST (ZendCon 2010)
Web performance optimization
Best Practices for WordPress in Enterprise
Complete SEO Report with checklist required
Best practices-wordpress-enterprise
Ajax to the Moon
Fast and Easy Website Tuneups
DDoS Attacks and Countermeasures
Implementing Partial Trust In Share Point
Introduction to Azure DocumentDB
HTMX: Web 1.0 with the benefits of Web 2.0 without the grift of Web 3.0
Web Development Foundation & Team Collaboration
Mastering Migration - How to Manage a Move From Another CMS to WordPress with...
Nuts and Bolts of WebSocket Devoxx 2014
Ad

More from Chris Weldon (7)

ODP
Keat presentation
KEY
Beyond TDD: Enabling Your Team to Continuously Deliver Software
KEY
SOLID - Not Just a State of Matter, It's Principles for OO Propriety
KEY
SOLID Principles
KEY
Unit Testing in SharePoint 2010
KEY
IoC with PHP
PDF
PHP & MVC
Keat presentation
Beyond TDD: Enabling Your Team to Continuously Deliver Software
SOLID - Not Just a State of Matter, It's Principles for OO Propriety
SOLID Principles
Unit Testing in SharePoint 2010
IoC with PHP
PHP & MVC

Recently uploaded (20)

PDF
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
creating-agentic-ai-solutions-leveraging-aws.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
PDF
Dell Pro 14 Plus: Be better prepared for what’s coming
PDF
Enable Enterprise-Ready Security on IBM i Systems.pdf
PDF
ai-archetype-understanding-the-personality-of-agentic-ai.pdf
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
PPTX
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Event Presentation Google Cloud Next Extended 2025
PPTX
Belt and Road Supply Chain Finance Blockchain Solution
PDF
How AI Agents Improve Data Accuracy and Consistency in Due Diligence.pdf
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
creating-agentic-ai-solutions-leveraging-aws.pdf
Modernizing your data center with Dell and AMD
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
Dell Pro 14 Plus: Be better prepared for what’s coming
Enable Enterprise-Ready Security on IBM i Systems.pdf
ai-archetype-understanding-the-personality-of-agentic-ai.pdf
A Day in the Life of Location Data - Turning Where into How.pdf
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Event Presentation Google Cloud Next Extended 2025
Belt and Road Supply Chain Finance Blockchain Solution
How AI Agents Improve Data Accuracy and Consistency in Due Diligence.pdf
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Understanding_Digital_Forensics_Presentation.pptx
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

REST Easy - Building RESTful Services in Zend Framework

Editor's Notes