wordcamp gr 2012 web apps for the masses
DESCRIPTION
Building web apps with WordPressTRANSCRIPT
![Page 1: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/1.jpg)
Web Apps for the Masses
@davidscotttuftsdavidscotttufts.com
Photo by razorray15
![Page 3: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/3.jpg)
WordPress Evolution1. Blog2. Multi-User3. Custom Post Types4. CMS5. What’s next?
Illustration by Rob Green
![Page 4: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/4.jpg)
State of the Word 2012
Slide from Matt Mullenweg’s presentation
![Page 5: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/5.jpg)
Popular Web Apps
![Page 6: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/6.jpg)
Features of Web Apps Offer a service Safe-keeping of your
personal data Access to your personal
data through an API Roles and permissions
for controlled and/or restricted access
![Page 7: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/7.jpg)
WordPress Web Apps
![Page 8: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/8.jpg)
Building a WordPress Web Application
Framework• Use the existing plugin framework• Build the plugin to be extendable• Build in a robust public facing API
Photo by Pietro Zuco
![Page 9: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/9.jpg)
WordPress App Stack1. WordPress Core2. Plugins, Themes, Actions, Filters & APIs.3. Custom: Post Types, Fields & Taxonomies4. Build a Web Application Framework Plugin5. Make Products—Bundled plugins and themes6. Build Web Apps—Registration, profiles,
friending, subscriptions, public facing API, in-app social features, sharing, etc.
Photo by Pietro Zuco
![Page 10: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/10.jpg)
Photo by Sarah Fleming
No WordPress core files or database tables should be harmed in the production of a plugin
#1 Rule:
![Page 11: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/11.jpg)
![Page 12: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/12.jpg)
KickPress Features
• Module based App Engine• Public facing API• Custom post type & taxonomy
manager• Custom roles & capabilities• Custom “related posts”• Custom workflows• Front end editing
Photo by Brad Coy
![Page 13: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/13.jpg)
Why APIs matter when building
web apps,and why you should care.
![Page 14: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/14.jpg)
With no API, users are limited in how the can access their data
Illustration by Eric Tufts
![Page 17: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/17.jpg)
Sample User Interfaces
![Page 18: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/18.jpg)
Advanced custom post type management
![Page 19: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/19.jpg)
Advanced roles and capabilities for managing user permissions
![Page 20: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/20.jpg)
API Requests
1. // Request for a full page from the themekickpress_is_fullpage();
2. // Request for a page fragment via Ajaxkickpress_is_ajax();
3. // Remote app request or actionkickpress_is_remote_app();
3 kinds of requests to the server
![Page 21: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/21.jpg)
1. Full Page Requests
![Page 22: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/22.jpg)
Triggering the KickPress API
{site}.com/how-to/ {Archive page for custom post type called “How To”}{site}.com/how-to/api/add/{site}.com/how-to/api/save/{site}.com/how-to/using-powerpoint/api/edit/More Examples:{site}.com/2012/08/18/wordcamp/api/edit/{site}.com/2012/08/18/wordcamp/api/save/{site}.com/2012/08/18/wordcamp/api/delete/{site}.com/2012/08/18/wordcamp/api/bookmark/{site}.com/2012/08/18/wordcamp/api/add_term[category]/featured/
API Parameters are appended to the end of the standard WordPress permalinks:
![Page 23: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/23.jpg)
2. Ajax Requests
![Page 24: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/24.jpg)
Theme ModificationsAdd an extra conditional comment to the top of these theme files:
header.phpfooter.phpsidebar.php
<?php if ( kickpress_is_ajax() ) { return; }
?>
![Page 25: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/25.jpg)
Theme ModificationsAdd a conditional blocks for any code that should be ignored on AJAX requests:
<?php get_header(); ?> <?php if ( kickpress_is_fullpage() ) : ?>
<div id="content-wrapper"> <?php endif; ?>
<?php $post_type = get_post_type(); ?> <?php get_template_part( 'loop', $post_type ); ?>
<?php $args = array( 'post_type', $post_type ); <?php kickpress_ajax_reload( $args, 'content-wrapper‘ ); ?> <?php kickpress_is_fullpage( '</div>‘ ); ?> <?php get_sidebar(); ?> <?php get_footer(); ?>
![Page 26: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/26.jpg)
3. Remote API Requests
![Page 27: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/27.jpg)
Authentication
Photo by Jon Worth
Two levels of remote authentication.• Remote apps• Registered users
interacting with your site’s content remotely through authenticated web or mobile apps.
![Page 28: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/28.jpg)
Remote Application Authentication
![Page 29: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/29.jpg)
API Serialized Response{
"status":"success","messages":{
"note":"Term Added"},"data":{
"terms":[{"term_id":"7","name":"Featured","slug":"featured","taxonomy":"category","count":"26"}]
}}
![Page 30: WordCamp GR 2012 Web Apps for the Masses](https://reader035.vdocuments.site/reader035/viewer/2022070304/54c43b404a7959511c8b45aa/html5/thumbnails/30.jpg)
Use KickPress to Build your next Web App in WordPress
http://kickpress.org/getting-started/