RESTful Future of WordPress
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

RESTful Future of WordPress

on

  • 88 views

A presentation to the Metro Detroit WordPress Meetup Group on August 10th, 2014 by Hasani Rogers about the REST API and it's integration with WordPress.

A presentation to the Metro Detroit WordPress Meetup Group on August 10th, 2014 by Hasani Rogers about the REST API and it's integration with WordPress.

Statistics

Views

Total Views
88
Views on SlideShare
88
Embed Views
0

Actions

Likes
0
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

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

RESTful Future of WordPress Presentation Transcript

  • 1. THE RESTful Future of WordPress HOW THE NEW REST API WILL HELP LEAD WORDPRESS INTO WEB 3.0
  • 2. About Me  Started off with an interest in art and design due to Mario Paint  Began making “Sprites” and created personal websites about them  Became interested in development due to wanting more power over my art  Taught myself HTML, Flash, and PHP using Front Page and books  Got an A.A.S. in Computer Information Science in 2007  Started developing professionally in 2007
  • 3. My history with WordPress  First steady non-freelancing job was with Blue Water Technologies  Was introduced to WordPress at v 1.x with Blue Water Technologies  Used WordPress for small projects  Originally favored Joomla! over WordPress  Got serious with WordPress at Lowe Campbell Ewald  Became lead developer for USPS Deliver Magazine, a WordPress site  Began architecting custom WordPress solutions with OnStar  Created custom theme framework “Djehuty” that supported many advanced features.  http://onstarconnections.com
  • 4. The Evolution of WordPress
  • 5. Past. Present. Future. Developers look at WordPress differently than end users. To a developer, WordPress has had 3 rough classifications of the type of software it is. Past: Publishing/Blogging Software Present: Content Management System Future: Application Framework
  • 6. Past: Blogging  WordPress began as a fork from b2/cafelog during Web 1.0  The need to automate updates was rising towards the end of Web 1.0  “News” software was getting more and more common.  The Web 2.0 “personal” direction began to transform news software into more personalized “web-logs”  During this time there was a distinct difference between “news” “blog” and “cms” software  WordPress began focusing on the (at the time new) web-log aspect of software
  • 7. Present: CMS  In the beginning CMSs where expensive custom enterprise software  WordPress began getting extremely popular during the rise of open-sourced personal CMSs  The WordPress community recognized the trend and shifted from pure blogging into more advanced content management  Key advanced features were added to the core at the end of 2.x and beginning of 3.x.  Some of those key features where: custom post types, custom taxonomies, blog network, more advanced user and content permissions, rewrite API, etc  This allowed WP to compete with the likes of Joomla! and Drupal
  • 8. Future: Application Framework  WP is evolving into an application framework with APIs like REST  To a developer, an application framework is very different from a CMS  A CMS allows developers to have end users easily control content  An application framework allows a developer to create any kind of app they please  The web is moving towards a semantic smart-app centric goal known as “Web 3.0”  Once again the WordPress community has recognized the need to adapt and the REST API will play a key role this time around
  • 9. Technical Demystification
  • 10. REST. LAMP. MEAN. Time to get technical. Developers love making words out of acronyms. Speaking about them is second nature to us. I’ll be using 3 terms to talk about key technologies as WordPress transforms for the future. I want to give some background info about them. REST: REpresentational State Transfer LAMP: Linux, Apache, MySQL, PHP (and/or python/perl) MEAN: MongoDB, ExpressJS, AngularJS, Node.js
  • 11. REST  REpresentational State Transfer is a fancy way of saying “a really easy way to move data between systems”  REST is abstract and doesn’t really on any particular technology other than the very solid Hyper Text Transfer Protocol the http:// of a URL.  Facebook Graph API is a good away to relate to this concept  http://graph.facebook.com/emalco will allow any app I create to get information about Eric Malcolm  The WordPress API will allow me to get data about a WordPress site as easily as I can get information about Eric from Facebook  REST can return data in many formats but the WordPress REST API does so in the popular JSON format.
  • 12. LAMP WordPress was created and depends on a stack called LAMP. A stack basically means separate technologies working together. LAMP is actually four technologies. Linux: An operating system Apache: A web server MySQL: A database server PHP/PERL/Python: Server scripting languages
  • 13. MEAN Mean is the response to the limitations of the technologies that power Web 2.0. It is the new kid on the block and is at the forefront of a revolution on the web. MongoDB: A JavaScript database engine ExpressJS: A simple Node.js web server and app framework AngularJS: An MVC JavaScript app framework Node.js: A high performance JavaScript runtime
  • 14. What this means for WordPress?  MEAN is rapidly replacing LAMP as more developers leave LAMP for MEAN  You’ll notice LAMP is mostly about servers where as MEAN is about JavaScript  JavaScript is a frontend technology that allows more power with devices  MEAN is perfect for the direction of Web 3.0 because og its asynchronous event driven i/o architecture  If you guessed that poses a problem for WordPress you guessed right  The WordPress community is well aware of MEAN  Unfortunately rewriting WordPress using MEAN is not as simple as it may seem  The good news is that rewriting WordPress is not necessary, nor smart
  • 15. The Development Revolution
  • 16. Web Generations Technically we’re still in Web 2.0. Adoption of Web 3.0 principals grow everyday however and MEAN is better suited for it.
  • 17. Mobile, the ultimate game changer  Apple changed what we think of as “personal experience” on the web when they announced the iPhone in 2007  The trend of the web being integrated in our daily lives grew much faster than the track it was already on  Consumers now use mobile devices to access the web as much as desktop devices  The WordPress community responded with things like mobile site plugins, responsive themes, HTML5 video integration, and even more recently a revamped mobile friendly admin panel.  These are mostly temporary solutions to a growing divide between servers and our devices however
  • 18. An increased divide between servers and clients  The mobile explosion is deeper than changing frontend strategies  Mobile changed how we think of the web, and thus what we use to access it, and thus the underlining technologies that power it  LAMP being a synchronous server side technology has a limited ability to interact with devices  MEAN being an asynchronous client side technology with server side support has an unparalleled way to access information about all the devices we use to access the web  Node.js is the power behind most of MEAN  Node.js was created by Ryan Dahl specifically to be a cross-platform abstraction
  • 19. A need for abstraction  Abstraction is an important concept in computer science  Computer scientists deal with complexity via abstractions  The WordPress REST API is an abstraction layer  Our society is growing to include the web all over the place and we’re expecting this more and more  We now live in a world of smartphones, smart tvs, tablets, etc  Even remotes controls, refrigerators, cars dashboards, or even home heat/cooling system are including interconnectivity to the web  LAMP and WordPress was born in time where the web was something you surfed independently of your everyday experience in a largely 1-way fashion  Those times are over
  • 20. A look into the new world wide web
  • 21. A RESTful Future for WordPress
  • 22. How REST bridges the gap  REST is an abstract communication gateway that doesn’t depend on any platform or stack like LAMP or MEAN  With REST, a developer can write an app using MEAN and it can easily communicate with a WordPress site using REST as a web service  That’s like speaking English and having it automatically translate to Klingon  The WordPress REST API does this by returning JSON data through the simple request of a URL  Developers can not only get data, they can send data to WordPress using any technology they please  Not only can developers send data, they can perform actions like updating a post remotely through the REST API
  • 23. A RESTful Example  Let’s say I want to create web app where users review movies  I want my app to be as fast and seamless as possible  I want scalability because I want to quickly port it to native apps with JS APIs  I want it be a “smart app” that can intelligently figure things out like movie theater location based on a check-in, or movie title based on a picture taken  I want users to manage various content and discussions about the movies  A good strategy then would be to create a web app with MEAN and use WordPress as a web service so that users have an easy and familiar way to manage content  Not only that, I could build multiple apps that connects to the same service  For example, an app that send push messages about user reviews about a local movie theater based on the geo location API information of the user  WordPress REST API makes this possible since it abstracts and connects data
  • 24. You can use REST now! Excited about REST in WordPress? I know I am! The REST API is scheduled for integration in WordPress’ core with version 4.0. However, you can use it now as a plugin! Here’s some useful links. Get the Plugin: https://wordpress.org/plugins/json-rest-api/ Documentation: http://developer.wordpress.com/docs/api/ Development Feed: http://make.wordpress.org/core/tag/json-api/