using wordpress as an application framework
DESCRIPTION
My WordCamp Miami 2013 presentation on Using WordPress as an Application FrameworkTRANSCRIPT
WORDPRESS APPLICATION FRAMEWORK BY BRAD WILLIAMS
Brad Williams @williamsba
WHO IS BRAD?
Brad Williams @williamsba
Brad Williams
Co-‐Founder WebDevStudios.com Co-‐Author Professional WordPress
& Professional WordPress Plugin Development
Co-‐Organizer WordCamp Philly Co-‐Host DradCast
TODAY’S TOPICS
Brad Williams @williamsba
• What is an ApplicaIon Framework? • Why WordPress? • ApplicaIons Powered by WordPress
APPLICATION FRAMEWORK
Brad Williams @williamsba
An applica&on framework consists of a soMware framework used by soMware developers to implement the standard
structure of an applicaIon
APPLICATION FRAMEWORK
Brad Williams @williamsba
• User Management • Template Engine • Error Logging • LocalizaIon • Form & Data ValidaIon • File Uploading & media management • Image manipulaIon • Search-‐engine Friendly URLs • External APIs • Ability to extend using hooks & classes or plugins • Scheduled code execuIon • Caching • Extensibility
ApplicaIon Framework Features
APPLICATION FRAMEWORK
Brad Williams @williamsba
• User Management • Template Engine • Error Logging • LocalizaIon • Form & Data ValidaIon • File Uploading & media management • Image manipulaIon • Search-‐engine Friendly URLs • External APIs • Ability to extend using hooks & classes or plugins • Scheduled code execuIon • Caching • Extensibility
WordPress Features
APPLICATION FRAMEWORK
Brad Williams @williamsba
Why reinvent the wheel?
APPLICATION FRAMEWORK
Brad Williams @williamsba
Always start with a solid foundaIon
BAD FOUNDATION
Brad Williams @williamsba
Bad FoundaIon
GOOD FOUNDATION
Brad Williams @williamsba
Good FoundaIon
BAD FOUNDATION
Brad Williams @williamsba
Bad FoundaIon
GOOD FOUNDATION
Brad Williams @williamsba
Good FoundaIon
OUTSIDE THE BOX
Brad Williams @williamsba
Today’s Goal: Think Outside the Box
THINK OUTSIDE THE BOX
Brad Williams @williamsba
SECURITY STATS FOR WORDPRESS
Brad Williams @williamsba
EXAMPLE TIME
Brad Williams @williamsba
Let’s Look at Some Examples!
WORDPRESS IPHONE APP
Brad Williams @williamsba
What did we build? • App to end world hunger? • App to solve a criIcal problem? • App to provide a useful service?
WordPress iPhone App
WORDPRESS IPHONE APP
Brad Williams @williamsba
Of course not! We built
Location Based Pee Tracking
WORDPRESS IPHONE APP
Brad Williams @williamsba
Existing users can login (and remember me) Authenticates using WordPress
WORDPRESS IPHONE APP
Brad Williams @williamsba
New users can register an account (in WordPress)
WORDPRESS IPHONE APP
Brad Williams @williamsba
Users can PLOT and add a simple description
WORDPRESS IPHONE APP
Brad Williams @williamsba
PLOT is saved and all existing plots are listed
WORDPRESS IPHONE APP
Brad Williams @williamsba
Each PLOT is a post in WordPress Geo data is saved as post metadata (custom fields)
WORDPRESS IPHONE APP
Brad Williams @williamsba
Every post is listed in WordPress as normal
WORDPRESS IPHONE APP
Brad Williams @williamsba
Profile pages show user’s latest plots on a map
WORDPRESS IPHONE APP
Brad Williams @williamsba
Each “plot” is a post in WP with a unique permalink
WORDPRESS IPHONE APP
Brad Williams @williamsba
Apps for every device! All 100% GPL
WORDPRESS FACEBOOK APPLICATION
Brad Williams @williamsba
Auto Photobook Facebook ApplicaIon
WORDPRESS FACEBOOK APPLICATION
Brad Williams @williamsba
Extended Permissions allowing the applicaIon to access an Facebook user data
WORDPRESS FACEBOOK APPLICATION
Brad Williams @williamsba
When the app is installed in Facebook the new user is created in WordPress
Facebook data is saved as WordPress user metadata (birthday, favorite movies,
etc)
WORDPRESS FACEBOOK APPLICATION
Brad Williams @williamsba
In Facebook the user can create new Photobooks using their favorite Facebook images
WORDPRESS FACEBOOK APPLICATION
Brad Williams @williamsba
The Facebook ApplicaIon is 100% WordPress. A custom theme was built to look just like the Facebook design.
WORDPRESS FACEBOOK APPLICATION
Brad Williams @williamsba
Keith Milks created a new Photo Book called: ConstrucIon Book
WORDPRESS FACEBOOK APPLICATION
Brad Williams @williamsba
The ConstrucIon Book (single.php) shows all images with links to download and edit
WORDPRESS FACEBOOK APPLICATION
Brad Williams @williamsba
In WordPress the ConstrucIon Book is a post with images acached to the gallery
WORDPRESS FACEBOOK APPLICATION
Brad Williams @williamsba
Crazy right?!
WORDPRESS IPAD APP
Brad Williams @williamsba
YMCA Y-‐MVP iPad ApplicaIon
hcp://www.ymcanyc.org/associaIon/pages/y-‐mvp
WORDPRESS IPAD APP
Brad Williams @williamsba
Visit the YMCA and scan your membership card to log in to the applicaIon
WORDPRESS IPAD APP
Brad Williams @williamsba
YMCA members can “check-‐in” when they visit a parIcipaIng branch.
WORDPRESS IPAD APP
Brad Williams @williamsba
When a member “checks-‐out” they can log their Ime across any acIviIes they did at the YMCA
WORDPRESS IPAD APP
Brad Williams @williamsba
Badges and Challenges are earned as acIviIes are completed. All stats are tracked by locaIon.
WORDPRESS IPAD APP
Brad Williams @williamsba
Think it’s WordPress?
WORDPRESS IPAD APP
Brad Williams @williamsba
Of course it’s WordPress!
WORDPRESS IPAD APP
Brad Williams @williamsba
Custom post types and custom taxonomies are registered for every type of content in the app.
WORDPRESS IPAD APP
Brad Williams @williamsba
Custom post type for Badges
Easily add required Steps (CPT) to earn a Badge
WORDPRESS IPAD APP
Brad Williams @williamsba
DMA Friends iPad ApplicaIon
hcp://www.dallasmuseumofart.org/Visit/Friends/index.htm
WORDPRESS IPAD APP
Brad Williams @williamsba
Visitors can login with their membership card or create a new account at the kiosk
WORDPRESS IPAD APP
Brad Williams @williamsba
Users can enter special exhibit, event, or special codes to check-‐in to specific
Museum secIons
WORDPRESS IPAD APP
Brad Williams @williamsba
Badges are earned by compleIng various check-‐in requirements.
Every badge earned gives the user
points. The harder the badge the more points the user earns.
WORDPRESS IPAD APP
Brad Williams @williamsba
Points can be redeemed for Rewards at the Museum
WORDPRESS IPAD APP
Brad Williams @williamsba
The public absolutely loves it!
.
Brad Williams @williamsba
Amazing right?
AMAZING!
Brad Williams @williamsba
.
Brad Williams @williamsba
What powers these iPad apps?
BADGEOS
Brad Williams @williamsba
hcp://wordpress.org/extend/plugins/badgeos/
hcp://badgeos.org
In Partnership with
BADGEOS
Brad Williams @williamsba
A free plugin to create a powerful achievement and badging system on any WordPress website!
hcp://wordpress.org/extend/plugins/badgeos/
BADGEOS
Brad Williams @williamsba
Features include: • Reviewed submissions • Auto-‐approving submissions • NominaIons and review • Site acIvity (triggers based on
commenIng and logging in to your site) • CompleIng specific other achievements
one or a specific number of Imes • CompleIng one, select or all
achievements of a specific type • Point thresholds • Admin Given Badges
hcp://wordpress.org/extend/plugins/badgeos/
BADGEOS
Brad Williams @williamsba
Website: hcp://badgeos.org Plugin: hcp://wordpress.org/extend/plugins/badgeos/ Github: hcps://github.com/opencredit/badgeos In Partnership with
Check it out and Get Involved!
RESOURCES
Brad Williams @williamsba
• WordPress ApplicaIon Framework ArIcles • hcp://chrislema.com/pitching-‐wordpress-‐as-‐an-‐applicaIon-‐framework/ • hcp://tommcfarlin.com/wordpress-‐applicaIon-‐framework/
• PresentaIons • hcp://hmn.md/blog/2012/08/17/wordpress-‐is-‐an-‐applicaIon-‐framework/ • hcp://wordpress.tv/2012/11/09/sam-‐hotchkiss-‐wordpress-‐as-‐a-‐web-‐app-‐
framework/
DRADCAST PLUG
Brad Williams @williamsba
Listen to the DradCast WordPress Podcast
LIVE every Wednesday @ 8pm EDT
DradCast.com
CONTACT BRAD
Brad Williams @williamsba
Brad Williams [email protected] Blog: strangework.com Twicer: @williamsba IRC: WDS-‐Brad Professional WordPress Second EdiIon is OUT!
hcp://bit.ly/prowp2