SlideShare a Scribd company logo
1
WordPress, WP-API
And Client Side
Applications
Roy Sivan Twitter/Github - @royboy789 roysivan.com | arcctrl.com
There will be code
There will be learning
There will be memes
Be Warned
WE ARE AWESOME
WordPress developer at
Disney
and the co-founder of
My first install of WordPress was
0.7 and been a user &
developer since
Roy Sivan Twitter/Github - @royboy789 roysivan.com | arcctrl.com
Who is this geek?
Why build Web Applications
with WordPress?
Why not?
HOW?
WP
Very nice!
Client Side?
Client = Browser
POP QUIZ
What is the fastest file a web server
can serve?
CLIENT VS. SERVER SIDE - REQUESTS AND RESPONSE
One request to rule them all
“I want my blog posts”
SERVER CLIENT
PHP is the language behind WordPress
SERVERCLIENT
Client: Sends request for index.php
Server: Processes PHP code turning it into HTML.
Returns full HTML
Benefits of Loading Client Side
Less load on the server
CDN all template files
Easier to cache JS and HTML
VERY Scalable
AJAX - can transform your UI / UX
Single Page Web Application
S.P.A
Code Example: Server Side Loop
<?php
//list all posts - this is PHP & HTML
while ( have_posts() ) : the_post();
?>
<article class="postWrapper">
<h3 class="page_title text-center">
<a href=“<?php the_permalink(); ?>” class="content">
<?php the_title(); ?>
</a>
</h3>
<?php the_content(); ?>
</article>
<?php
endwhile;
?>
Living on the client side
Code Example: Client Side Loop
(using AngularJS)
//list all posts - this is HTML
<article class="postWrapper" ng-repeat="post in posts” >
<h3 class="page_title text-center">
<a href=“/coh/#/post/{{post.ID}}” class="content">
{{post.title}}
</a>
</h3>
{{post.content}}
</article>
AngularJS - the important bits
<?php the_title(); ?>
PHP AngularJS HTML Template
{{post.title}}
<?php the_content(); ?> {{post.title}}
<?php the_permalink(); ?> {{post.link}}
WP-API Response Example
/posts - WP-API endpoint
{
ID: 1
content: '<p>Welcome to WordPress. This is your first post. Edit or
delete it, then start blogging!</p>',
title: 'Hello world!',
status: 'publish',
author : {..},
...
},
…
ASK NOT HOW, but WHY?
Case Study: Client
Client
WordPress for:
Users

User Authentication

Custom Post Types

Data Storage
WP-API / S.P.A for:
DOM Memory

User Profiles

Inline Commenting

Inline Bookmarks
Case Study: CodeCavalry
CodeCavalry.com
WordPress for:
Users

User Authentication

Custom Post Types

Data Storage
S.P.A for:
Session (CPT) Create

Firebase - WebSocket

User Dashboard

User Profiles
Awesome Resources
Roy Sivan Twitter/Github - @royboy789 roysivan.com | arcctrl.com
WP-API on GitHub
https://github.com/WP-API/WP-API
CodeCavalry
http://www.codecavalry.com
AngularJS WP Theme
http://www.roysivan.com/angular-wordpress-theme
AngularJS For WP Plugin
http://www.roysivan.com/angularjs-for-wordpress
Community Built WP App with AngularJS & Slides
http://www.roysivan.com/blog
Thank You
Find me online:
Twitter: @royboy789
Github: @royboy789
CodeCavalry.com/royboy789
Roy Sivan Twitter/Github - @royboy789 roysivan.com | arcctrl.com

More Related Content

What's hot

What's hot (17)

Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16
 
Using WordPress as a Headless CMS
Using WordPress as a Headless CMSUsing WordPress as a Headless CMS
Using WordPress as a Headless CMS
 
Intro to WordPress Plugins
Intro to WordPress PluginsIntro to WordPress Plugins
Intro to WordPress Plugins
 
Creating SmartPhone Apps Using WordPress
Creating SmartPhone Apps Using WordPressCreating SmartPhone Apps Using WordPress
Creating SmartPhone Apps Using WordPress
 
End to-End SPA Development Using ASP.NET and AngularJS
End to-End SPA Development Using ASP.NET and AngularJSEnd to-End SPA Development Using ASP.NET and AngularJS
End to-End SPA Development Using ASP.NET and AngularJS
 
WordPress as a Headless CMS - Bronson Quick
WordPress as a Headless CMS - Bronson QuickWordPress as a Headless CMS - Bronson Quick
WordPress as a Headless CMS - Bronson Quick
 
Top 10 WordPress Plugins
Top 10 WordPress PluginsTop 10 WordPress Plugins
Top 10 WordPress Plugins
 
Welcome to the World of WordPress
Welcome to the World of WordPressWelcome to the World of WordPress
Welcome to the World of WordPress
 
WordPress as a Service
WordPress as a ServiceWordPress as a Service
WordPress as a Service
 
Way of the Future
Way of the FutureWay of the Future
Way of the Future
 
Ember
EmberEmber
Ember
 
Angular js - 10 reasons to choose angularjs
Angular js - 10 reasons to choose angularjs Angular js - 10 reasons to choose angularjs
Angular js - 10 reasons to choose angularjs
 
Develop and Deploy Outside the Repo
Develop and Deploy Outside the RepoDevelop and Deploy Outside the Repo
Develop and Deploy Outside the Repo
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescue
 
React JS
React JSReact JS
React JS
 
State of the Word 2015, WordCamp US
State of the Word 2015, WordCamp USState of the Word 2015, WordCamp US
State of the Word 2015, WordCamp US
 

Similar to WordCamp San Diego 2015 - WordPress, WP-API, and Web Applications

Similar to WordCamp San Diego 2015 - WordPress, WP-API, and Web Applications (20)

You Got React.js in My PHP
You Got React.js in My PHPYou Got React.js in My PHP
You Got React.js in My PHP
 
Using the new WordPress REST API
Using the new WordPress REST APIUsing the new WordPress REST API
Using the new WordPress REST API
 
API Technical Writing
API Technical WritingAPI Technical Writing
API Technical Writing
 
Front End Development for Back End Developers - Devoxx UK 2017
 Front End Development for Back End Developers - Devoxx UK 2017 Front End Development for Back End Developers - Devoxx UK 2017
Front End Development for Back End Developers - Devoxx UK 2017
 
Plugin development demystified 2017
Plugin development demystified 2017Plugin development demystified 2017
Plugin development demystified 2017
 
Theming websites effortlessly with Deliverance (CMSExpo 2010)
Theming websites effortlessly with Deliverance (CMSExpo 2010)Theming websites effortlessly with Deliverance (CMSExpo 2010)
Theming websites effortlessly with Deliverance (CMSExpo 2010)
 
Integrating Social Apps with Content Driven Sites using Apache Rave and Sprin...
Integrating Social Apps with Content Driven Sites using Apache Rave and Sprin...Integrating Social Apps with Content Driven Sites using Apache Rave and Sprin...
Integrating Social Apps with Content Driven Sites using Apache Rave and Sprin...
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIs
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
 
Wordpress beyond blogging
Wordpress beyond bloggingWordpress beyond blogging
Wordpress beyond blogging
 
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
 
Course CodeSchool - Shaping up with Angular.js
Course CodeSchool - Shaping up with Angular.jsCourse CodeSchool - Shaping up with Angular.js
Course CodeSchool - Shaping up with Angular.js
 
Schema-First API Design
Schema-First API DesignSchema-First API Design
Schema-First API Design
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
 
Faster WordPress Workflows
Faster WordPress WorkflowsFaster WordPress Workflows
Faster WordPress Workflows
 
Web api
Web apiWeb api
Web api
 
243329387 angular-docs
243329387 angular-docs243329387 angular-docs
243329387 angular-docs
 
Extending & Scaling | Dallas PHP
Extending & Scaling | Dallas PHPExtending & Scaling | Dallas PHP
Extending & Scaling | Dallas PHP
 
Introduction to blogging with Jekyll
Introduction to blogging with JekyllIntroduction to blogging with Jekyll
Introduction to blogging with Jekyll
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 

More from Roy Sivan

More from Roy Sivan (13)

WordPress in Enterprise
WordPress in EnterpriseWordPress in Enterprise
WordPress in Enterprise
 
Building Gutenberg Applications & WebOPS Case Study
Building Gutenberg Applications & WebOPS Case StudyBuilding Gutenberg Applications & WebOPS Case Study
Building Gutenberg Applications & WebOPS Case Study
 
Building Headless Applications with WordPress & Gutenberg
Building Headless Applications with WordPress & GutenbergBuilding Headless Applications with WordPress & Gutenberg
Building Headless Applications with WordPress & Gutenberg
 
Gutenberg & Custom Applications powered by WordPress
Gutenberg & Custom Applications powered by WordPressGutenberg & Custom Applications powered by WordPress
Gutenberg & Custom Applications powered by WordPress
 
WordPress SFO Meetup - Gutenberg FAQ
WordPress SFO Meetup - Gutenberg FAQWordPress SFO Meetup - Gutenberg FAQ
WordPress SFO Meetup - Gutenberg FAQ
 
WCSD - GutenWhat? A Gutenberg FAQ
WCSD - GutenWhat? A Gutenberg FAQWCSD - GutenWhat? A Gutenberg FAQ
WCSD - GutenWhat? A Gutenberg FAQ
 
A Crash Course in WordPress Gutenberg
A Crash Course in WordPress GutenbergA Crash Course in WordPress Gutenberg
A Crash Course in WordPress Gutenberg
 
Powering Content Driven Applications with the World’s Most Popular CMS #ngconf
Powering Content Driven Applications with the World’s Most Popular CMS #ngconfPowering Content Driven Applications with the World’s Most Popular CMS #ngconf
Powering Content Driven Applications with the World’s Most Popular CMS #ngconf
 
WPCampus Online - The Case for the WordPress REST API
WPCampus Online - The Case for the WordPress REST APIWPCampus Online - The Case for the WordPress REST API
WPCampus Online - The Case for the WordPress REST API
 
Angular Remote Conf - Building with Angular & WordPress
Angular Remote Conf - Building with Angular & WordPressAngular Remote Conf - Building with Angular & WordPress
Angular Remote Conf - Building with Angular & WordPress
 
The Case for the WordPress REST API | WordCamp Montreal 2016
The Case for the WordPress REST API | WordCamp Montreal 2016The Case for the WordPress REST API | WordCamp Montreal 2016
The Case for the WordPress REST API | WordCamp Montreal 2016
 
Building a JavaScript App powered by WordPress & AngularJS
Building a JavaScript App powered by WordPress & AngularJSBuilding a JavaScript App powered by WordPress & AngularJS
Building a JavaScript App powered by WordPress & AngularJS
 
Becoming a WordPress Artisan - Developer
Becoming a WordPress Artisan - DeveloperBecoming a WordPress Artisan - Developer
Becoming a WordPress Artisan - Developer
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 

Recently uploaded (20)

"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 

WordCamp San Diego 2015 - WordPress, WP-API, and Web Applications

  • 1. 1 WordPress, WP-API And Client Side Applications Roy Sivan Twitter/Github - @royboy789 roysivan.com | arcctrl.com
  • 2. There will be code There will be learning There will be memes Be Warned
  • 3.
  • 5. WordPress developer at Disney and the co-founder of My first install of WordPress was 0.7 and been a user & developer since Roy Sivan Twitter/Github - @royboy789 roysivan.com | arcctrl.com Who is this geek?
  • 6. Why build Web Applications with WordPress? Why not?
  • 9. Client Side? Client = Browser POP QUIZ What is the fastest file a web server can serve?
  • 10. CLIENT VS. SERVER SIDE - REQUESTS AND RESPONSE One request to rule them all “I want my blog posts” SERVER CLIENT
  • 11. PHP is the language behind WordPress SERVERCLIENT Client: Sends request for index.php Server: Processes PHP code turning it into HTML. Returns full HTML
  • 12. Benefits of Loading Client Side Less load on the server CDN all template files Easier to cache JS and HTML VERY Scalable AJAX - can transform your UI / UX
  • 13. Single Page Web Application S.P.A
  • 14. Code Example: Server Side Loop <?php //list all posts - this is PHP & HTML while ( have_posts() ) : the_post(); ?> <article class="postWrapper"> <h3 class="page_title text-center"> <a href=“<?php the_permalink(); ?>” class="content"> <?php the_title(); ?> </a> </h3> <?php the_content(); ?> </article> <?php endwhile; ?>
  • 15. Living on the client side
  • 16. Code Example: Client Side Loop (using AngularJS) //list all posts - this is HTML <article class="postWrapper" ng-repeat="post in posts” > <h3 class="page_title text-center"> <a href=“/coh/#/post/{{post.ID}}” class="content"> {{post.title}} </a> </h3> {{post.content}} </article>
  • 17. AngularJS - the important bits <?php the_title(); ?> PHP AngularJS HTML Template {{post.title}} <?php the_content(); ?> {{post.title}} <?php the_permalink(); ?> {{post.link}}
  • 18. WP-API Response Example /posts - WP-API endpoint { ID: 1 content: '<p>Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!</p>', title: 'Hello world!', status: 'publish', author : {..}, ... }, …
  • 19. ASK NOT HOW, but WHY?
  • 21. Client WordPress for: Users
 User Authentication
 Custom Post Types
 Data Storage WP-API / S.P.A for: DOM Memory
 User Profiles
 Inline Commenting
 Inline Bookmarks
  • 23. CodeCavalry.com WordPress for: Users
 User Authentication
 Custom Post Types
 Data Storage S.P.A for: Session (CPT) Create
 Firebase - WebSocket
 User Dashboard
 User Profiles
  • 24. Awesome Resources Roy Sivan Twitter/Github - @royboy789 roysivan.com | arcctrl.com WP-API on GitHub https://github.com/WP-API/WP-API CodeCavalry http://www.codecavalry.com AngularJS WP Theme http://www.roysivan.com/angular-wordpress-theme AngularJS For WP Plugin http://www.roysivan.com/angularjs-for-wordpress Community Built WP App with AngularJS & Slides http://www.roysivan.com/blog
  • 25. Thank You Find me online: Twitter: @royboy789 Github: @royboy789 CodeCavalry.com/royboy789 Roy Sivan Twitter/Github - @royboy789 roysivan.com | arcctrl.com