Book Image

WordPress Web Application Development

By : Rakhitha Nimesh Ratnayake
Book Image

WordPress Web Application Development

By: Rakhitha Nimesh Ratnayake

Overview of this book

Table of Contents (19 chapters)
WordPress Web Application Development Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Developing WordPress-powered websites is one of the standout trends in the modern web development world. The flexibility and power of the built-in features offered by WordPress has made developers use this framework for advanced web development. This book will act as a comprehensive resource for building web applications with this amazing framework.

WordPress Web Application Development, is a comprehensive guide focused on incorporating the existing features of WordPress into typical web development. This book is structured towards building a complete web application from scratch. With this book, you will build a portfolio management application with a modularized structure supported by the latest trending technologies.

This book provides a comprehensive, practical, and example-based approach for pushing the limits of WordPress to create web applications beyond your imagination.

It begins by exploring the role of existing WordPress components and discussing the reasons for choosing WordPress for web application development. As we proceed, more focus will be put onto adapting WordPress features into web applications with the help of an informal use-case-based model for discussing the most prominent built-in features. While striving for web development with WordPress, you will also learn about the integration of popular client-side technologies, such as Backbone.js, Underscore.js, jQuery, and server-side technologies and techniques, such as template engines and OpenAuth integration.

This book differentiates from the norm by creating a website that is dedicated to providing tutorials, articles, and source code to continue and enhance the web application development techniques discussed throughout this book. You can access the website for this book at http://www.innovativephp.com/wordpress-web-applications.

After reading this book, you will possess the ability to develop powerful web applications rapidly within limited time frames with the crucial advantage of benefitting low-budget and time-critical projects.

What this book covers

Chapter 1, WordPress as a Web Application Framework, walks you through the existing modules and techniques to identify their usage in web applications. The identification of the WordPress features beyond the conventional CMS and planning portfolio management application are the highlights of this chapter.

Chapter 2, Implementing Membership Roles, Permissions, and Features, begins the implementation of a portfolio management application by exploring the features of the built-in user management module. Working with various user roles and permissions, as well as an introduction to the MVC process through routing, are the highlights of this chapter.

Chapter 3, Planning and Customizing the Core Database, serves as an extensive guide for understanding the core database structure and the role of database tables in web applications. Database querying techniques using WordPress query classes and coverage of the planning portfolio management application database are the highlights of this chapter.

Chapter 4, Building Blocks of Web Applications, explores the possibilities of extending WordPress posts beyond their conventional usage to suit complex applications. Advanced use of custom post types and an introduction to managing template loaders are the highlights of this chapter.

Chapter 5, Developing Pluggable Modules, introduces the techniques of creating highly reusable and extensible plugins to enhance the flexibility of web applications. Implementing various plugins for explaining these techniques with the use of WordPress action and filter hooks is the highlight of this chapter.

Chapter 6, Customizing the Dashboard for Powerful Backends, walks you through the process of customizing the WordPress admin panel for adding new features, as well as changing existing features and design. Building reusable grids and designing an admin panel with various different techniques are the highlights of this chapter.

Chapter 7, Adjusting Theme for Amazing Frontends, dives into the techniques of designing amazing layouts, thereby opening them up for future extension. Widgetizing layouts and building reusable templates are the highlights of this chapter.

Chapter 8, Enhancing the Power of Open Source Libraries and Plugins, explores the use of the latest trending open source technologies and libraries. Integrating open authentication into your web application and structuring the application on the client side are the highlights of this chapter.

Chapter 9, Listening to Third-party Applications, demonstrates how to use the WordPress XML-RPC API to create a custom API for your web application. Building a simple yet complete API with all the main features is the highlight of this chapter.

Chapter 10, Integrating and Finalizing the Portfolio Management Application, guides you through the integration of modules and refactoring the code developed throughout this book. Improving the consistency of the application's code and completing the features developed throughout the previous chapters are the highlights of this chapter.

Chapter 11, Supplementary Modules for Web Development, introduces you to the supplementary WordPress features, such as Internationalization, video embedding, media grid, and multisite. An introduction to important concepts in application development, such as caching, security, and testing are the highlight of this chapter.

Appendix, Configurations, Tools, and Resources, provides an application setup guide with necessary links to download the plugins and libraries used throughout the book.

What you need for this book

Technically, you need a computer, browser, and an Internet connection with the following working environment:

  • The Apache web server

  • PHP Version 5.2 or higher

  • WordPress Version 4.0 or higher.

  • MySQL Version 5.0 or higher

Once you have the preceding environment, you can download the Responsive theme from http://wordpress.org/themes/responsive and activate it from the Themes section. Finally, you can activate the plugin developed for this book to get things started.

Please refer to Appendix, Configurations, Tools, and Resources, for the application setup guide, required software, and plugins.

Who this book is for

This book is intended for WordPress developers or designers, who know how to create a basic CMS site and are looking for ways to learn the complex web application development in a reusable, maintainable, and modular way. Basic knowledge of WordPress themes and plugin development is expected, although this is not a must for experienced PHP developers to go through this book.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text are shown as follows: "WordPress passes existing MIME types as the parameter to this function. Here, we have modified the $mimes array to restrict the image types to JPG."

A block of code is set as follows:

function filter_mime_types($mimes) {
  $mimes = array(
    'jpg|jpeg|jpe' => 'image/jpeg',
  );
  return $mimes;
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

function filter_mime_types($mimes) {
  $mimes = array(
    'jpg|jpeg|jpe' => 'image/jpeg',
  );
  do_action_ref_array('wpwa_custom_mimes', array(&$mimes));
  return $mimes;
}

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Once the Publish button is clicked, we validate the form and save the error messages as transients."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from: http://www.packtpub.com/sites/default/files/downloads/4082OS_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.