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.
User (Data Consumer)
- Maintained by trained individuals
- Static content
- Very little user interaction
- Users consume data
- 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
- Have to begin accounting for user mistakes
- User interaction increased, more forms, shopping cart etc
- Prevents developers from repeating tasks
- Accounts for common app entities and processes
- Provides some security
Not creating data
- 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
- Users are not just site managers
- Privacy policies
- Permission levels
- Large amounts of data
- Have to deﬁne 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!
- 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
-Explain what makes it an app
-State of the Word explained that WP can be used to build apps.
We can be an app
- 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
-Solve small problems, remain inside the core functionality and use case of Wordpress.
-Stray away from Wordpress core use cases
-Uses Wordpress in a more modular fashion
-Opens up normally administrative functions to general users
-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.
-Manage API, Marketing Site, App all in one place
-Plugins make it modular. You can separate functionality across sites.
- 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 ﬁlter and work with the default template system.
-Allows for easy searching/sorting
-Works with Custom Post Types
-Works with Template system
-Allows you to run simple ﬁlters without much SQL knowledge
-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
- 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 deﬁned templates/themes,
you can almost think your app has an ORM
- 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.