Monday, September 7, 2015

Object Orientated Development with WordPress

Object Orientated code is everywhere and WordPress is no exception.

The Core of WordPress is built on series of objects/classes used to control everything from manipulation of the database to the look and feel of your site.

Throughout this tutorial, we will look into Object Orientated design and how you can use these in practical applications when developing for WordPress including:

  • Understanding exactly what object orientated design is.
  • Discussing why we should use object orientated design.
  • Examining a real world example to showcase how it can work.

Note 1: Also note that this tutorial outlines primarily WordPress centric concepts, so if you are entirely new to object orientated design you should probably get a quick overview of OO via the PHP reference guide.

Note 2: If you're keen on downloading everything right away feel free to download the source from my GitHub repository and follow along with the tutorial.

Let's jump right into it!

What Is Object Orientated Design Anyway?

Object Orientation Design (OO Design) is a different methodology for solving issues, separate from the traditional procedural approach.

With Object Orientated Design you create a structure (class) that will group together all of your related functions (methods) and information (properties) to solve an issue.

This is different from procedural development in which you create functions and variables to solve issues, however, these elements can be separated across multiple files, re-declared and often loosely related.

Continue reading %Object Orientated Development with WordPress%


by Simon Codrington via SitePoint

No comments:

Post a Comment