Book Image

Wordpress Web Application Development - Third Edition

By : Rakhitha Nimesh Ratnayake
Book Image

Wordpress Web Application Development - Third Edition

By: Rakhitha Nimesh Ratnayake

Overview of this book

WordPress is one of the most rapidly expanding markets on the Web. Learning how to build complex and scalable web applications will give you the ability and knowledge to step into the future of WordPress. WordPress 4.7 introduces some exciting new improvements and several bug fixes, which further improve the entire development process.This book is a practical, scenario-based guide to expanding the power of the WordPress core modules to develop modular and maintainable real-world applications from scratch. This book consistently emphasizes adapting WordPress features into web applications. It will walk you through the advanced usages of existing features such as access controlling; database handling; custom post types; pluggable plugins; content restrictions; routing; translation; caching; and many more, while you build the backend of a forum management application. This book begins by explaining how to plan the development of a web application using WordPress' core features. Once the core features are explained, you will learn how to build an application by extending them through custom plugin development. Finally, you will explore advanced non-functional features and application integration. After reading this book, you will have the ability to develop powerful web applications rapidly within limited time frames.
Table of Contents (14 chapters)

A development plan for the forum management application

Typically, a WordPress book consists of several chapters, each of them containing different practical examples to suit each section. In this book, our main goal is to learn how we can build full stack web applications using built-in WordPress features. Therefore, I thought of building a complete application, explaining each and every aspect of web development.

Throughout this book, we will develop an online forum management system for creating public forums or managing a support forum for a specific product or service. This application can be considered as a mini version of a powerful forum system like bbPress. We will be starting the development of this application from Chapter 2, Implementing Membership Roles, Permissions, and Features.

Planning is a crucial task in web development, through which we will save a lot of time and avoid potential risks in the long run. First, we need to get a basic idea about the goal of the application, its features and functionalities, and the structure of components to see how it fits into WordPress.

Application goals and target audience

Anyone who is using the Internet on a day-to-day basis knows the importance of online discussion boards, also known as forums. These forums allow us to participate in a large community and discuss common matters, either related to a specific subject or a product. The application developed throughout this book is intended to provide a simple and flexible forum management application using a WordPress plugin with the goals of:

  • Learning to develop a forum application
  • Learning to use features of various online forums
  • Learning to manage a forum for your product or service

This application will be targeted towards all the people who have participated in an online forum or used a support system of a product they purchased. I believe that both output of this application and the contents of the book will be ideal for PHP developers who want to jump into WordPress application development.

Planning the application

Basically, our application consists of both frontend and backend, which is common to most web applications. In the frontend, both registered and unregistered users will have different functionalities based on their user roles. The following image shows the structure of our application home page:

The backend will be developed by customizing the built-in admin features of WordPress. Existing and new functionalities of the admin area will be customized based on the user role permissions.

User roles of the application

The application consists of four user roles, including the built-in admin role. User roles and their respective functionalities are explained in the following section:

  • Admin: Users of this role manage the application configurations, settings, and capabilities of the users.
  • Moderator: Users of this role manage the forums and topics. These users can create topics, manage topic statuses, and provide admin level feedback in case of a support forum.
  • Premium Members: These users gain access to the forums by purchasing a package or subscription. These users will have premium forum features and access to all content without restrictions.
  • Free Members: These are normal registered users who want to access the forums. These users will have limited access to content and forum features.
Registration is required for all four user roles in the forum management application.

Planning application features and functions

Our main intention for building this application is to learn how WordPress can be adapted to advanced web application development. Therefore, we will be considering various small requirements, rather than covering all aspects of a similar system. Each of the functionalities will be focused on explaining various modules in web applications and the approach of WordPress in building similar functionality.

Let's consider the following list of functions, which we will be developing throughout this book:

  • Forum user profile management: Users who register for forums will have a profile where they can edit personal details and view their forum topic details without going into the forum.
  • Forums and Topics management: The application provides the ability to create forums and topics under these forums. Admin staff will be responsible for creating and closing forum tickets while users will have the ability to create their own tickets.
  • Frontend login and registration: Typically, web applications contain the login and registration in the frontend, whereas WordPress provides it in the admin area. Therefore, custom implementation of login and registration will be implemented in the application frontend with the support of social login.
  • Manage forum topic permissions: Various features will be developed to provide restrictions to forum and topic features for different user levels.
  • Joining a Forum: Users will have features to join a forum and admins will have features to approve/reject user requests.
  • Settings panel: A comprehensive settings panel will be developed for administrators to configure general application settings from the backend.
  • REST API: A large number of popular web applications come up with a fully functional API to allow access to third-party applications. In this application, we will be developing a simple API to access the developer details and activities from external sources.
  • Notification service: A simple notification service will be developed to manage e-mail notifications on new topics in forums and responses to subscribed topics in forums.
  • Responsive design: With the increase of mobile devices for Internet browsing, more and more applications are converting their apps to suit various devices. So, we will be targeting different devices for a fully responsive design from the beginning of the development process.
  • Third-party libraries: Throughout the book, we will be creating functionalities such as OpenAuth login, RSS feed generation, and template management to understand the use of third-party libraries in WordPress.

While these are our main functionalities, we will also develop small features and components on top of them to explain the major aspects of web development.

If you are still not convinced, you can take a look at the various types of WordPress powered web applications at http://www.innovativephp.com/demo/packt/wordpress_applications.