Share E-Book

Building Web Apps with WordPress WordPress as an Application Framework (Brian Messenlehner, Jason Coleman)(Z-Library)

Author Brian Messenlehner, Jason Coleman

Web Technology
Language English

WordPress is much more than a blogging platform. If you have basic PHP, HTML, CSS, and JavaScript experience you can use WordPress to develop fast, scalable, secure, and highly customized web apps, mobile apps, web services, and multisite networks of websites. Along with core WordPress functions and database schema, you’ll learn how to build custom plugins, themes, and services for just about any kind of web or mobile application. In this updated second edition, Brian Messenlehner and Jason Coleman cover new features and functionality added to WordPress up to version 5.4. All code examples in the book are available on GitHub. • Compare WordPress with traditional app development frameworks • Use themes for views and plugins for backend functionality • Get suggestions for choosing or building WordPress plugins • Register custom post types (CPTs) and taxonomies • Manage user accounts and roles, and access user data • Build asynchronous behaviors with jQuery • Use WordPress to develop mobile apps for iOS and Android • Integrate PHP libraries, external APIs, and web service plugins • Collect payments through ecommerce and membership plugins • Learn how to speed up and scale your WordPress app • Extend the WordPress REST API and create custom endpoints • Learn about WordPress Gutenberg blocks development

Format EPUB
Size 6.4 MB
151
Views
0
Downloads
0.00
Total Donations

AI Guide

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

Full assistant
AI guide
# Building Web Apps with WordPress: WordPress as an Application Framework ## 【One-Line Pitch】 A comprehensive developer's guide to transforming WordPress from a blogging platform into a full-fledged application framework, covering everything from custom post types and plugins to REST APIs, multisite networks, and ecommerce. Ideal for PHP developers who want to leverage WordPress's mature ecosystem to build scalable web and mobile applications faster than with traditional frameworks. ## 【Book Arc】 - **Opening (~0%–9%)**: Establishes the core premise—WordPress is more than a CMS; it's an application platform. Introduces the "SchoolPress" example app used throughout, compares WordPress to traditional frameworks like Ruby on Rails and Laravel, and covers WordPress basics including directory structure, database schema, and the plugin/theme architecture. - **Early (~9%–18%)**: Dives into the foundational building blocks: custom post types (CPTs), taxonomies, post metadata, users/roles/capabilities, and the key WordPress APIs (Shortcode, Widgets, Settings). Emphasizes object-oriented wrapper classes for organizing CPT code and extending WP_User for custom user archetypes. - **Early (~15%–27%)**: Covers the WordPress REST API for external integrations, Gutenberg block development (including custom blocks and block templates), and WordPress Multisite networks—when to use them, how to set them up, and the key functions for managing multiple sites. - **Middle (~27%–48%)**: Addresses localization (preparing plugins/themes for translation, creating .pot/.po/.mo files, using GlotPress), optimization and scaling (caching, CDNs, the Transient API, custom tables), and security best practices for WordPress apps. - **Middle (~48%–52%)**: Covers JavaScript frameworks and workflow (proper enqueueing, Ajax, asynchronous behaviors), ecommerce plugin selection, and wraps up with practical guidance on choosing between building custom solutions versus leveraging third-party plugins. ## 【Key Takeaways】 - **WordPress as an application framework** (Early): The book's central thesis is that WordPress's maturity, security track record, and massive ecosystem make it a legitimate alternative to traditional frameworks for the right kind of app—developers can build faster and more securely by leveraging what's already there. - **Themes are views, plugins are backend logic** (Early): A clear separation of concerns—themes handle presentation (templates, responsive design, menus) while plugins contain business logic, custom post types, and services. This MVC-like mapping helps keep code organized and maintainable. - **Custom post types are the data modeling backbone** (Early): Registering CPTs and taxonomies via `register_post_type()` and `register_taxonomy()` lets you model virtually any domain—courses, students, assignments, products. The book strongly recommends wrapper classes to encapsulate CPT logic using OOP principles. - **Users, roles, and capabilities are fully programmable** (Early): You can add/update/delete users programmatically, create custom roles and capabilities, extend the WP_User class for archetypes like "teachers" or "customers," and customize the dashboard users table—essential for membership-driven apps. - **The REST API opens WordPress to the outside world** (Early): With `register_rest_route()`, you can create custom endpoints, handle authentication, and integrate with external apps, mobile apps, and third-party services. The book demonstrates a single sign-on plugin as a concrete example. - **Gutenberg blocks are the new UI building blocks** (Early): Beyond content editing, blocks can serve functional purposes in your app. You can create custom blocks, limit blocks to specific CPTs, use block templates, and save block data to post meta—with tips on enabling `WP_SCRIPT_DEBUG` and using `filemtime()` for cache-busting. - **Multisite enables multitenancy** (Middle): WordPress Multisite lets you run multiple sites from one installation, with shared or individual tables, domain mapping, and functions like `switch_to_blog()` and `get_blog_option()`. The book covers when to use it, when not to, and alternatives like CPTs or separate sites. - **Optimization is a layered problem** (Middle): Performance testing (Apache Bench, Siege, Chrome Debug Bar), caching strategies (page cache, object cache, CDNs, GZIP), the Transient API for selective caching, and even bypassing WordPress with custom tables—all covered as part of scaling for high-volume apps. ## 【Reading Tips】 - **Skim Chapter 2 (WordPress Basics)** if you're an experienced WP developer, but don't skip it entirely—the database table explanations and function mappings are valuable reference material even for veterans. - **Deep-read Chapters 5–6 (CPTs, Taxonomies, Users)** —these are the heart of building any WordPress app. The wrapper class and WP_User extension patterns will save you significant refactoring later. - **Treat Chapter 14 (Optimization and Scaling) as a checklist** rather than a cover-to-cover read—scan for the techniques relevant to your current project's bottlenecks. - **The SchoolPress example app** ties everything together; follow it through the chapters to see how the concepts compose into a real application. - **Keep the GitHub repository handy** (github.com/bwawwp)—the book references code examples throughout, and having them open alongside the text will accelerate comprehension. ## 【Coverage Limits】 This guide covers the book's core architecture and development topics through approximately the first half. The excerpts do not cover the later chapters on ecommerce (Chapter 15) in detail, nor the JavaScript frameworks chapter (Chapter 9) and security chapter (Chapter 8) beyond their chapter summaries. ##

Passage locations

Excerpt 1
Web App Mobile Apps Progressive Web Apps Why Use WordPress? You Are Already Using WordPress Content Management Is Easy with WordPress User Management Is Easy...
View in text
Excerpt 2
ite Plugin Manager Multisite Global Search Multisite Robots.txt Manager NS Cloner: Site Copier WP Multi Network Basic Multisite Functionality $blog_id is_mul...
View in text
Excerpt 3
y, you’ll discover that they see the world very differently. They look at the web applications that they consider “real” and the companies behind them, and t...
View in text
Excerpt 4
ecommerce plugins available and how to choose between them. We then go into detail on how you can use WordPress to handle payments and account management for...
View in text

Recommended for You

Loading recommended books...
Failed to load, please try again later

Tip the Site

Scan the WeChat Pay or Alipay code to tip. No login required.

WeChat Pay
Alipay
Back to List