Upgrade to Pro — share decks privately, control downloads, hide ads and more …

WordPress is an Application Framework

WordPress is an Application Framework

I make the argument that we shouldn't be thinking of WordPress as either blog software or a CMS but as an application framework that can be used to power the back-end of any web app.

997a6f759a83b5a097bdffe351132d7e?s=128

Tom Willmot

August 14, 2012
Tweet

Transcript

  1. WordPress is an Application Framework Monday, 24 September 12

  2. Tom Willmot humanmade • happytables • wpremote tomwillmot.com hmn.md wpremote.com

    happytables.com @tomwillmot @humanmadeltd @wpremote @happytables github.com/humanmade Monday, 24 September 12
  3. WordPress is not just for blogging. Monday, 24 September 12

  4. WordPress is a CMS. Monday, 24 September 12

  5. WordPress is not just a CMS. Monday, 24 September 12

  6. WordPress is an Application Framework. Monday, 24 September 12

  7. Monday, 24 September 12

  8. • What is an Application Framework • What makes WordPress

    an Application Framework • How we built the WP Remote web app on WordPress. What is an Application Framework Monday, 24 September 12
  9. What is an Application Framework Monday, 24 September 12

  10. A web application framework is a software framework that is

    designed to support the development of dynamic websites, Web applications and Web services. The framework aims to alleviate the overhead associated with common activities performed in Web development. For example, many frameworks provide libraries for database access, templating frameworks and session management, and often promote code reuse. http://en.wikipedia.org/wiki/Web_application_framework Monday, 24 September 12
  11. That sounds a lot like WordPress! Monday, 24 September 12

  12. A web application framework is a software framework that is

    designed to support the development of dynamic websites, Web applications and Web services. The framework aims to alleviate the overhead associated with common activities performed in Web development. For example, many frameworks provide libraries for database access, templating frameworks and session management, and often promote code reuse. http://en.wikipedia.org/wiki/Web_application_framework Monday, 24 September 12
  13. A web application framework is a software framework that is

    designed to support the development of dynamic websites, Web applications and Web services. The framework aims to alleviate the overhead associated with common activities performed in Web development. For example, many frameworks provide libraries for database access, templating frameworks and session management, and often promote code reuse. http://en.wikipedia.org/wiki/Web_application_framework Monday, 24 September 12
  14. WordPress is web software you can use to create a

    beautiful website or blog. Monday, 24 September 12
  15. WordPress is an Application Framework that happens to come with

    a default app called “Blog”. Monday, 24 September 12
  16. WordPress is web software you can use to create a

    beautiful app, website or blog. Monday, 24 September 12
  17. Application Frameworks are libraries of useful API’s & Classes Monday,

    24 September 12
  18. • HTTP • XMLRPC • WP_User • WP_Rewrite • WPDB

    • WP_Cache & Transients • WP_Scripts • WP_Filesystem • admin-ajax.php • I18N • WP_Query • Security • Templating system • An Administration interface Core API’s Monday, 24 September 12
  19. • HTTP • XMLRPC • WP_User • WP_Rewrite • WPDB

    • WP_Cache & Transients • WP_Scripts • WP_Filesystem • admin-ajax.php • I18N • WP_Query • Security • Templating system • An Administration interface Monday, 24 September 12
  20. • HTTP • XMLRPC • WP_User • WP_Rewrite • WPDB

    • WP_Cache & Transients • WP_Scripts • WP_Filesystem • admin-ajax.php • I18N • WP_Query • Security • Templating system • An Administration interface Monday, 24 September 12
  21. • HTTP • XMLRPC • WP_User • WP_Rewrite • WPDB

    • WP_Cache & Transients • WP_Scripts • WP_Filesystem • admin-ajax.php • I18N • WP_Query • Security • Templating system • An Administration interface Monday, 24 September 12
  22. • HTTP • XMLRPC • WP_User • WP_Rewrite • WPDB

    • WP_Cache & Transients • WP_Scripts • WP_Filesystem • admin-ajax.php • I18N • WP_Query • Security • Templating system • An Administration interface Monday, 24 September 12
  23. • HTTP • XMLRPC • WP_User • WP_Rewrite • WPDB

    • WP_Cache & Transients • WP_Scripts • WP_Filesystem • admin-ajax.php • I18N • WP_Query • Security • Templating system • An Administration interface Monday, 24 September 12
  24. • HTTP • XMLRPC • WP_User • WP_Rewrite • WPDB

    • WP_Cache & Transients • WP_Scripts • WP_Filesystem • admin-ajax.php • I18N • WP_Query • Security • Templating system • An Administration interface Monday, 24 September 12
  25. • HTTP • XMLRPC • WP_User • WP_Rewrite • WPDB

    • WP_Cache & Transients • WP_Scripts • WP_Filesystem • admin-ajax.php • I18N • WP_Query • Security • Templating system • An Administration interface Monday, 24 September 12
  26. • HTTP • XMLRPC • WP_User • WP_Rewrite • WPDB

    • WP_Cache & Transients • WP_Scripts • WP_Filesystem • admin-ajax.php • I18N • WP_Query • Security • Templating system • An Administration interface Monday, 24 September 12
  27. • HTTP • XMLRPC • WP_User • WP_Rewrite • WPDB

    • WP_Cache & Transients • WP_Scripts • WP_Filesystem • admin-ajax.php • I18N • WP_Query • Security • Templating system • An Administration interface Monday, 24 September 12
  28. • HTTP • XMLRPC • WP_User • WP_Rewrite • WPDB

    • WP_Cache & Transients • WP_Scripts • WP_Filesystem • admin-ajax.php • I18N • WP_Query • Security • Templating system • An Administration interface Monday, 24 September 12
  29. • HTTP • XMLRPC • WP_User • WP_Rewrite • WPDB

    • WP_Cache & Transients • WP_Scripts • WP_Filesystem • admin-ajax.php • I18N • WP_Query • Security • Templating system • An Administration interface Monday, 24 September 12
  30. • HTTP • XMLRPC • WP_User • WP_Rewrite • WPDB

    • WP_Cache & Transients • WP_Scripts • WP_Filesystem • admin-ajax.php • I18N • WP_Query • Security • Templating system • An Administration interface Monday, 24 September 12
  31. • HTTP • XMLRPC • WP_User • WP_Rewrite • WPDB

    • WP_Cache & Transients • WP_Scripts • WP_Filesystem • admin-ajax.php • I18N • WP_Query • Security • Templating system • An Administration interface Monday, 24 September 12
  32. • HTTP • XMLRPC • WP_User • WP_Rewrite • WPDB

    • WP_Cache & Transients • WP_Scripts • WP_Filesystem • admin-ajax.php • I18N • WP_Query • Security • Templating system • An Administration interface Monday, 24 September 12
  33. What did I miss? Monday, 24 September 12

  34. The thing that makes WordPress uniquely powerful? Monday, 24 September

    12
  35. Monday, 24 September 12

  36. add_filter(); Monday, 24 September 12

  37. 3rd Party API’s • TLC Transients • WP Thumb •

    Custom Meta Box API • WordPress Objects Monday, 24 September 12
  38. • TLC Transients https://github.com/markjaquith/WP-TLC- Transients • WP Thumb • Custom

    Meta Box API • WordPress Objects • Term Meta Monday, 24 September 12
  39. • TLC Transients • WP Thumb https://github.com/humanmade/WPThumb • Custom Meta

    Box API • WordPress Objects • Term Meta Monday, 24 September 12
  40. • TLC Transients • WP Thumb • Custom Meta Box

    API https://github.com/humanmade/Customs • WordPress Objects • Term Meta Monday, 24 September 12
  41. • TLC Transients • WP Thumb • Custom Meta Box

    API • WordPress Objects https://github.com/humanmade/WordPress- Objects • Term Meta Monday, 24 September 12
  42. • TLC Transients • WP Thumb • Custom Meta Box

    API • WordPress Objects • Term Meta https://gist.github.com/2953813 Monday, 24 September 12
  43. All these API’s can be used without the “Blog” part

    of WordPress Monday, 24 September 12
  44. Still need convincing? Monday, 24 September 12

  45. Still need convincing? • Continuously improved. Monday, 24 September 12

  46. Still need convincing? • Continuously improved. • Great backwards compatibility

    support. Monday, 24 September 12
  47. Still need convincing? • Continuously improved. • Great backwards compatibility

    support. • Super easy to jump in and get started. Monday, 24 September 12
  48. Still need convincing? • Continuously improved. • Great backwards compatibility

    support. • Super easy to jump in and get started. • Can run on literally any server. Monday, 24 September 12
  49. Still need convincing? • Continuously improved. • Great backwards compatibility

    support. • Super easy to jump in and get started. • Can run on literally any server. • Widely tested, runs 16.7% of the web, some of the largest sites in the world. Monday, 24 September 12
  50. Why Not • Some of the core API’s are old

    and nasty. • It doesn’t enforce a strict MVC structure. https://github.com/markjaquith/WordPress-Skeleton/ • People might think your not a real software engineer if your not using Ruby to build your web app. Monday, 24 September 12
  51. WordPress powered Apps! Monday, 24 September 12

  52. WP Remote Quick Demo Monday, 24 September 12

  53. WordPress Back-end WordPress Plugin Client Site Knockout.js Front-end JSON JSON

    Monday, 24 September 12
  54. • Users • Sites • Site Meta • Core, Plugin

    and Theme updates • Groups • History • Backups • Settings Monday, 24 September 12
  55. • Standard WordPress subscriber level users. • Custom Login, Registration

    and Lost Password pages and Change Password pages. Users Monday, 24 September 12
  56. • Sites are stored as a custom post_type. • Each

    site has the post_author set to the user that owns the site. • The site status is set to private to signify that users sites are private to them. • Meta information about the site like home_url, admin_url etc. are stored in post_meta. As are lists of backups, history items and plugins and themes that need updating. Sites Monday, 24 September 12
  57. • Site Group is a custom taxonomy • Each group

    is a new term in that taxonomy • Doesn’t matter if 2 users unknowingly use the same group as each user only sees sites that they own. • We use a custom term_meta table to store things like whether a group is collapsed or not. Site Groups Monday, 24 September 12
  58. • Installed on each of the users sites • We

    use the HTTP API to communicate between the back-end and Plugin. • The Plugin hooks into the Core, Plugin & Theme update API’s to do the actual updates. Plugin Monday, 24 September 12
  59. • AMC Story Sync http://www.amctv.com/shows/breaking-bad/ story-sync • Bendy Words http://bendywords.com/demo-board/

    • StudioPress http://www.woothemes.com/2011/07/ supportpress/ Others Monday, 24 September 12
  60. Done! Monday, 24 September 12

  61. Thanks For Listening Monday, 24 September 12

  62. Ask Questions Now Or later on twitter @tomwillmot Monday, 24

    September 12