beyond the browser - creating a restful web service with wordpress

15
HOWDY WPYall ENJOY SOME SOUTHERN FRIED CODE

Upload: christopher-reding

Post on 05-Jul-2015

7.139 views

Category:

Technology


0 download

DESCRIPTION

Creating a RESTful Web Service using WordPress that can power your mobile app, Web Application, or Internet House Party.

TRANSCRIPT

Page 1: Beyond The Browser - Creating a RESTful Web Service With WordPress

HOWDY WPYallENJOY SOME SOUTHERN FRIED CODE

Page 2: Beyond The Browser - Creating a RESTful Web Service With WordPress

Beyond thebrowser

GETTING RESTful WITH WORDPRESS

Page 3: Beyond The Browser - Creating a RESTful Web Service With WordPress

AND BEING AWESOME

CREDING

PRESENTEDBY

AKA CHRISTOPHER REDING

Page 4: Beyond The Browser - Creating a RESTful Web Service With WordPress

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

Page 5: Beyond The Browser - Creating a RESTful Web Service With WordPress

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

Page 6: Beyond The Browser - Creating a RESTful Web Service With WordPress

BE THE CLOUD

WPYALL

Page 7: Beyond The Browser - Creating a RESTful Web Service With WordPress

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

Page 8: Beyond The Browser - Creating a RESTful Web Service With WordPress

HOW IT WORKS

SERVER

INFORMATION

RESPONSEDEVICE

HTTP REQUEST

REQUESTS ARE MADE TO THE SERVER WHICH RETURNSTHE STATUS AND THE DATA

Page 9: Beyond The Browser - Creating a RESTful Web Service With WordPress

HOW IT WORKS

{“status”:”ok”,

“data”:

[{“id”:1,

“title”:”the title”,

“content”:”content body”

},{“id”:1,

“title”:”the title”,

“content”:”content body”

}]}

Page 10: Beyond The Browser - Creating a RESTful Web Service With WordPress

USE A PLUGIN

BECAUSE IT’S EASY AND EXTENDABLE

JSON APIhttp://wordpress.org/extend/plugins/json-api/

OR ROLL YOUR OWN

Page 11: Beyond The Browser - Creating a RESTful Web Service With WordPress

USE A THEME

BECAUSE IT’S HIGHLY CUSTOMIZABLE AND YOURS

CREATE AN API THEME

ALTERNATELY

Page 12: Beyond The Browser - Creating a RESTful Web Service With WordPress

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

Page 13: Beyond The Browser - Creating a RESTful Web Service With WordPress

MISSION

By making data portable we can reach a larger audience.

Page 15: Beyond The Browser - Creating a RESTful Web Service With WordPress

THANK YOU

GO AND BE AWESOME

HTTP://CHRISTOPHERREDING.COM/