SlideShare a Scribd company logo
WordPress Code
Architecture
Mario Peshev @no_fear_inc
WordPress Engineer DevWP.eu
Agenda
• Leading Factors
• Frontend
• Backend
• Users
• Database
• Helpers (Forms, etc)
• Others
Mario Peshev
• WordPress Architect @ DevriX
• Former Java/PHP/Python Developer
• WordPress Ambassador
at SiteGround
• @no_fear_inc
• Open Source addict and Cofficer
Personal opinion about different platforms out there
No flame wars intended
WordPress Code Architecture
Leading Factors
• PHP – most widespread across hosting
vendors
• Inspiration from predecessor (b2/cafelog),
different from Rails and MVC-frameworks
• PHP 5.2.4 support in Core
• LAMP/LEMP stack
Main Differences
• PHP is stateless and single-threaded
• Default stack: Apache + PHP + MySQL
• No MVC or complete OOP support
• Framework out of a CMS (and not vice
versa)
• No non-traditional data storage layers
• No REST support in core (until 4.0)
PHP 5.2.4 support
Supporting 5.2.4 means that we can’t use:
• namespaces
• traits
• Class::{expr}()
• Late Static Binding
• Closures (Anonymous functions)
• Dynamic access to static methods
Frontend
WordPress Code Architecture
Layouts and Views
• Some MVC frameworks such as CakePHP:
Razor View (ASP.NET)
AJAX
Similar to ng-model/ng-bind in AngularJS
Backend
WordPress Backend
• Flexible default admin panel
• Complete views and listings for post types
• User management and capability control
• Settings, Media manager and much more
• Reusable WP_List_Table Components
Alternative Admins
Different Admin approaches for every
popular CMS
• Scaffolded admin panels from web
frameworks
• Admin components and user management
extensions
Extensibility vs. Complexity Dilemma
Data APIs
• Wrappers and facade across post types
• Unification in options –
add_option, set_theme_mod,set_transient
• Automatically serializing complex objects
• Verifying for new records
• Sanitizing data
Drupal Entity API
You define your data types with most MVC frameworks.
Drupal has the Entity API:
Environment
Default Infrastructure
• These are not available as separate modules/components.
Hooks and DI
• Actions and Filters in WordPress
• Annotations and Attributes in other
languages and platforms
Streamlined vs. Layer-based application
life cycle model
JSF Annotations
PHP has some, too!
Doctrine:
Database
Database
• Post Type API base
• *_Query helper classes
• wpdb class
• Other helper CRUD functions
Challenges with Databases
• Normalization vs. Denormalization
• Data Decoupling
• Data storage choices:
LINQ or even NoSQL
Helpers and Utilities
Forms
• Token generation
• Model-based validaiton
• Unified access control
Hopes for the Settings API
Media Uploader and /uploads
• Media uploader – wp-content/uploads for
private documents
WordPress Code Architecture
Other Areas
• User Management
• Multisite support
• Tools and Libraries
• Routing
• Performance
• Security
• Packages and [Distributions]
Summary
• WordPress is still AWESOME
• There are just other ways to build an architecture
• Other languages and platforms have their own
strong sides too
Questions?
Tweets as @no_fear_inc
Mario Peshev on LinkedIn
nofearinc on WordPress.org
GitHubering via mpeshev
DevWP.eu - blog
Notes
• Take a look at ExoWP
• Definitely watch To OOP or not to OOP

More Related Content

PPTX
WordPress Architecture For Beginners
PDF
WordPress Theme Reviewers Team
PPTX
Web programming
PPTX
Back to the Basics - 1 - Introduction to Web Development
PPTX
Feature and Future of ASP.NET
PDF
LFC DjangoCon EU
PDF
WordPress as an Application Framework
PPTX
Documenting metadata application profiles and vocabularies
WordPress Architecture For Beginners
WordPress Theme Reviewers Team
Web programming
Back to the Basics - 1 - Introduction to Web Development
Feature and Future of ASP.NET
LFC DjangoCon EU
WordPress as an Application Framework
Documenting metadata application profiles and vocabularies

What's hot (20)

PDF
What's up with Drupal 7?
PPTX
Open source wordpress and drupal
PPTX
Web development tips and tricks
PDF
Drupal Security from Drupalcamp Bratislava
ODP
The Importance Things of Full Stack Development
PDF
Drupal Security from Drupalcamp Cologne 2009
PDF
Webservices: connecting Joomla! with other programs.
PPTX
Introducing Joomla! CMS
PDF
Different Concepts on Databases
PPSX
C#.net applied OOP - Batch 3
ZIP
Open-Source web apps for libraries
PPTX
FHIR Server Design Review
PPTX
SilverStripe From a Developer's Perspective
PDF
Intro to Drupal Module Developement
PPTX
Edy Dawson Notes on SF HTML5 Dev Conf
PPTX
PPTX
Leveraging Open Source Library Guides: Integrating Koha and SubjectsPlus
PPTX
WordPress Theme Development by Sharif Mohammad Eunus
PDF
OW2 Exo Platform Open Social Portal Linuxtag09
PPTX
HTML5 Local Storage
What's up with Drupal 7?
Open source wordpress and drupal
Web development tips and tricks
Drupal Security from Drupalcamp Bratislava
The Importance Things of Full Stack Development
Drupal Security from Drupalcamp Cologne 2009
Webservices: connecting Joomla! with other programs.
Introducing Joomla! CMS
Different Concepts on Databases
C#.net applied OOP - Batch 3
Open-Source web apps for libraries
FHIR Server Design Review
SilverStripe From a Developer's Perspective
Intro to Drupal Module Developement
Edy Dawson Notes on SF HTML5 Dev Conf
Leveraging Open Source Library Guides: Integrating Koha and SubjectsPlus
WordPress Theme Development by Sharif Mohammad Eunus
OW2 Exo Platform Open Social Portal Linuxtag09
HTML5 Local Storage
Ad

Viewers also liked (20)

PPTX
Architecture for WordPress on AWS
PPTX
Content Architecture in WordPress
PDF
Introduction to WordPress Class 1
PPTX
Anatomy and Architecture of a WordPress Theme
PDF
Architecting an Highly Available and Scalable WordPress Site in AWS
ZIP
WordPress Websites that work
PDF
WordPress as a CMS - Case Study of an Organizational Intranet
PPSX
Workshop 4: IJssel-Vechtdelta lessons learned
PPTX
Custom Post Types and Taxonomies
KEY
Custom Post Types in Depth at WordCamp Montreal
KEY
WordPress 3 Custom Post Types
PPTX
WordPress for beginners 1
PDF
Using Composer with WordPress
PDF
Step by step guide for creating wordpress plugin
PDF
CMS Capabilities of WordPress
PPT
Architecture Behind Wordpress
PPTX
Content Architecture WordPress Hamilton
PPTX
Advantages & Disadvantages of Wordpress
PDF
Core (Data Model) of WordPress Core
PDF
Arquitetura da Informação e Wordpress
Architecture for WordPress on AWS
Content Architecture in WordPress
Introduction to WordPress Class 1
Anatomy and Architecture of a WordPress Theme
Architecting an Highly Available and Scalable WordPress Site in AWS
WordPress Websites that work
WordPress as a CMS - Case Study of an Organizational Intranet
Workshop 4: IJssel-Vechtdelta lessons learned
Custom Post Types and Taxonomies
Custom Post Types in Depth at WordCamp Montreal
WordPress 3 Custom Post Types
WordPress for beginners 1
Using Composer with WordPress
Step by step guide for creating wordpress plugin
CMS Capabilities of WordPress
Architecture Behind Wordpress
Content Architecture WordPress Hamilton
Advantages & Disadvantages of Wordpress
Core (Data Model) of WordPress Core
Arquitetura da Informação e Wordpress
Ad

Similar to WordPress Code Architecture (20)

PPTX
SOLID Programming with Portable Class Libraries
PPTX
Introduction to Monsoon PHP framework
PPTX
WordPress Themes and Plugins
PDF
OpenProdoc Overview
PDF
8. Software Development Security
PDF
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
PDF
8. Software Development Security
PPTX
Frame - Feature Management for Productive Machine Learning
PDF
CISSP Prep: Ch 9. Software Development Security
PDF
Karwin bill zf-db-zend_con-20071009
PDF
Apereo OAE - Bootcamp
PPTX
SQL on Hadoop
PPTX
72d5drupal
PDF
Directories for the REST of Us: REST to LDAP in OpenDJ 2.6
PDF
Headless cms architecture
PDF
DMann-SQLDeveloper4Reporting
PPT
PPTX
WebNetConf 2012 - Single Page Apps
PPTX
The WordPress University
PDF
Azure - Data Platform
SOLID Programming with Portable Class Libraries
Introduction to Monsoon PHP framework
WordPress Themes and Plugins
OpenProdoc Overview
8. Software Development Security
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
8. Software Development Security
Frame - Feature Management for Productive Machine Learning
CISSP Prep: Ch 9. Software Development Security
Karwin bill zf-db-zend_con-20071009
Apereo OAE - Bootcamp
SQL on Hadoop
72d5drupal
Directories for the REST of Us: REST to LDAP in OpenDJ 2.6
Headless cms architecture
DMann-SQLDeveloper4Reporting
WebNetConf 2012 - Single Page Apps
The WordPress University
Azure - Data Platform

More from Mario Peshev (20)

PDF
Why Does an eCommerce Store Cost 200 to 100K And More?
PDF
Management Decision Making Process
PDF
The Future Of WordPress In 2020
PDF
What Makes PHP An Awesome Language
PDF
Top 6 Business Tips for October 2019
PDF
The Future of WordPress And WooCommerce
PPTX
Tips for Successful WordPress Enterprise Projects
PDF
WordPress Architecture for Tech-Savvy Managers
PDF
Business and Monetization Opportunities for Developers
PDF
Building SaaS with WordPress - WordCamp Netherlands 2016
PDF
Virtual Company - Go Limitless
PDF
Debugging WordPress
PDF
Platforms based on WordPress
PDF
Get Involved with WordPress
PDF
Contributing to WordPress
PDF
Start Your Website for Free!
PDF
Choosing a WordPress Theme
PDF
Sass in 5
PDF
Custom Post Types in the wild (WordCamp Sofia 2012)
ODP
oDesk - running virtual companies
Why Does an eCommerce Store Cost 200 to 100K And More?
Management Decision Making Process
The Future Of WordPress In 2020
What Makes PHP An Awesome Language
Top 6 Business Tips for October 2019
The Future of WordPress And WooCommerce
Tips for Successful WordPress Enterprise Projects
WordPress Architecture for Tech-Savvy Managers
Business and Monetization Opportunities for Developers
Building SaaS with WordPress - WordCamp Netherlands 2016
Virtual Company - Go Limitless
Debugging WordPress
Platforms based on WordPress
Get Involved with WordPress
Contributing to WordPress
Start Your Website for Free!
Choosing a WordPress Theme
Sass in 5
Custom Post Types in the wild (WordCamp Sofia 2012)
oDesk - running virtual companies

Recently uploaded (20)

PDF
Nekopoi APK 2025 free lastest update
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Introduction to Artificial Intelligence
PPT
Introduction Database Management System for Course Database
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
System and Network Administration Chapter 2
PDF
Digital Strategies for Manufacturing Companies
PPTX
ai tools demonstartion for schools and inter college
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Nekopoi APK 2025 free lastest update
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Operating system designcfffgfgggggggvggggggggg
How Creative Agencies Leverage Project Management Software.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
ISO 45001 Occupational Health and Safety Management System
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PTS Company Brochure 2025 (1).pdf.......
Navsoft: AI-Powered Business Solutions & Custom Software Development
Introduction to Artificial Intelligence
Introduction Database Management System for Course Database
Design an Analysis of Algorithms I-SECS-1021-03
System and Network Administration Chapter 2
Digital Strategies for Manufacturing Companies
ai tools demonstartion for schools and inter college
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...

WordPress Code Architecture