using wordpress as an application platform -- #wcmke 2014
DESCRIPTION
This presentation was presented at Wordcamp Milwaukee in 2014 by @danpastori. The information covered allows you to discover the hidden capabilities of Wordpress and using Wordpress as an application platform.TRANSCRIPT
U S I N G W O R D P R E S S A S A N
APPLICATION PLATFORM
@danpastori
521dimensions.com
#wcmke
I live in
MILWAUKEE
521 Dimensions
Live in downtown Milwaukee Co-Founder of 521 Dimensions Coffee by day, beer by night
What defines an app?
Lead into “Let’s go back in time”
We’re in a time machine
Trained Professional
User (Data Consumer)
Data/Content
Data/Content
1994 (Static Sites)
Basic Websites - Maintained by trained individuals - Static content - Very little user interaction - Users consume data
Data/Content
Trained Professionals and authors
Readers/Commenters
Data/Content
2004 (Web 2.0)
Blogs/Dynamic Sites - Maintained by a group of trained individuals - Content is more up-to-date/live - Users mainly consume data but can provide data in comments and social interaction
2004 to
2014 (ecommerce)
Ecommerce - Have to begin accounting for user mistakes - User interaction increased, more forms, shopping cart etc
2004 to
2014 (App Frameworks)
Application Platforms - Prevents developers from repeating tasks - Accounts for common app entities and processes - Provides some security
What defines an app?
Developers/Admins
Users
Not creating data
My Web App
User contributed data (majority)
Apps - Roles switch from trained admins to un-trained users - Have to account for no one understanding your app - Large emphasis on security - Dynamic screen data
Developers/Admins
PERMISSIONS
My Web App
Apps - Users are not just site managers - Privacy policies - Permission levels
Developers/Admins
DATA SHARING
My Web App
Apps - Large amounts of data - Have to define who sees what and who has permissions to perform what functions.
I don’t have to worry about creating data!?
THIS IS GOING TO BE EASY!
WRONG!- You may not have to create data, but you have to account for bad data - Deal with large quantities of data, speed of display, and unknowns - Users WILL enter bad data, have to cleanse
-State of the Word explained that WP can be used to build apps.
We can be an app platform!
- State of the Word showed an example of an application written on Wordpress. - Totally possible, just have to think differently about Wordpress’ features.
Plugins vs app
Plugins: -Solve small problems, remain inside the core functionality and use case of Wordpress. !Apps: -Stray away from Wordpress core use cases -Uses Wordpress in a more modular fashion -Opens up normally administrative functions to general users
Can Wordpress run applications now?
YOU BETCHA!
-This is Musi(q)’s database, Musi(q) is build off of Wordpress
What do I need to know to develop wordpress APPs?
- Strong understanding of PHP, JS, CSS and how they work together - Strong understanding of WP Dev - Attention to detail - Understanding of how applications are created and function.
When not to use wordpress for apps
Complex permissions
- You can extend and create roles and permissions within WP, but complex scenarios and groups become a burden.
large, large amounts of data
- You can create your own tables within the Wordpress install, but there comes a point where you have to scale, or use a non-relational database.
Features that make Wordpress AWESOME for Apps
MULTISITE
-Manage API, Marketing Site, App all in one place -Plugins make it modular. You can separate functionality across sites.
Custom post Types
- Custom post types allow the developer essentially extend an object to make an app. - WPDB object works with custom post types already - Very customizable and easy to filter and work with the default template system.
Custom taxonomies
-Allows for easy searching/sorting -Works with Custom Post Types -Works with Template system -Allows you to run simple filters without much SQL knowledge
Extend and create users
-Ability to make custom users and permission hierarchy -add_role( $role, $display_name, $capabilities ); -Can block Wordpress admin per user, they won’t even know it’s built on Wordpress
Awesome templating system
- Templates/Themes and Plugins work together almost in a MVC type theory - When using custom post types to handle app objects, and with the Wordpress defined templates/themes,
you can almost think your app has an ORM
Creating apis
- Apps have other sources of data creation (plugins, iOS/Android apps, etc.) - Create a sub-site and activate your API handler plugin. - Can create an API theme that shows instructions if not making API calls. - On init, check for key, if key then handle by API plugin and export JSON. - DANGER: Lots of authentication checks need to take place.
Q&A@danpastori#wcmke
http://musiq.io