My Star Wars WordPress REST API presentation WordCamp Antwerp 2016

Not that long ago in a browser
pretty, pretty close…
It is a period of civil unrest.
JavaScript MVC Troopers have driven the PHP rebels from their calm state of mind and are forcing them to rethink their paradigm.

Evading total annihilation, a group of freedom fighters have established a new base on the remote world called THE WORDPRESS REST API

Speaking about WordPress + Star Wars

Scroll down for the TL;DR
This is the intro of my Star Wars presentation about the WordPress REST API. I used Star Wars as a theme, basically because I thought the REST API, Angular 2 and JS MVC information was not nerdy enough.

I also used analogies from the films to clarify how certain functions work, what the benefits are and which kind of possibilities open up with single page apps, JavaScript and a REST API in the backend.
e.g. R2D2’s mingling with the central computer to stop the trash compactor .. euh “compacting” Leia, Luke, Han and Chewie, is basically one computer (droid) giving commands to another computer without or bypassing the ‘regular’ interface.
(the ones the bad guys use, probably just a button on a bigass control panel which says ‘Compact the trash’ )

Since I think the talk went well, but not THAT well as I anticipated (bit nervous and forgot a few things), I have a few extra remarks. You don’t NEED-NEED JS MVC frameworks to connect with a REST API. It can be done via various types of software or programming languages. PHP is not dead. But I used this example because

  1. JS MVC frameworks are way cool
  2. Calypso is written in React
  3. JS is meant to be learnt deeply
  4. I didn’t spent time and sometimes frustrating hours building the frontend and connecting to the REST API first in vanilla JavaScript, then with jQuery, then with Angular and now for this demo in Angular2 (and so, TypeScript) and then not using it as THE example ffs ;) what would you expect ? ;)

There’s some bases I didn’t cover for in the talk. That was by design, like what you can do in the backend, add custom endpoints etc, make more data available via hooks for the post object JSON. Other things were example-sites. The Day Of Rest site is a good example for instance that I forgot to mention. Or the New York Times who use it for live blogging special events.

TL;DR
The main thing I wanted to convey is: you can build (many) completely different frontend for your site bypassing all WordPress functions, themes etc… WordPress basically becomes just a platform or a database. Especially when you also write a custom backend for it and bypass the existing wp-admin (e.g. what Calypso does).
And the second main point is: Learn JavaScript deeply, it’ll become more and more important.

Presentation slides

See the speakerdeck here
(music removed for possible copyright issues, hum the tune yourselves when you see the logo shoot through space)

XHTML: You can use these tags: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>