Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Wordpress Web Application  Development

You're reading from   Wordpress Web Application Development Building robust web apps easily and efficiently

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781787126800
Length 536 pages
Edition 3rd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Rakhitha Nimesh Ratnayake Rakhitha Nimesh Ratnayake
Author Profile Icon Rakhitha Nimesh Ratnayake
Rakhitha Nimesh Ratnayake
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. WordPress as a Web Application Framework FREE CHAPTER 2. Implementing Membership Roles, Permissions, and Features 3. Planning and Customizing the Core Database 4. Building Blocks of Web Applications 5. Implementing Application Content Restrictions 6. Developing Pluggable Modules 7. Customizing the Dashboard for Powerful Backends 8. Adjusting Theme for Amazing Frontends 9. Enhancing the Power of Open Source Libraries and Plugins 10. Listening to Third-Party Applications 11. Integrating and Finalizing the Forum Management Application 12. Supplementary Modules for Web Development 13. Configurations, Tools, and Resources

Simplifying development with built-in features

As we discussed in the previous section, the quality of a framework depends on its core features. The better the quality of the core, the better it will be for developing quality and maintainable applications. It's surprising to see the availability of a number of WordPress features directly related to web development, even though it is meant to create websites.

Let's get a brief introduction to the WordPress core features to see how they fit into web application development.

User management

Built-in user management features are quite advanced in order to cater to the most common requirements of any web application. Its user roles and capability handling make it much easier to control the access to specific areas of your application. We can separate users into multiple levels using roles and then use capabilities to define the permitted functionality for each user level. Most full stack frameworks don't have built-in user management features, and hence this can be considered as an advantage of using WordPress.

Media management

File uploading and managing is a common and time consuming task in web applications. Media uploader, which comes built-in with WordPress, can be effectively used to automate the file-related tasks without writing much source code. A super-simple interface makes it so easy for application users to handle file-related tasks.

Template management

WordPress offers a simple template management system for its themes. It is not as complex or fully featured as a typical template engine. However, it offers a wide range of capabilities from a CMS development perspective, which we can extend to suit web applications.

Database management

In most scenarios, we will be using the existing database table structure for our application development. WordPress database management functionalities offer a quick and easy way of working with existing tables with its own style of functions. Unlike other frameworks, WordPress provides a built-in database structure, and hence most of the functionalities can be used to directly work with these tables without writing custom SQL queries.

Routing

Comprehensive support for routing is provided through permalinks. WordPress makes it simple to change the default routing and choose your own routing, in order to build search engine-friendly URLs.

XML-RPC API

Building an API is essential for allowing third-party access to our application. WordPress provides a built-in API for accessing CMS-related functionality through its XML-RPC interface. Also, developers are allowed to create custom API functions through plugins, making it highly flexible for complex applications.

REST API

The REST API makes it possible to give third-party access to the application data, similar to XML-RPC API. This API uses easy to understand HTTP requests and JSON format, making it easier to communicate with WordPress applications. JavaScript is becoming the modern trend in developing applications. So, the availability of JSON in the REST API will allow external users to access and manipulate WordPress data within their JavaScript-based applications.

Caching

Caching in WordPress can be categorized into two sections called persistent and nonpersistent caching. Nonpersistent caching is provided by the WordPress cache object while persistent caching is provided through its Transient API. Caching techniques in WordPress are simple compared to other frameworks, but it's powerful enough to cater for complex web applications.

Scheduling

As developers, you might have worked with cron jobs for executing certain tasks at specified intervals. WordPress offers the same scheduling functionality through built-in functions, similar to a cron job. However, WordPress cron execution is slightly different from normal cron jobs. In WordPress, cron won't be executed unless someone visits the site. Typically, it's used for scheduling future posts. However, it can be extended to cater complex scheduling functionality.

Plugins and widgets

The power of WordPress comes from its plugin mechanism, which allows us to dynamically add or remove functionality without interrupting other parts of the application. Widgets can be considered as a part of the plugin architecture and will be discussed in detail further in this chapter.

Themes

The design of a WordPress site comes through the theme. This site offers many built-in template files to cater to the default functionality. Themes can be easily extended for custom functionality. Also, the design of the site can be changed instantly by switching to a compatible theme.

Actions and filters

Actions and filters are part of the WordPress hook system. Actions are events that occur during a request. We can use WordPress actions to execute certain functionalities after a specific event is completed. On the other hand, filters are functions that are used to filter, modify, and return data. Flexibility is one of the key reasons for the higher popularity of WordPress compared to other CMSs. WordPress has its own way of extending functionality of custom features as well as core features through actions and filters. These actions and filters allow developers to build advanced applications and plugins, which can be easily extended with minor code changes. As a WordPress developer, it's a must to know the perfect use of these actions and filters in order to build highly-flexible systems.

The admin dashboard

WordPress offers a fully-featured backend for administrators as well as normal users. These interfaces can be easily customized to adapt to custom applications. All the application-related lists, settings, and data can be handled through the admin section.

The overall collection of features provided by WordPress can be effectively used to match the core functionalities provided by full stack PHP frameworks.

You have been reading a chapter from
Wordpress Web Application Development - Third Edition
Published in: May 2017
Publisher: Packt
ISBN-13: 9781787126800
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image