Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Learning JavaScript with WordPress REST API

Learning JavaScript with WordPress REST API

talk given at WordCampNL 2016, article + HTML slides here:
http://tomhermans.com/blog/learning-javascript-wp-rest-api-talk-wordcamp-nl

TLDR:
With the advent of the WordPress REST API many opportunities open up regarding building a site. And more importantly, decoupling your frontend from WordPress itself, making it a store or a platform for your data to communicate with with various tools, but mainly JavaScript. Consider this the tl;dr.

Tom Hermans

October 15, 2016
Tweet

More Decks by Tom Hermans

Other Decks in Programming

Transcript

  1. APPLICATION PROGRAM INTERFACE s et of st andar diz ed

    w ays w hich gov er n how ot her p ieces of s oftw ar e can t alk t o a pr ogr am and how it w ill r esp ond
  2. WP API’S XML-RPC & FRIENDS (ATOM..) X ML r emot

    e pr ocedur e call mobile app ADMIN-AJAX lightw eight r out ing lay er r esp onds w/ JSON RSS op en st andar d sy ndicat ion for mat
  3. RESTFUL API'S T w itt er I nst agr am

    F acebook W or d P r ess.com S tr ip e, .. and many many mor e
  4. REST : REPRESENTATIONAL STATE TRANSFER commu nicat e v ia

    HTTP s ame HTTP v er bs (GET , POST , PUT , DELETE , et c.) like w eb br ows ers us e t o r etr iev e w eb p ages and t o s end dat a t o r emot e s erv ers.
  5. HTTP TO CRUD CREA TE dat a : POST READ

    dat a : GET UPDA TE dat a : PUT DELETE dat a : DELETE
  6. YOU DON'T LEARN TO WALK BY FOLLOWING RULES. YOU LEARN

    BY DOING, AND BY FALLING OVER. ‑ Ri ch ar d Br anson
  7. DEMO TIME fr ont end management v ia AJA X

    A ngu lar 1 WIP A ngu lar 2 REST API POC
  8. t his is a st art, obv ious ly differ

    ent p ar adigm, differ ent minds et, differ ent us eage, differ ent t ooling
  9. USEFUL RESOURCES J os h P ollock R oy S

    iv an W es B os T odd M ott o J ohn P ap a M at M arqu is ‑ J av a S cr ipt for W ebdes igners WP ‑API (v2) E gghead.io (JS tuts)