SlideShare ist ein Scribd-Unternehmen logo
1 von 49
and Conquering the World




                           Andrew Curioso
 Cre·ate[kree-eyt] verb
1. to cause to come into being, as something
   unique that would not naturally evolve or
   that is not made by ordinary processes.
2. to evolve from one's own thought or
   imagination, as a work of art or an
   invention.


                                 Source: Dictionary.com
 Ep·ic [ep-ik] adjective
1. noting or pertaining to a long poetic
   composition, usually centered upon a hero, in
   which a series of great achievements or events
   is narrated in elevated style: Homer's Iliad is an
   epic poem.
2. resembling or suggesting such poetry: an epic
   novel on the founding of the country.
3. heroic; majestic; impressively great: the epic
   events of the war.
4. of unusually great size or extent: a crime wave
   of epic proportions.
                                       Source: Dictionary.com
 Rest[rest] noun
1. the refreshing quiet or repose of sleep: a good
   night's rest.
2. refreshing ease or inactivity after exertion or
   labor: to allow an hour for rest.
3. relief or freedom, especially from anything that
   wearies, troubles, or disturbs.
4. a period or interval of
   inactivity, repose, solitude, or tranquility: to go
   away for a rest.
5. mental or spiritual calm; tranquility.
6. Representational State Transfer
                                       Source: Dictionary.com
 Rest [rest] noun
1. the refreshing quiet or repose of sleep: a good
   night's rest.
2. refreshing ease or inactivity after exertion or
   labor: to allow an hour for rest.
3. relief or freedom, especially from anything that
   wearies, troubles, or disturbs.
4. a period or interval of
   inactivity, repose, solitude, or tranquility: to go
   away for a rest.
5. mental or spiritual calm; tranquility.
6. Representational State Transfer
                                   Source: Common Knowledge
 A·P·I [ey-pee-ahy] noun
1. Application Programming Interface. A
   contract between two applications that
   allows them to communicate effectively.




                                Source: Andrew Curioso
 Con·quer[kong-ker] verb
1. to acquire by force of arms; win in war: to
   conquer a foreign land.
2. to overcome by force; subdue: to conquer an
   enemy.
3. to gain, win, or obtain by effort, personal
   appeal, etc.: conquer the hearts of his
   audience.
4. to gain a victory over; surmount; master;
   overcome: to conquer disease and poverty; to
   conquer one's fear.
                                   Source: Andrew Curioso
 World [wurld] noun
1. the earth or globe, considered as a planet.
2. ( often initial capital letter ) a particular division
   of the earth: the Western world.
3. the earth or a part of it, with its inhabitants,
   affairs, etc., during a particular period: the
   ancient world.
4. humankind; the human race; humanity: The
   world must eliminate war and poverty.
5. the public generally: The whole world knows it.

                                         Source: Andrew Curioso
 World [wurld] noun
1. The ecosystem around your startup or cause
   into which you drag your
   family, friends, investors, and anyone who
   will listen.




                                Source: Andrew Curioso
   Internal only (closed)      External (open)
     Multiple consumers          Everything +
     Scalable                    Growth
                                   ▪ Mash-ups!
   Semi-Private                   ▪ Innovation
                                   ▪ Evangelists
     Partner Integration
                                  “The Platform Play”
PATTERNS                     PROTOCOLS / FORMATS

   Representation State        XML
    Transfer (REST)             JSON
   Remote Procedure Calls      YAML
    (RPC)                       AMF
                                Etc...
   Representational State Transfer
   Resource based (nouns)
   5 verbs
     GET
    
     POST
     DELETE
    
   Easy in PHP
1.   Client / Server
2.   Stateless
3.   Cacheable
4.   Layered
5.   Uniform Interface
6.   ???
   URL shortening website
     User authentication (simple)
     Create, read, update, and delete (CRUD)
   id
   user_id
               users   urls
   url
   created
   modified
Verb     URL              Action
GET      /urls.json       List URLs
GET      /urls/123.json   Resource for URL with id 123
POST     /urls.json       Shorten a new URL
PUT      /urls/123.json   Edit the URL with the ID 123
DELETE   /urls/123.json   Delete the URL with the ID 123
POST     /urls/123.json   Also edit the URL with the ID 123
<?php
 if ( $_SERVER['REQUEST_METHOD'] == 'POST' )
 {
   ...
 }
?>
   Only you can prevent CSRF
     Only POST and PUT should write data
     Only POST and DELETE should delete data
     Check Referrer
     Per request tokens
   HTTP Accepts
   Mime Types
   Simple
   Fast
   Wide-spread
   Mime: application/json
<?php
  echo json_encode( $urlObject);
?>
   P w/ padding
    Uses callback
    Cross domain
    Mime: application/javascript
if ( array_key_exists('callback’, $_GET) )
   $callbackFunc = $_GET['callback'];
else
   $callbackFunc = false;

if ( $callbackFunc !== false )
   echo $callbackFunc.'(';

echojson_encode( $urlObject );

if ( $callbackFunc )
echo ')';
?>
   Strongly Typed
   Human readable
   Lots of existing tools
   Mime: application/xml
<?php
...
?>
HUMAN READABLE       BINARY

                       AMF
                       Microsoft Excel
   HTML                PDF
   YAML                JPEG / PNG
   CSV                 Etc…
   Serialized PHP
   Etc…
Create
curl –d “url=www.example.com” http://tinyr.me/urls.json

Read
curl http://tinyr.me/urls/123.json

Update
curl –d “url=www.example.com/foo” http://tinyr.me/urls/123.json

Delete
curl –X DELETE http://tinyr.me/urls/123.json
WE HAVE                      WE’RE MISSING

   Request handling            Error handling
   RESTful Output Formats      Pagination
     XML                       Authentication
     Json / JsonP              Authorization
                                Documentation
   Success                     Error (continued)
     200 OK *                    405 Method Not Allowed *
     201 Created *               409 Conflict
     303 See Other *             410 Gone
                                  500 Internal Server Error *
   Error                         501 Not Implemented
     401 Unauthorized *          503 Service Unavailable
     402 Payment Required
     403 Forbidden *
     404 Not Found *
   If not a POST request
     405 Method Not Allowed
   Already existed
     303 See Other
   Save success
     201 Created
   Failure
     500 Internal Server Error with explanation
   If not a POST or PUT request
     405 Method Not Allowed
   Invalid ID
     404 File Not Found
   Success
     200 OK
   Failure
     500 Internal Server Error with explanation
   If not a POST or DELETE request
     405 Method Not Allowed
   Invalid ID
     404 File Not Found
   Success
     200 OK
   Failure
     500 Internal Server Error with explanation
   User is not allowed to access resource
     403 Forbidden
   User is not logged in
     401 Unauthorized
   Same format
   Descriptive
     Human
     Computer
   Comprehensive
{"Error": {
 "code" : 404,
 "description" : "File Not Found"
}}
   Return meta-information
     Rate limiting
     Pagination
     Expiration / cache
     Etc.
   Uses HTTP headers
   App defined “used to” start with “X-”
header(“X-Current-Page:”.$currentPage);
header(“X-Total: ”.$total);
header(“X-Per-Page: ”.$perPage);
SOME PLATFORMS (LIKE MANY
WEB BROWSERS)               FORTUNATELY…

   Do not support:            You can/should do this:
     DELETE
     PUT                   _method=DELETE
DELETE /urls/123.json HTTP1.1   POST /urls/123.json HTTP1.1
Host: www.example.com           Host: www.example.com


                                _method=DELETE
BAD

              No Authentication

                    GOOD

                    Basic

                    BETTER

Form and Cookie                      Digest

                     BEST

    Oauth                         Shared Secret
   There are no shortcuts
   One or more:
     All Users (public)
     Owner
     Shared User
     Moderator
     Administrator
   Vocabularies / Schemas
     DTD or schema files
   Examples
     Code
     I/O
   Community
   Feedback
   WSDL 2.0
   PHP rocks with REST
   SOAP is heavy
   AMF is light but requires Flash
   But, if you still want to, you can
User              Gateway         REST API
        POST
                       REST request


                       REST request
       Response




               Aka the Façade Pattern
   Built-in to HTTP
     Expires
     Last-Modified
     Cache-Control
     Etag
      ▪ If-None-Match
   Stateless
   Hypermedia as the Engine of Application
    State




                                    Roy Thomas Fielding
   REST constraints
   Documentation
   Security
   Unit tests
   Contact:
     www.AndrewCurioso.com/contact
     @AndrewCurioso on Twitter
     Careers.FreePriceAlerts.com

Weitere ähnliche Inhalte

Andere mochten auch

VMUG - Using PowerShell to call RESTful APIs
VMUG - Using PowerShell to call RESTful APIsVMUG - Using PowerShell to call RESTful APIs
VMUG - Using PowerShell to call RESTful APIsChris Wahl
 
The never-ending REST API design debate -- Devoxx France 2016
The never-ending REST API design debate -- Devoxx France 2016The never-ending REST API design debate -- Devoxx France 2016
The never-ending REST API design debate -- Devoxx France 2016Restlet
 
The Present Future of OAuth
The Present Future of OAuthThe Present Future of OAuth
The Present Future of OAuthMichael Bleigh
 
Joker'15 Java straitjackets for MongoDB
Joker'15 Java straitjackets for MongoDBJoker'15 Java straitjackets for MongoDB
Joker'15 Java straitjackets for MongoDBAlexey Zinoviev
 
VMUG - Picking Up New Skills - Tips and Tricks to Build Your Technical Tool C...
VMUG - Picking Up New Skills - Tips and Tricks to Build Your Technical Tool C...VMUG - Picking Up New Skills - Tips and Tricks to Build Your Technical Tool C...
VMUG - Picking Up New Skills - Tips and Tricks to Build Your Technical Tool C...Chris Wahl
 
MongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-SetMongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-SetVivek Parihar
 
Implementing OAuth
Implementing OAuthImplementing OAuth
Implementing OAuthleahculver
 
The end of polling : why and how to transform a REST API into a Data Streamin...
The end of polling : why and how to transform a REST API into a Data Streamin...The end of polling : why and how to transform a REST API into a Data Streamin...
The end of polling : why and how to transform a REST API into a Data Streamin...Audrey Neveu
 
CQRS and Event Sourcing with MongoDB and PHP
CQRS and Event Sourcing with MongoDB and PHPCQRS and Event Sourcing with MongoDB and PHP
CQRS and Event Sourcing with MongoDB and PHPDavide Bellettini
 
IBM Watson Work Services Development
IBM Watson Work Services DevelopmentIBM Watson Work Services Development
IBM Watson Work Services DevelopmentVan Staub, MBA
 
OAuth - Open API Authentication
OAuth - Open API AuthenticationOAuth - Open API Authentication
OAuth - Open API Authenticationleahculver
 
Active Directory Single Sign-On with IBM
Active Directory Single Sign-On with IBMActive Directory Single Sign-On with IBM
Active Directory Single Sign-On with IBMVan Staub, MBA
 
Securing RESTful APIs using OAuth 2 and OpenID Connect
Securing RESTful APIs using OAuth 2 and OpenID ConnectSecuring RESTful APIs using OAuth 2 and OpenID Connect
Securing RESTful APIs using OAuth 2 and OpenID ConnectJonathan LeBlanc
 
12 Ideas for More Interactive Presentations
12 Ideas for More Interactive Presentations12 Ideas for More Interactive Presentations
12 Ideas for More Interactive Presentations24Slides
 
How I got 2.5 Million views on Slideshare (by @nickdemey - Board of Innovation)
How I got 2.5 Million views on Slideshare (by @nickdemey - Board of Innovation)How I got 2.5 Million views on Slideshare (by @nickdemey - Board of Innovation)
How I got 2.5 Million views on Slideshare (by @nickdemey - Board of Innovation)Board of Innovation
 
Five Killer Ways to Design The Same Slide
Five Killer Ways to Design The Same SlideFive Killer Ways to Design The Same Slide
Five Killer Ways to Design The Same SlideCrispy Presentations
 
10 Powerful Body Language Tips for your next Presentation
10 Powerful Body Language Tips for your next Presentation10 Powerful Body Language Tips for your next Presentation
10 Powerful Body Language Tips for your next PresentationSOAP Presentations
 
What Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
What Would Steve Do? 10 Lessons from the World's Most Captivating PresentersWhat Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
What Would Steve Do? 10 Lessons from the World's Most Captivating PresentersHubSpot
 

Andere mochten auch (20)

VMUG - Using PowerShell to call RESTful APIs
VMUG - Using PowerShell to call RESTful APIsVMUG - Using PowerShell to call RESTful APIs
VMUG - Using PowerShell to call RESTful APIs
 
The never-ending REST API design debate -- Devoxx France 2016
The never-ending REST API design debate -- Devoxx France 2016The never-ending REST API design debate -- Devoxx France 2016
The never-ending REST API design debate -- Devoxx France 2016
 
The Present Future of OAuth
The Present Future of OAuthThe Present Future of OAuth
The Present Future of OAuth
 
Joker'15 Java straitjackets for MongoDB
Joker'15 Java straitjackets for MongoDBJoker'15 Java straitjackets for MongoDB
Joker'15 Java straitjackets for MongoDB
 
MongoDB Workshop
MongoDB WorkshopMongoDB Workshop
MongoDB Workshop
 
VMUG - Picking Up New Skills - Tips and Tricks to Build Your Technical Tool C...
VMUG - Picking Up New Skills - Tips and Tricks to Build Your Technical Tool C...VMUG - Picking Up New Skills - Tips and Tricks to Build Your Technical Tool C...
VMUG - Picking Up New Skills - Tips and Tricks to Build Your Technical Tool C...
 
MongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-SetMongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-Set
 
Implementing OAuth
Implementing OAuthImplementing OAuth
Implementing OAuth
 
The end of polling : why and how to transform a REST API into a Data Streamin...
The end of polling : why and how to transform a REST API into a Data Streamin...The end of polling : why and how to transform a REST API into a Data Streamin...
The end of polling : why and how to transform a REST API into a Data Streamin...
 
CQRS and Event Sourcing with MongoDB and PHP
CQRS and Event Sourcing with MongoDB and PHPCQRS and Event Sourcing with MongoDB and PHP
CQRS and Event Sourcing with MongoDB and PHP
 
IBM Watson Work Services Development
IBM Watson Work Services DevelopmentIBM Watson Work Services Development
IBM Watson Work Services Development
 
OAuth - Open API Authentication
OAuth - Open API AuthenticationOAuth - Open API Authentication
OAuth - Open API Authentication
 
Active Directory Single Sign-On with IBM
Active Directory Single Sign-On with IBMActive Directory Single Sign-On with IBM
Active Directory Single Sign-On with IBM
 
Securing RESTful APIs using OAuth 2 and OpenID Connect
Securing RESTful APIs using OAuth 2 and OpenID ConnectSecuring RESTful APIs using OAuth 2 and OpenID Connect
Securing RESTful APIs using OAuth 2 and OpenID Connect
 
IBM Single Sign-On
IBM Single Sign-OnIBM Single Sign-On
IBM Single Sign-On
 
12 Ideas for More Interactive Presentations
12 Ideas for More Interactive Presentations12 Ideas for More Interactive Presentations
12 Ideas for More Interactive Presentations
 
How I got 2.5 Million views on Slideshare (by @nickdemey - Board of Innovation)
How I got 2.5 Million views on Slideshare (by @nickdemey - Board of Innovation)How I got 2.5 Million views on Slideshare (by @nickdemey - Board of Innovation)
How I got 2.5 Million views on Slideshare (by @nickdemey - Board of Innovation)
 
Five Killer Ways to Design The Same Slide
Five Killer Ways to Design The Same SlideFive Killer Ways to Design The Same Slide
Five Killer Ways to Design The Same Slide
 
10 Powerful Body Language Tips for your next Presentation
10 Powerful Body Language Tips for your next Presentation10 Powerful Body Language Tips for your next Presentation
10 Powerful Body Language Tips for your next Presentation
 
What Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
What Would Steve Do? 10 Lessons from the World's Most Captivating PresentersWhat Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
What Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
 

Ähnlich wie NEPHP '12: Create a RESTful API

REST in ( a mobile ) peace @ WHYMCA 05-21-2011
REST in ( a mobile ) peace @ WHYMCA 05-21-2011REST in ( a mobile ) peace @ WHYMCA 05-21-2011
REST in ( a mobile ) peace @ WHYMCA 05-21-2011Alessandro Nadalin
 
REST in peace @ IPC 2012 in Mainz
REST in peace @ IPC 2012 in MainzREST in peace @ IPC 2012 in Mainz
REST in peace @ IPC 2012 in MainzAlessandro Nadalin
 
Rest in practice
Rest in practiceRest in practice
Rest in practiceGabor Torok
 
REST APIs in the context of single-page applications
REST APIs in the context of single-page applicationsREST APIs in the context of single-page applications
REST APIs in the context of single-page applicationsyoranbe
 
HTTP fundamentals for developers
HTTP fundamentals for developersHTTP fundamentals for developers
HTTP fundamentals for developersMario Cardinal
 
Hacking IIS - NahamCon.pdf
Hacking IIS - NahamCon.pdfHacking IIS - NahamCon.pdf
Hacking IIS - NahamCon.pdfdistortdistort
 
RESTful services
RESTful servicesRESTful services
RESTful servicesgouthamrv
 
Kotlin server side frameworks
Kotlin server side frameworksKotlin server side frameworks
Kotlin server side frameworksKen Yee
 
End to end web security
End to end web securityEnd to end web security
End to end web securityGeorge Boobyer
 
Web Attacks - Top threats - 2010
Web Attacks - Top threats - 2010Web Attacks - Top threats - 2010
Web Attacks - Top threats - 2010Shreeraj Shah
 
The hypermedia api
The hypermedia apiThe hypermedia api
The hypermedia apiInviqa
 
The Advantages And Disadvantages Of Client-Based State...
The Advantages And Disadvantages Of Client-Based State...The Advantages And Disadvantages Of Client-Based State...
The Advantages And Disadvantages Of Client-Based State...Beth Hernandez
 
OpenTravel Advisory Forum 2012 REST XML Resources
OpenTravel Advisory Forum 2012 REST XML ResourcesOpenTravel Advisory Forum 2012 REST XML Resources
OpenTravel Advisory Forum 2012 REST XML ResourcesOpenTravel Alliance
 
Building APIs with MVC 6 and OAuth
Building APIs with MVC 6 and OAuthBuilding APIs with MVC 6 and OAuth
Building APIs with MVC 6 and OAuthFilip Ekberg
 
APIs REST Usables con Hypermedia por Javier Ramirez, para codemotion
APIs REST Usables con Hypermedia por Javier Ramirez, para codemotionAPIs REST Usables con Hypermedia por Javier Ramirez, para codemotion
APIs REST Usables con Hypermedia por Javier Ramirez, para codemotionjavier ramirez
 
nguyenhainhathuy-building-restful-web-service
nguyenhainhathuy-building-restful-web-servicenguyenhainhathuy-building-restful-web-service
nguyenhainhathuy-building-restful-web-servicehazzaz
 
Phpnw security-20111009
Phpnw security-20111009Phpnw security-20111009
Phpnw security-20111009Paul Lemon
 

Ähnlich wie NEPHP '12: Create a RESTful API (20)

REST in ( a mobile ) peace @ WHYMCA 05-21-2011
REST in ( a mobile ) peace @ WHYMCA 05-21-2011REST in ( a mobile ) peace @ WHYMCA 05-21-2011
REST in ( a mobile ) peace @ WHYMCA 05-21-2011
 
REST in peace @ IPC 2012 in Mainz
REST in peace @ IPC 2012 in MainzREST in peace @ IPC 2012 in Mainz
REST in peace @ IPC 2012 in Mainz
 
Rest in practice
Rest in practiceRest in practice
Rest in practice
 
REST APIs in the context of single-page applications
REST APIs in the context of single-page applicationsREST APIs in the context of single-page applications
REST APIs in the context of single-page applications
 
Modified REST Presentation
Modified REST PresentationModified REST Presentation
Modified REST Presentation
 
HTTP fundamentals for developers
HTTP fundamentals for developersHTTP fundamentals for developers
HTTP fundamentals for developers
 
Hacking IIS - NahamCon.pdf
Hacking IIS - NahamCon.pdfHacking IIS - NahamCon.pdf
Hacking IIS - NahamCon.pdf
 
RESTful services
RESTful servicesRESTful services
RESTful services
 
Cors kung fu
Cors kung fuCors kung fu
Cors kung fu
 
Kotlin server side frameworks
Kotlin server side frameworksKotlin server side frameworks
Kotlin server side frameworks
 
End to end web security
End to end web securityEnd to end web security
End to end web security
 
Web Attacks - Top threats - 2010
Web Attacks - Top threats - 2010Web Attacks - Top threats - 2010
Web Attacks - Top threats - 2010
 
The hypermedia api
The hypermedia apiThe hypermedia api
The hypermedia api
 
Talking to Web Services
Talking to Web ServicesTalking to Web Services
Talking to Web Services
 
The Advantages And Disadvantages Of Client-Based State...
The Advantages And Disadvantages Of Client-Based State...The Advantages And Disadvantages Of Client-Based State...
The Advantages And Disadvantages Of Client-Based State...
 
OpenTravel Advisory Forum 2012 REST XML Resources
OpenTravel Advisory Forum 2012 REST XML ResourcesOpenTravel Advisory Forum 2012 REST XML Resources
OpenTravel Advisory Forum 2012 REST XML Resources
 
Building APIs with MVC 6 and OAuth
Building APIs with MVC 6 and OAuthBuilding APIs with MVC 6 and OAuth
Building APIs with MVC 6 and OAuth
 
APIs REST Usables con Hypermedia por Javier Ramirez, para codemotion
APIs REST Usables con Hypermedia por Javier Ramirez, para codemotionAPIs REST Usables con Hypermedia por Javier Ramirez, para codemotion
APIs REST Usables con Hypermedia por Javier Ramirez, para codemotion
 
nguyenhainhathuy-building-restful-web-service
nguyenhainhathuy-building-restful-web-servicenguyenhainhathuy-building-restful-web-service
nguyenhainhathuy-building-restful-web-service
 
Phpnw security-20111009
Phpnw security-20111009Phpnw security-20111009
Phpnw security-20111009
 

Kürzlich hochgeladen

Call Girls Tirupati Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Tirupati Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Tirupati Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Tirupati Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
VIP Hyderabad Call Girls Bahadurpally 7877925207 ₹5000 To 25K With AC Room 💚😋
VIP Hyderabad Call Girls Bahadurpally 7877925207 ₹5000 To 25K With AC Room 💚😋VIP Hyderabad Call Girls Bahadurpally 7877925207 ₹5000 To 25K With AC Room 💚😋
VIP Hyderabad Call Girls Bahadurpally 7877925207 ₹5000 To 25K With AC Room 💚😋TANUJA PANDEY
 
VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...
VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...
VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...jageshsingh5554
 
Call Girls Varanasi Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Varanasi Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Varanasi Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Varanasi Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Call Girls Siliguri Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Siliguri Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Siliguri Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Siliguri Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Call Girls Mumbai Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Mumbai Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Mumbai Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Mumbai Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Call Girls Cuttack Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Cuttack Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Cuttack Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Cuttack Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
The Most Attractive Hyderabad Call Girls Kothapet 𖠋 6297143586 𖠋 Will You Mis...
The Most Attractive Hyderabad Call Girls Kothapet 𖠋 6297143586 𖠋 Will You Mis...The Most Attractive Hyderabad Call Girls Kothapet 𖠋 6297143586 𖠋 Will You Mis...
The Most Attractive Hyderabad Call Girls Kothapet 𖠋 6297143586 𖠋 Will You Mis...chandars293
 
Call Girls Coimbatore Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Coimbatore Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Coimbatore Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Coimbatore Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...
College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...
College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...perfect solution
 
♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top Call Girl ...
♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top Call Girl ...♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top Call Girl ...
♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top Call Girl ...astropune
 
VIP Call Girls Indore Kirti 💚😋 9256729539 🚀 Indore Escorts
VIP Call Girls Indore Kirti 💚😋  9256729539 🚀 Indore EscortsVIP Call Girls Indore Kirti 💚😋  9256729539 🚀 Indore Escorts
VIP Call Girls Indore Kirti 💚😋 9256729539 🚀 Indore Escortsaditipandeya
 
Russian Escorts Girls Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls Delhi
Russian Escorts Girls  Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls DelhiRussian Escorts Girls  Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls Delhi
Russian Escorts Girls Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls DelhiAlinaDevecerski
 
Lucknow Call girls - 8800925952 - 24x7 service with hotel room
Lucknow Call girls - 8800925952 - 24x7 service with hotel roomLucknow Call girls - 8800925952 - 24x7 service with hotel room
Lucknow Call girls - 8800925952 - 24x7 service with hotel roomdiscovermytutordmt
 
Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...
Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...
Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...Call Girls in Nagpur High Profile
 
Best Rate (Guwahati ) Call Girls Guwahati ⟟ 8617370543 ⟟ High Class Call Girl...
Best Rate (Guwahati ) Call Girls Guwahati ⟟ 8617370543 ⟟ High Class Call Girl...Best Rate (Guwahati ) Call Girls Guwahati ⟟ 8617370543 ⟟ High Class Call Girl...
Best Rate (Guwahati ) Call Girls Guwahati ⟟ 8617370543 ⟟ High Class Call Girl...Dipal Arora
 
Call Girls Faridabad Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Faridabad Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Faridabad Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Faridabad Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Call Girls Gwalior Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Gwalior Just Call 8617370543 Top Class Call Girl Service AvailableCall Girls Gwalior Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Gwalior Just Call 8617370543 Top Class Call Girl Service AvailableDipal Arora
 
Call Girls Visakhapatnam Just Call 9907093804 Top Class Call Girl Service Ava...
Call Girls Visakhapatnam Just Call 9907093804 Top Class Call Girl Service Ava...Call Girls Visakhapatnam Just Call 9907093804 Top Class Call Girl Service Ava...
Call Girls Visakhapatnam Just Call 9907093804 Top Class Call Girl Service Ava...Dipal Arora
 
Call Girls Ooty Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Ooty Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Ooty Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Ooty Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 

Kürzlich hochgeladen (20)

Call Girls Tirupati Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Tirupati Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Tirupati Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Tirupati Just Call 9907093804 Top Class Call Girl Service Available
 
VIP Hyderabad Call Girls Bahadurpally 7877925207 ₹5000 To 25K With AC Room 💚😋
VIP Hyderabad Call Girls Bahadurpally 7877925207 ₹5000 To 25K With AC Room 💚😋VIP Hyderabad Call Girls Bahadurpally 7877925207 ₹5000 To 25K With AC Room 💚😋
VIP Hyderabad Call Girls Bahadurpally 7877925207 ₹5000 To 25K With AC Room 💚😋
 
VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...
VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...
VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...
 
Call Girls Varanasi Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Varanasi Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Varanasi Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Varanasi Just Call 9907093804 Top Class Call Girl Service Available
 
Call Girls Siliguri Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Siliguri Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Siliguri Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Siliguri Just Call 9907093804 Top Class Call Girl Service Available
 
Call Girls Mumbai Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Mumbai Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Mumbai Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Mumbai Just Call 9907093804 Top Class Call Girl Service Available
 
Call Girls Cuttack Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Cuttack Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Cuttack Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Cuttack Just Call 9907093804 Top Class Call Girl Service Available
 
The Most Attractive Hyderabad Call Girls Kothapet 𖠋 6297143586 𖠋 Will You Mis...
The Most Attractive Hyderabad Call Girls Kothapet 𖠋 6297143586 𖠋 Will You Mis...The Most Attractive Hyderabad Call Girls Kothapet 𖠋 6297143586 𖠋 Will You Mis...
The Most Attractive Hyderabad Call Girls Kothapet 𖠋 6297143586 𖠋 Will You Mis...
 
Call Girls Coimbatore Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Coimbatore Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Coimbatore Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Coimbatore Just Call 9907093804 Top Class Call Girl Service Available
 
College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...
College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...
College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...
 
♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top Call Girl ...
♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top Call Girl ...♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top Call Girl ...
♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top Call Girl ...
 
VIP Call Girls Indore Kirti 💚😋 9256729539 🚀 Indore Escorts
VIP Call Girls Indore Kirti 💚😋  9256729539 🚀 Indore EscortsVIP Call Girls Indore Kirti 💚😋  9256729539 🚀 Indore Escorts
VIP Call Girls Indore Kirti 💚😋 9256729539 🚀 Indore Escorts
 
Russian Escorts Girls Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls Delhi
Russian Escorts Girls  Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls DelhiRussian Escorts Girls  Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls Delhi
Russian Escorts Girls Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls Delhi
 
Lucknow Call girls - 8800925952 - 24x7 service with hotel room
Lucknow Call girls - 8800925952 - 24x7 service with hotel roomLucknow Call girls - 8800925952 - 24x7 service with hotel room
Lucknow Call girls - 8800925952 - 24x7 service with hotel room
 
Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...
Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...
Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...
 
Best Rate (Guwahati ) Call Girls Guwahati ⟟ 8617370543 ⟟ High Class Call Girl...
Best Rate (Guwahati ) Call Girls Guwahati ⟟ 8617370543 ⟟ High Class Call Girl...Best Rate (Guwahati ) Call Girls Guwahati ⟟ 8617370543 ⟟ High Class Call Girl...
Best Rate (Guwahati ) Call Girls Guwahati ⟟ 8617370543 ⟟ High Class Call Girl...
 
Call Girls Faridabad Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Faridabad Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Faridabad Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Faridabad Just Call 9907093804 Top Class Call Girl Service Available
 
Call Girls Gwalior Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Gwalior Just Call 8617370543 Top Class Call Girl Service AvailableCall Girls Gwalior Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Gwalior Just Call 8617370543 Top Class Call Girl Service Available
 
Call Girls Visakhapatnam Just Call 9907093804 Top Class Call Girl Service Ava...
Call Girls Visakhapatnam Just Call 9907093804 Top Class Call Girl Service Ava...Call Girls Visakhapatnam Just Call 9907093804 Top Class Call Girl Service Ava...
Call Girls Visakhapatnam Just Call 9907093804 Top Class Call Girl Service Ava...
 
Call Girls Ooty Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Ooty Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Ooty Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Ooty Just Call 9907093804 Top Class Call Girl Service Available
 

NEPHP '12: Create a RESTful API

  • 1. and Conquering the World Andrew Curioso
  • 2.  Cre·ate[kree-eyt] verb 1. to cause to come into being, as something unique that would not naturally evolve or that is not made by ordinary processes. 2. to evolve from one's own thought or imagination, as a work of art or an invention. Source: Dictionary.com
  • 3.  Ep·ic [ep-ik] adjective 1. noting or pertaining to a long poetic composition, usually centered upon a hero, in which a series of great achievements or events is narrated in elevated style: Homer's Iliad is an epic poem. 2. resembling or suggesting such poetry: an epic novel on the founding of the country. 3. heroic; majestic; impressively great: the epic events of the war. 4. of unusually great size or extent: a crime wave of epic proportions. Source: Dictionary.com
  • 4.  Rest[rest] noun 1. the refreshing quiet or repose of sleep: a good night's rest. 2. refreshing ease or inactivity after exertion or labor: to allow an hour for rest. 3. relief or freedom, especially from anything that wearies, troubles, or disturbs. 4. a period or interval of inactivity, repose, solitude, or tranquility: to go away for a rest. 5. mental or spiritual calm; tranquility. 6. Representational State Transfer Source: Dictionary.com
  • 5.  Rest [rest] noun 1. the refreshing quiet or repose of sleep: a good night's rest. 2. refreshing ease or inactivity after exertion or labor: to allow an hour for rest. 3. relief or freedom, especially from anything that wearies, troubles, or disturbs. 4. a period or interval of inactivity, repose, solitude, or tranquility: to go away for a rest. 5. mental or spiritual calm; tranquility. 6. Representational State Transfer Source: Common Knowledge
  • 6.  A·P·I [ey-pee-ahy] noun 1. Application Programming Interface. A contract between two applications that allows them to communicate effectively. Source: Andrew Curioso
  • 7.  Con·quer[kong-ker] verb 1. to acquire by force of arms; win in war: to conquer a foreign land. 2. to overcome by force; subdue: to conquer an enemy. 3. to gain, win, or obtain by effort, personal appeal, etc.: conquer the hearts of his audience. 4. to gain a victory over; surmount; master; overcome: to conquer disease and poverty; to conquer one's fear. Source: Andrew Curioso
  • 8.  World [wurld] noun 1. the earth or globe, considered as a planet. 2. ( often initial capital letter ) a particular division of the earth: the Western world. 3. the earth or a part of it, with its inhabitants, affairs, etc., during a particular period: the ancient world. 4. humankind; the human race; humanity: The world must eliminate war and poverty. 5. the public generally: The whole world knows it. Source: Andrew Curioso
  • 9.
  • 10.  World [wurld] noun 1. The ecosystem around your startup or cause into which you drag your family, friends, investors, and anyone who will listen. Source: Andrew Curioso
  • 11. Internal only (closed)  External (open)  Multiple consumers  Everything +  Scalable  Growth ▪ Mash-ups!  Semi-Private ▪ Innovation ▪ Evangelists  Partner Integration  “The Platform Play”
  • 12. PATTERNS PROTOCOLS / FORMATS  Representation State  XML Transfer (REST)  JSON  Remote Procedure Calls  YAML (RPC)  AMF  Etc...
  • 13. Representational State Transfer  Resource based (nouns)  5 verbs  GET   POST  DELETE   Easy in PHP
  • 14. 1. Client / Server 2. Stateless 3. Cacheable 4. Layered 5. Uniform Interface 6. ???
  • 15. URL shortening website  User authentication (simple)  Create, read, update, and delete (CRUD)
  • 16. id  user_id users urls  url  created  modified
  • 17. Verb URL Action GET /urls.json List URLs GET /urls/123.json Resource for URL with id 123 POST /urls.json Shorten a new URL PUT /urls/123.json Edit the URL with the ID 123 DELETE /urls/123.json Delete the URL with the ID 123 POST /urls/123.json Also edit the URL with the ID 123
  • 18. <?php if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) { ... } ?>
  • 19. Only you can prevent CSRF  Only POST and PUT should write data  Only POST and DELETE should delete data  Check Referrer  Per request tokens
  • 20. HTTP Accepts  Mime Types
  • 21. Simple  Fast  Wide-spread  Mime: application/json <?php echo json_encode( $urlObject); ?>
  • 22. P w/ padding  Uses callback  Cross domain  Mime: application/javascript if ( array_key_exists('callback’, $_GET) ) $callbackFunc = $_GET['callback']; else $callbackFunc = false; if ( $callbackFunc !== false ) echo $callbackFunc.'('; echojson_encode( $urlObject ); if ( $callbackFunc ) echo ')'; ?>
  • 23. Strongly Typed  Human readable  Lots of existing tools  Mime: application/xml <?php ... ?>
  • 24. HUMAN READABLE BINARY   AMF   Microsoft Excel  HTML  PDF  YAML  JPEG / PNG  CSV  Etc…  Serialized PHP  Etc…
  • 25. Create curl –d “url=www.example.com” http://tinyr.me/urls.json Read curl http://tinyr.me/urls/123.json Update curl –d “url=www.example.com/foo” http://tinyr.me/urls/123.json Delete curl –X DELETE http://tinyr.me/urls/123.json
  • 26. WE HAVE WE’RE MISSING  Request handling  Error handling  RESTful Output Formats  Pagination  XML  Authentication  Json / JsonP  Authorization  Documentation
  • 27. Success  Error (continued)  200 OK *  405 Method Not Allowed *  201 Created *  409 Conflict  303 See Other *  410 Gone  500 Internal Server Error *  Error  501 Not Implemented  401 Unauthorized *  503 Service Unavailable  402 Payment Required  403 Forbidden *  404 Not Found *
  • 28. If not a POST request  405 Method Not Allowed  Already existed  303 See Other  Save success  201 Created  Failure  500 Internal Server Error with explanation
  • 29. If not a POST or PUT request  405 Method Not Allowed  Invalid ID  404 File Not Found  Success  200 OK  Failure  500 Internal Server Error with explanation
  • 30. If not a POST or DELETE request  405 Method Not Allowed  Invalid ID  404 File Not Found  Success  200 OK  Failure  500 Internal Server Error with explanation
  • 31. User is not allowed to access resource  403 Forbidden  User is not logged in  401 Unauthorized
  • 32. Same format  Descriptive  Human  Computer  Comprehensive
  • 33. {"Error": { "code" : 404, "description" : "File Not Found" }}
  • 34. Return meta-information  Rate limiting  Pagination  Expiration / cache  Etc.
  • 35. Uses HTTP headers  App defined “used to” start with “X-” header(“X-Current-Page:”.$currentPage); header(“X-Total: ”.$total); header(“X-Per-Page: ”.$perPage);
  • 36. SOME PLATFORMS (LIKE MANY WEB BROWSERS) FORTUNATELY…  Do not support:  You can/should do this:  DELETE  PUT _method=DELETE
  • 37. DELETE /urls/123.json HTTP1.1 POST /urls/123.json HTTP1.1 Host: www.example.com Host: www.example.com _method=DELETE
  • 38. BAD No Authentication GOOD Basic BETTER Form and Cookie Digest BEST Oauth Shared Secret
  • 39. There are no shortcuts  One or more:  All Users (public)  Owner  Shared User  Moderator  Administrator
  • 40. Vocabularies / Schemas  DTD or schema files  Examples  Code  I/O  Community  Feedback  WSDL 2.0
  • 41. PHP rocks with REST  SOAP is heavy  AMF is light but requires Flash  But, if you still want to, you can
  • 42. User Gateway REST API POST REST request REST request Response Aka the Façade Pattern
  • 43.
  • 44. Built-in to HTTP  Expires  Last-Modified  Cache-Control  Etag ▪ If-None-Match  Stateless
  • 45. Hypermedia as the Engine of Application State Roy Thomas Fielding
  • 46.
  • 47.
  • 48. REST constraints  Documentation  Security  Unit tests
  • 49. Contact:  www.AndrewCurioso.com/contact  @AndrewCurioso on Twitter  Careers.FreePriceAlerts.com

Hinweis der Redaktion

  1. Thank you _____________Today I’m going to be talking about creating a RESTful API with PHP. Not just any RESTful API, but an Epic one.
  2. Even if you are developing a closed API…I hope everyone considers open APIs.All this roles up into one concept. “The platform play.” So if you need something to go back to your boss or your investors with… that’s the thing. You’re making a platform play.
  3. There are multiple patterns for APIs. There are a couple more lesser used ones but the two big ones are REST and RPC.Within those patterns you can use one or more formats to transfer your data.
  4. Rest stands for Representational State Transfer incase you missed it in Neal’s presentation. As mentioned yesterday, the largest example of REST in the wild is HTTP.Luckily for us, CakePHP is usually layered on-top of HTTP so it inherits all the RESTful mechanisms.REST has a concept called resources (a specific user or comment are two examples).They are also called nouns which are acted on by verbs.There are five verbs in HTTP. We will focus on three.Finally, one last important thing… CakePHP makes REST easy.
  5. The app that I will be using as an example today is the simplest app that I could think of.It is a URL shortening services that allows you to authenticate and thus be able to delete and edit URLs that you yourself shortened, and also basic CRUD.
  6. There are two models. The user model, which is pretty standard for a CakePHP project, and the urls model which I have on the screen.A full URL shortened can, of course, get much more complicated than that. But for today I’m keeping it basic.
  7. Once you’ve baked your model and what not you can open up your router and map the resource. This will register all the routes you need for REST in one call.You can still do it manually if you want but you don’t have to.These are the six routes registered when you map a resource.
  8. Before we begin developing views we’ll haveto tell PHP to recognize file extensions and switch the views and layouts accordingly.We do this by turning on parseExtensions in the routes.php file and including the RequestHandler component in the app_controller.The RequestHandler component is what actually switches the views. It also includes helpers automatically in the view if a helper has the same name as the extension (like XML) and parses incoming POSTed XML and assigns it to the data property of the controller.
  9. One rule to live by is to never write or delete data on anything that is not a POST, PUT, or DELETE request.The main purpose of this rule is to protect against Cross Site Request Forgeries or CSRF attacks which are every difficult to defend against otherwise.Say that the add method accepted GET requests. Someone could then simply embed an image on a page with the add URL as a source and execute a add() as any user who visits the site.
  10. We now need to create a couple views.The Json view is the first and the one that I like the most. Because it is simple and easy to understand.It is fast thanks to native PHP support, and also very wide-spread.What you see here is the entire view for the view action in the urls controller.Notice the path to the view. The RequestHandler will tell Cake to look in the json folder for the appropriate view.
  11. We can also easily support JsonP or Json with padding.JsonP specifies a Javascript callback function to execute with the results of a request.It allows for cross domain requests because you can trigger it via a simple script-include and function calls works across domains so the callback will work just fine.One important note is that it is only for GET requests. So, as I said earlier, it shouldn’t be able to write or delete data.JsonP can be handle generically in the layout. Notice the layout path.A JsonP request always takes the callback via a query parameter. So your app controller can read in the callback then set it for use in the view. The layout then reads it sand wraps the output in it is necessary.
  12. Now for the XML view. And I can hear the boos now.XML does have some benefits. It is strongly typed, human readable, and has lots of existing tools available.Like Json, the view is pretty self-explanatory. Note the xml sub-directory in the view path.
  13. One of the best parts about using parseExtensions and RequestHandler is you can literally have as many views as you want into the data.I listed just some of them here.
  14. Erik’s talk.
  15. If you did the ACL stuff Erik was talking about…Little difficult. Default behavior is redirectController, model, and object
  16. Maintenance mode