Beyond The Browser - Creating a RESTful Web Service With WordPress
-
Upload
christopher-reding -
Category
Technology
-
view
7.138 -
download
0
description
Transcript of Beyond The Browser - Creating a RESTful Web Service With WordPress
HOWDY WPYallENJOY SOME SOUTHERN FRIED CODE
Beyond thebrowser
GETTING RESTful WITH WORDPRESS
AND BEING AWESOME
CREDING
PRESENTEDBY
AKA CHRISTOPHER REDING
THE AWESOMEREST? BUT IM NOT TIRED.
WHAT IS REST?MORE THAN A NAP
HOW IT WORKSPOST/GET/PUSH/DELETE
DATA TRAVELLERMAKE IT PORTABLE
100WT FTWPRACTICLE USES
WPYALL
WHAT IS REST
The HIZZYWHAT WHY MISSION
REST requires less code to implement than traditional methods.
REST offers greater flexibility than other methods.
Data can be served on the rocks as JSON or neat as XML, as well as any other format you may desire.
USE WordPress to manage data for an application that exists outside the realm of the WordPress install. Allow the application and the WP install to communicate and respond to client interaction as well as changes in data. Push notifications, real time data sauce
A simple web service implemented using HTTP and the principles of REST. It is a collection of resources, with four defined aspects:The base URI for the web service, such as http://example.com/resources/
the Internet media type of the data supported by the web service. This is often JSON, XML or YAML but can be any other valid Internet media type.
The set of operations supported by the web service using HTTP methods (e.g., GET, PUT, POST, or DELETE).
The API must be hypertext driven.[11]
FROM WIKIPEDIA
BE THE CLOUD
WPYALL
DATA FORMATS
CSV XML JSON TEXT
There are several options when it comes to outputting your data, there is no right or wrong, however, the most common in my experience are XML and JSON
HOW IT WORKS
SERVER
INFORMATION
RESPONSEDEVICE
HTTP REQUEST
REQUESTS ARE MADE TO THE SERVER WHICH RETURNSTHE STATUS AND THE DATA
HOW IT WORKS
{“status”:”ok”,
“data”:
[{“id”:1,
“title”:”the title”,
“content”:”content body”
},{“id”:1,
“title”:”the title”,
“content”:”content body”
}]}
USE A PLUGIN
BECAUSE IT’S EASY AND EXTENDABLE
JSON APIhttp://wordpress.org/extend/plugins/json-api/
OR ROLL YOUR OWN
USE A THEME
BECAUSE IT’S HIGHLY CUSTOMIZABLE AND YOURS
CREATE AN API THEME
ALTERNATELY
PORTABILITY
Data was stored on pieces of paper so the stock market crashed causing people to get real depressed and ended in a world war.
This could have been avoided with WordPress.
1929Modern folks can now store their data in WordPress. It can be accessed from anywhere and from multiple platforms. The data is no longer tied to paper, or the browser. People are happy and use WordPress to end WAR.
2012
Portable Data is Happy Data
I made most of this up, but you get the point
MISSION
By making data portable we can reach a larger audience.
FIND ME HERE
FACEBOOKWWW.FACEBOOK.COM/CREDING
TWITTERWWW.TWITTER.COM/CREDING
MYSPACEWWW.MYSPACE.COM/CREDING
LINKEDINWWW.LINKEDIN.COM/CREDING
THANK YOU
GO AND BE AWESOME
HTTP://CHRISTOPHERREDING.COM/