In April 2014 O'Reilly Media released Building Web Apps with WordPress: WordPress as an Application Framework, a book I co-wrote with Jason Coleman. It was written for developers who wanted to build real applications on WordPress, not just content sites, and it treated WordPress as a full application framework from the first chapter to the last.
The Book at a Glance
Title: Building Web Apps with WordPress: WordPress as an Application Framework
Our book will be the first to really dive into WordPress as a framework and codify a process for building apps with WordPress.
Jason Coleman, Co-Author; Co-Founder and CEO of Paid Memberships Pro
Foreword
“The future of the internet is web apps and WordPress is making it easier than ever to create that future.
Brad Williams, Foreword to the First Edition
Why We Wrote It
By 2013 Jason and I had both been using WordPress to build highly interactive web apps for clients, the kind of projects most people did not expect WordPress to handle. Developers kept telling us they felt they had to leave WordPress for a traditional framework like Ruby on Rails, Yii, Zend or CodeIgniter to build a "real" app. The preface says it plainly: that sentiment was wrong, and we set out to fix it.
In July 2013 Jason wrote on his blog that the book would be the first to really dive into WordPress as a framework and codify a process for building apps with it. When the book came out, WordPress powered about 20% of the internet, according to our preface, and the case for WordPress as an app platform was only getting stronger.
What It Covers
The book maps classic MVC thinking onto WordPress: plugins as models, themes as views and the template loader as the controller. From there it works through everything an application needs: users and roles, custom post types and taxonomies, security, AJAX, APIs, ecommerce, localization and scaling.
Every concept is tied to one running example, SchoolPress, a multisite app where classes are BuddyPress groups, assignments are a custom post type and submissions are a sub post type. The code examples are on GitHub, so readers could study a real, working app alongside the text.
Key Chapters
Chapters 1 and 2: why WordPress works as an application framework, when not to use it, and a tour of the directory and database structure
Chapters 3 and 4: building app plugins, the WordPress loop, $wpdb, hooks, and themes as the view layer
Chapter 5: custom post types, post metadata, taxonomies and wrapper classes
Chapter 6: users, roles and capabilities, including Paid Memberships Pro
Chapter 7: shortcodes, widgets, the Settings and Rewrite APIs, WP-Cron and WP Mail
Chapter 8: securing WordPress, from hardening to nonces and escaping
Chapters 9 and 10: JavaScript, jQuery, AJAX, the Heartbeat API, Backbone.js and XML-RPC
Chapter 11: mobile apps with WordPress, using app wrappers for iOS and Android
Chapters 12 to 16: external APIs and web services, multisite networks, localization, ecommerce, and optimization and scaling
Who It Is For
It was written for WordPress developers moving into heavier applications, PHP developers with some WordPress experience who wanted a PHP based framework, and commercial plugin and theme developers working on large distributed projects. Readers were expected to know intermediate PHP and the basics of HTML and CSS.
Praise
WordPress is more than just software, it’s a movement that is becoming the de facto operating system of the Web. More than just a blog or a CMS, when you learn how to use WordPress as an application platform you’ll be at the forefront of the third wave of its growth.
Matt Mullenweg, Co-Founder of WordPress (first edition back cover)
Brian and Jason have grown side by side with WordPress for years, and successfully demonstrate how, for the right kind of app, developers can leverage that engine to build more secure, more performant applications in half the time.
Jake Goldman, President & Founder of 10up
How Readers Received It
Developer Joe Casabona reviewed the book on his blog in August 2014. He wrote that we "do a fantastic job of digging deep into WordPress as an Application Framework" and that "this book has made me a better developer." In his Amazon review, quoted on the same post, he praised "real, live, working sample code."
Legacy and Impact
The first edition gave a shared vocabulary to a lot of developers who were already bending WordPress into apps. It also set up everything that followed: the SchoolPress example, the chapter on mobile apps, and a second edition in 2019 that brought the book forward to the REST API and the block editor.
Build Your Next App on WordPress
If you are planning a web app, a member platform or a mobile app on WordPress, I would like to hear about it. Tell me what you are building and I will tell you how I would approach it.
Founder of AlphaWeb and owner of AppPresser. A former U.S. Marine Corps Sergeant and computer programmer, Brian has more than 25 years of experience leading software teams and co-wrote Building Web Apps with WordPress for O'Reilly.