SlideShare una empresa de Scribd logo
1 de 44
Descargar para leer sin conexión
Pods	
  +	
  WP	
  =	
  CMS	
  
          Sort	
  of	
  …	
  	
  
What	
  do	
  we	
  want	
  in	
  a	
  CMS?	
  



•  Flexible	
  –	
  Does	
  different	
  things	
  	
  
•  Robust	
  –	
  Does	
  things	
  well	
  
Is	
  Wordpress	
  a	
  CMS?	
  Yes	
  


•  Wordpress	
  is	
  really	
  good	
  at	
  publishing	
  one	
  
   kind	
  of	
  content:	
  the	
  Post	
  
•  Its	
  interface	
  is	
  easy	
  to	
  learn	
  and	
  easy	
  to	
  teach.	
  	
  
•  Theming	
  is	
  especially	
  powerful.	
  Design	
  
   community	
  
•  Plugins	
  and	
  custom	
  fields	
  provide	
  addiMonal	
  
   flexibility	
  on	
  a	
  post	
  by	
  post	
  basis.	
  	
  
Is	
  Wordpress	
  a	
  CMS?	
  No	
  	
  


•  Major	
  challenges	
  customizing	
  backend	
  UI	
  
•  All	
  post	
  types	
  essenMally	
  the	
  same	
  
•  Custom	
  fields	
  difficult	
  to	
  work	
  with	
  in	
  complex	
  
   ways	
  
•  Scalability	
  issues	
  
So	
  what?	
  


•  Time	
  is	
  money	
  
•  Consultants	
  need	
  to	
  maximize	
  funcMonality/
   Mme	
  equaMon.	
  
Custom	
  Fields	
  


•  Good	
  for	
  on	
  the	
  fly	
  customizaMon	
  
•  Bad	
  for	
  complex	
  content	
  types	
  
Querying	
  Custom	
  Fields	
  


$args	
  =	
  “meta_key=airline_name&value=American”;	
  
$args	
  =	
  “meta_key=arrives&meta_compare=>=&meta_value=DATE()”	
  

query_posts($args);	
  
MulMple	
  custom	
  fields?	
  

funcMon	
  get_post_meta_mulMple($metaDataList)	
  {	
  
     	
  global	
  $wpdb;	
  

        	
  $querystr	
  =	
  "SELECT	
  p.*	
  FROM	
  $wpdb-­‐>posts	
  AS	
  p	
  WHERE	
  p.ID	
  IN	
  (	
  ";	
  

        	
  $querystr	
  .=	
  "SELECT	
  post_id	
  FROM	
  $wpdb-­‐>postmeta	
  WHERE	
  ";	
  
        	
  $innerqry	
  =	
  array();	
  
        	
  foreach($metaDataList	
  as	
  $key	
  =>	
  $value)	
  {	
  
        	
   	
  $innerqry[]	
  =	
  $wpdb-­‐>prepare(	
  "(meta_key	
  =	
  %s	
  AND	
  meta_value	
  =	
  %s)",	
  $key,	
  $value	
  ); 	
  	
  
        	
  }	
  

        	
  $querystr	
  .=	
  implode("	
  OR	
  ",	
  $innerqry);	
  

        	
  $querystr	
  .=	
  "	
  GROUP	
  BY	
  post_id	
  ";	
  
        	
  $querystr	
  .=	
  "HAVING	
  count(*)	
  =	
  "	
  .	
  count($metaDataList);	
  

        	
  $querystr	
  .=	
  ")	
  AND	
  p.post_status	
  =	
  'publish'	
  ";	
  

        	
  $metaResults	
  =	
  $wpdb-­‐>get_results($querystr,	
  OBJECT);                                 	
           	
        	
            	
     	
  	
  
        	
  return	
  $metaResults;	
  
}	
  
                                                                                                                                           Source:	
  hsp://Mnyurl.com/ldadam	
  
Scalability	
  


•  Most	
  wordpress	
  users	
  will	
  never	
  experience	
  
   performance	
  issues	
  because	
  the	
  number	
  
   pages	
  just	
  isn’t	
  enough	
  to	
  maser.	
  	
  
•  But	
  consultants	
  sMll	
  need	
  to	
  be	
  concerned.	
  	
  
Scalability	
  


•  All	
  posts/types	
  are	
  in	
  one	
  table.	
  
•  All	
  custom	
  fields	
  are	
  in	
  longtext	
  format	
  which	
  
   means	
  they	
  can	
  store	
  up	
  to	
  4GB.	
  
•  Table	
  sizes	
  are	
  effecMvely	
  doubled	
  by	
  custom	
  
   fields	
  10,000	
  posts	
  with	
  10	
  cfs	
  each	
  is	
  like	
  
   having	
  100,000	
  rows.	
  Add	
  in	
  revisions	
  and	
  
   even	
  simple	
  queries	
  become	
  hogs.	
  	
  
So	
  What	
  are/is	
  Pods?	
  


•  Not	
  a	
  plugin	
  …	
  really	
  
•  Pods	
  =	
  Simple,	
  scalable,	
  CMS	
  soluMon	
  for	
  
   Wordpress.	
  
•  UlMmate	
  flexibility	
  with	
  being	
  too	
  Mme	
  
   intensive.	
  	
  
•  Frontend/Backend	
  CustomizaMon	
  a	
  cinch.	
  	
  	
  
Example:	
  Flight	
  List	
  
Example:	
  Flight	
  List	
  
Example:	
  Flight	
  List	
  
Example:	
  Flight	
  List	
  
Example:	
  Flight	
  List	
  
Example:	
  Flight	
  List	
  
Example:	
  Flight	
  List	
  
Example:	
  Flight	
  List	
  
Example:	
  TemplaMng	
  
Example:	
  TemplaMng	
  

<?php	
  
$flight	
  =	
  new	
  Pod(‘flight’);	
  
$flight-­‐>findRecords(‘arrives	
  ASC’,	
  -­‐1);	
  
echo	
  $flight-­‐>showTemplate(‘flight-­‐list’);	
  
?>	
  
Example:	
  TemplaMng	
  
Example:	
  TemplaMng	
  


   {@field.column}	
  
Example:	
  TemplaMng	
  

{@airline.name}	
  -­‐	
  {@name},	
  {@departs}	
  <br/>	
  
Example:	
  TemplaMng	
  
hsp://www.yourdomain.com/flights/	
  
Example:	
  TemplaMng	
  
hsp://www.yourdomain.com/flights/?airline=2	
  
Example:	
  TemplaMng	
  

<?php	
  
$flight	
  =	
  new	
  Pod(‘flight’);	
  
$flight-­‐>findRecords(‘arrives	
  ASC’,	
  -­‐1);	
  
echo	
  $flight-­‐>getFilters(‘airline’,	
  ‘Filter’);	
  
echo	
  $flight-­‐>showTemplate(‘flight-­‐list’);	
  
?>	
  
Example:	
  TemplaMng	
  
Example:	
  TemplaMng	
  

<?php	
  
$form	
  =	
  new	
  Pod('flight');	
  
echo	
  $form-­‐>publicForm();	
  
?>	
  
Example:	
  TemplaMng	
  
Example:	
  TemplaMng	
  

<?php	
  
$form	
  =	
  new	
  Pod('flight');	
  
$fields	
  =	
  array('name','arrive','depart');	
  
echo	
  $form-­‐>publicForm();	
  
echo	
  
?>	
   $form-­‐>publicForm($fields);	
  
?>	
  
Example:	
  TemplaMng	
  
Example:	
  TemplaMng	
  
Showcase	
  
MulMple	
  custom	
  fields?	
  

funcMon	
  get_post_meta_mulMple($metaDataList)	
  {	
  
     	
  global	
  $wpdb;	
  

        	
  $querystr	
  =	
  "SELECT	
  p.*	
  FROM	
  $wpdb-­‐>posts	
  AS	
  p	
  WHERE	
  p.ID	
  IN	
  (	
  ";	
  

        	
  $querystr	
  .=	
  "SELECT	
  post_id	
  FROM	
  $wpdb-­‐>postmeta	
  WHERE	
  ";	
  
        	
  $innerqry	
  =	
  array();	
  
        	
  foreach($metaDataList	
  as	
  $key	
  =>	
  $value)	
  {	
  
        	
   	
  $innerqry[]	
  =	
  $wpdb-­‐>prepare(	
  "(meta_key	
  =	
  %s	
  AND	
  meta_value	
  =	
  %s)",	
  $key,	
  $value	
  ); 	
  	
  
        	
  }	
  

        	
  $querystr	
  .=	
  implode("	
  OR	
  ",	
  $innerqry);	
  

        	
  $querystr	
  .=	
  "	
  GROUP	
  BY	
  post_id	
  ";	
  
        	
  $querystr	
  .=	
  "HAVING	
  count(*)	
  =	
  "	
  .	
  count($metaDataList);	
  

        	
  $querystr	
  .=	
  ")	
  AND	
  p.post_status	
  =	
  'publish'	
  ";	
  

        	
  $metaResults	
  =	
  $wpdb-­‐>get_results($querystr,	
  OBJECT);                                 	
           	
        	
            	
     	
  	
  
        	
  return	
  $metaResults;	
  
}	
  
                                                                                                                                           Source:	
  hsp://Mnyurl.com/ldadam	
  
Showcase	
  


<?php	
  
$di	
  =	
  new	
  Pod('distress_index');	
  
$di-­‐>findRecords('name	
  DESC',	
  -­‐1,	
  "t.un	
  >	
  6.00	
  AND	
  t.cpi	
  <	
  2.00");	
  
echo	
  $di-­‐>showTemplate('distress_data_table');	
  
?>	
  
Scalability	
  


•  Using	
  Custom	
  Fields:	
  
    –  600	
  rows	
  x	
  6	
  custom	
  fields	
  =	
  3600	
  table	
  rows	
  
•  Using	
  Pods:	
  
    –  600	
  table	
  rows	
  
Showcase	
  
What	
  about	
  Custom	
  
                 Taxonomies/Post	
  Types?	
  	
  

•  Wordpress	
  argues	
  that	
  custom	
  taxonomies	
  
   and	
  the	
  introducMon	
  of	
  post	
  types	
  alleviates	
  
   the	
  need	
  for	
  excessive	
  use	
  of	
  custom	
  fields.	
  	
  

•  But	
  this	
  only	
  increases	
  the	
  scalability	
  slightly,	
  
   there	
  are	
  sMll	
  problems	
  for	
  large	
  sites.	
  	
  
Pods-­‐nosis	
  NegaMve? 	
  	
  

•  Because	
  pods	
  data	
  is	
  saved	
  in	
  separate	
  tables,	
  
   standard	
  Wordpress	
  post	
  features	
  are	
  not	
  
   available.	
  (i.e.	
  comments/akismet)	
  
•  Wordpress	
  does	
  not	
  currently	
  endorse	
  the	
  pods	
  
   cms	
  strategy	
  and	
  instead	
  is	
  pushing	
  the	
  “one	
  post	
  
   type	
  fits	
  all	
  strategy”.	
  
•  Pods	
  community	
  is	
  considerably	
  smaller	
  than	
  the	
  
   wordpress	
  community.	
  	
  
Why	
  use	
  pods? 	
  	
  


•  Learn	
  one	
  plugin,	
  build	
  anything	
  you	
  want.	
  
•  Your	
  site	
  has	
  lots	
  of	
  relaMonships	
  between	
  
   types	
  of	
  content.	
  
•  Scalability	
  is	
  a	
  concern.	
  	
  
•  Truly	
  custom,	
  customizaMon	
  
Summary	
  	
  


•  There	
  is	
  no	
  RIGHT	
  way	
  to	
  use	
  Wordpress	
  as	
  a	
  
   CMS.	
  
•  Pods	
  is	
  a	
  tool	
  for	
  developers,	
  not	
  users.	
  	
  
•  Pods	
  is	
  the	
  most	
  flexible/scalable	
  CMS	
  opDon	
  
   currently	
  available	
  for	
  Wordpress.	
  	
  
More	
  info?	
  


•  www.podscms.org 	
  	
  
•  www.mikevanwinkle.com	
  	
  
•  @podscms,	
  @mpvanwinkle	
  
A	
  QuesMon?	
  


•  Should	
  Wordpress.org	
  abandon	
  it’s	
  own	
  
   asempts	
  to	
  make	
  WP	
  a	
  CMS?	
  Can	
  WP	
  be	
  
   everything	
  to	
  everyone?	
  	
  

Más contenido relacionado

La actualidad más candente

Drupal - dbtng 25th Anniversary Edition
Drupal - dbtng 25th Anniversary EditionDrupal - dbtng 25th Anniversary Edition
Drupal - dbtng 25th Anniversary Editionddiers
 
SPL: The Missing Link in Development
SPL: The Missing Link in DevelopmentSPL: The Missing Link in Development
SPL: The Missing Link in Developmentjsmith92
 
Marc’s (bio)perl course
Marc’s (bio)perl courseMarc’s (bio)perl course
Marc’s (bio)perl courseMarc Logghe
 
Php course-in-navimumbai
Php course-in-navimumbaiPhp course-in-navimumbai
Php course-in-navimumbaivibrantuser
 
Resource Routing in ExpressionEngine
Resource Routing in ExpressionEngineResource Routing in ExpressionEngine
Resource Routing in ExpressionEngineMichaelRog
 
Introduction to Moose
Introduction to MooseIntroduction to Moose
Introduction to Moosethashaa
 
CodeIgniter L3 model & active record & template
CodeIgniter L3 model & active record  & templateCodeIgniter L3 model & active record  & template
CodeIgniter L3 model & active record & templateMohammad Tahsin Alshalabi
 
CodeIgniter L4 file upload & image manipulation & language
CodeIgniter L4 file upload & image manipulation & languageCodeIgniter L4 file upload & image manipulation & language
CodeIgniter L4 file upload & image manipulation & languageMohammad Tahsin Alshalabi
 
Jooctrine - Doctrine ORM in Joomla!
Jooctrine - Doctrine ORM in Joomla!Jooctrine - Doctrine ORM in Joomla!
Jooctrine - Doctrine ORM in Joomla!Herman Peeren
 
WordPress London 16 May 2012 - You don’t know query
WordPress London 16 May 2012 - You don’t know queryWordPress London 16 May 2012 - You don’t know query
WordPress London 16 May 2012 - You don’t know queryl3rady
 
Raleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass PresentationRaleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass PresentationDaniel Yuschick
 
Compass, Sass, and the Enlightened CSS Developer
Compass, Sass, and the Enlightened CSS DeveloperCompass, Sass, and the Enlightened CSS Developer
Compass, Sass, and the Enlightened CSS DeveloperWynn Netherland
 
Doctrine 2
Doctrine 2Doctrine 2
Doctrine 2zfconfua
 
10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data ModelingDATAVERSITY
 
Zf Zend Db by aida
Zf Zend Db by aidaZf Zend Db by aida
Zf Zend Db by aidawaraiotoko
 
Your code sucks, let's fix it
Your code sucks, let's fix itYour code sucks, let's fix it
Your code sucks, let's fix itRafael Dohms
 

La actualidad más candente (20)

Drupal - dbtng 25th Anniversary Edition
Drupal - dbtng 25th Anniversary EditionDrupal - dbtng 25th Anniversary Edition
Drupal - dbtng 25th Anniversary Edition
 
SPL: The Missing Link in Development
SPL: The Missing Link in DevelopmentSPL: The Missing Link in Development
SPL: The Missing Link in Development
 
Marc’s (bio)perl course
Marc’s (bio)perl courseMarc’s (bio)perl course
Marc’s (bio)perl course
 
Php course-in-navimumbai
Php course-in-navimumbaiPhp course-in-navimumbai
Php course-in-navimumbai
 
Resource Routing in ExpressionEngine
Resource Routing in ExpressionEngineResource Routing in ExpressionEngine
Resource Routing in ExpressionEngine
 
Php converted pdf
Php converted pdfPhp converted pdf
Php converted pdf
 
Ppt php
Ppt phpPpt php
Ppt php
 
Introduction to Moose
Introduction to MooseIntroduction to Moose
Introduction to Moose
 
CodeIgniter L3 model & active record & template
CodeIgniter L3 model & active record  & templateCodeIgniter L3 model & active record  & template
CodeIgniter L3 model & active record & template
 
CodeIgniter L4 file upload & image manipulation & language
CodeIgniter L4 file upload & image manipulation & languageCodeIgniter L4 file upload & image manipulation & language
CodeIgniter L4 file upload & image manipulation & language
 
Jooctrine - Doctrine ORM in Joomla!
Jooctrine - Doctrine ORM in Joomla!Jooctrine - Doctrine ORM in Joomla!
Jooctrine - Doctrine ORM in Joomla!
 
WordPress London 16 May 2012 - You don’t know query
WordPress London 16 May 2012 - You don’t know queryWordPress London 16 May 2012 - You don’t know query
WordPress London 16 May 2012 - You don’t know query
 
DataMapper
DataMapperDataMapper
DataMapper
 
Raleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass PresentationRaleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass Presentation
 
Compass, Sass, and the Enlightened CSS Developer
Compass, Sass, and the Enlightened CSS DeveloperCompass, Sass, and the Enlightened CSS Developer
Compass, Sass, and the Enlightened CSS Developer
 
Doctrine 2
Doctrine 2Doctrine 2
Doctrine 2
 
Merb
MerbMerb
Merb
 
10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling
 
Zf Zend Db by aida
Zf Zend Db by aidaZf Zend Db by aida
Zf Zend Db by aida
 
Your code sucks, let's fix it
Your code sucks, let's fix itYour code sucks, let's fix it
Your code sucks, let's fix it
 

Destacado

Wordcamp Fayetteville Pods Presentation (PPTX)
Wordcamp Fayetteville Pods Presentation (PPTX)Wordcamp Fayetteville Pods Presentation (PPTX)
Wordcamp Fayetteville Pods Presentation (PPTX)mpvanwinkle
 
Gettysburg
GettysburgGettysburg
GettysburgJodi1966
 
Support Worksheets
Support WorksheetsSupport Worksheets
Support Worksheetssafia
 
Powerpoint
PowerpointPowerpoint
Powerpointsafia
 
.Git for WordPress Developers
.Git for WordPress Developers.Git for WordPress Developers
.Git for WordPress Developersmpvanwinkle
 
Powerpoint
Powerpoint Powerpoint
Powerpoint safia
 
CodaでClipを使ってWordPress開発を早くするススメ。
 CodaでClipを使ってWordPress開発を早くするススメ。 CodaでClipを使ってWordPress開発を早くするススメ。
CodaでClipを使ってWordPress開発を早くするススメ。Shinichi Nishikawa
 
Launch a Web Service in 3 Days Using WordPress
Launch a Web Service in 3 Days Using WordPressLaunch a Web Service in 3 Days Using WordPress
Launch a Web Service in 3 Days Using WordPressKite Koga
 
Effectively Planning for an Enterprise-Scale CMDB Implementation
Effectively Planning for an Enterprise-Scale CMDB ImplementationEffectively Planning for an Enterprise-Scale CMDB Implementation
Effectively Planning for an Enterprise-Scale CMDB ImplementationAntonio Rolle
 
WordPressでウェブサービスを作ろう! #wbNagoya
WordPressでウェブサービスを作ろう! #wbNagoyaWordPressでウェブサービスを作ろう! #wbNagoya
WordPressでウェブサービスを作ろう! #wbNagoyaShinichi Nishikawa
 
エンジニアの為のWordPress入門 〜WordPressはWebAppプラットフォームです〜
エンジニアの為のWordPress入門 〜WordPressはWebAppプラットフォームです〜エンジニアの為のWordPress入門 〜WordPressはWebAppプラットフォームです〜
エンジニアの為のWordPress入門 〜WordPressはWebAppプラットフォームです〜Yuji Nojima
 
Animalien mundua.
Animalien mundua.Animalien mundua.
Animalien mundua.Eva
 
Multimedia. Animaliak
Multimedia. AnimaliakMultimedia. Animaliak
Multimedia. AnimaliakEva
 
Animaliak
AnimaliakAnimaliak
AnimaliakEva
 

Destacado (20)

Wordcamp Fayetteville Pods Presentation (PPTX)
Wordcamp Fayetteville Pods Presentation (PPTX)Wordcamp Fayetteville Pods Presentation (PPTX)
Wordcamp Fayetteville Pods Presentation (PPTX)
 
Gettysburg
GettysburgGettysburg
Gettysburg
 
On line
On lineOn line
On line
 
On line marketing-4
On line marketing-4On line marketing-4
On line marketing-4
 
Classpress
ClasspressClasspress
Classpress
 
Support Worksheets
Support WorksheetsSupport Worksheets
Support Worksheets
 
Powerpoint
PowerpointPowerpoint
Powerpoint
 
Classpress
ClasspressClasspress
Classpress
 
Ipodshuffleuserguide
IpodshuffleuserguideIpodshuffleuserguide
Ipodshuffleuserguide
 
.Git for WordPress Developers
.Git for WordPress Developers.Git for WordPress Developers
.Git for WordPress Developers
 
On line6
On line6On line6
On line6
 
Powerpoint
Powerpoint Powerpoint
Powerpoint
 
CodaでClipを使ってWordPress開発を早くするススメ。
 CodaでClipを使ってWordPress開発を早くするススメ。 CodaでClipを使ってWordPress開発を早くするススメ。
CodaでClipを使ってWordPress開発を早くするススメ。
 
Launch a Web Service in 3 Days Using WordPress
Launch a Web Service in 3 Days Using WordPressLaunch a Web Service in 3 Days Using WordPress
Launch a Web Service in 3 Days Using WordPress
 
Effectively Planning for an Enterprise-Scale CMDB Implementation
Effectively Planning for an Enterprise-Scale CMDB ImplementationEffectively Planning for an Enterprise-Scale CMDB Implementation
Effectively Planning for an Enterprise-Scale CMDB Implementation
 
WordPressでウェブサービスを作ろう! #wbNagoya
WordPressでウェブサービスを作ろう! #wbNagoyaWordPressでウェブサービスを作ろう! #wbNagoya
WordPressでウェブサービスを作ろう! #wbNagoya
 
エンジニアの為のWordPress入門 〜WordPressはWebAppプラットフォームです〜
エンジニアの為のWordPress入門 〜WordPressはWebAppプラットフォームです〜エンジニアの為のWordPress入門 〜WordPressはWebAppプラットフォームです〜
エンジニアの為のWordPress入門 〜WordPressはWebAppプラットフォームです〜
 
Animalien mundua.
Animalien mundua.Animalien mundua.
Animalien mundua.
 
Multimedia. Animaliak
Multimedia. AnimaliakMultimedia. Animaliak
Multimedia. Animaliak
 
Animaliak
AnimaliakAnimaliak
Animaliak
 

Similar a Wordcamp Fayetteville Pods Presentation (PDF)

WordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkWordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkExove
 
You don’t know query - WordCamp UK Edinburgh 2012
You don’t know query - WordCamp UK Edinburgh 2012You don’t know query - WordCamp UK Edinburgh 2012
You don’t know query - WordCamp UK Edinburgh 2012l3rady
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applicationselliando dias
 
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)arcware
 
[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018Adam Tomat
 
Modeling Tricks My Relational Database Never Taught Me
Modeling Tricks My Relational Database Never Taught MeModeling Tricks My Relational Database Never Taught Me
Modeling Tricks My Relational Database Never Taught MeDavid Boike
 
Supercharging WordPress Development in 2018
Supercharging WordPress Development in 2018Supercharging WordPress Development in 2018
Supercharging WordPress Development in 2018Adam Tomat
 
Apostrophe
ApostropheApostrophe
Apostrophetompunk
 
Dirty Secrets of the PHP SOAP Extension
Dirty Secrets of the PHP SOAP ExtensionDirty Secrets of the PHP SOAP Extension
Dirty Secrets of the PHP SOAP ExtensionAdam Trachtenberg
 
Custom Database Queries in WordPress
Custom Database Queries in WordPressCustom Database Queries in WordPress
Custom Database Queries in WordPresstopher1kenobe
 
You Don't Know Query (WordCamp Netherlands 2012)
You Don't Know Query (WordCamp Netherlands 2012)You Don't Know Query (WordCamp Netherlands 2012)
You Don't Know Query (WordCamp Netherlands 2012)andrewnacin
 
Object Relational Mapping in PHP
Object Relational Mapping in PHPObject Relational Mapping in PHP
Object Relational Mapping in PHPRob Knight
 
Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)tompunk
 
Rich domain model with symfony 2.5 and doctrine 2.5
Rich domain model with symfony 2.5 and doctrine 2.5Rich domain model with symfony 2.5 and doctrine 2.5
Rich domain model with symfony 2.5 and doctrine 2.5Leonardo Proietti
 
Php 102: Out with the Bad, In with the Good
Php 102: Out with the Bad, In with the GoodPhp 102: Out with the Bad, In with the Good
Php 102: Out with the Bad, In with the GoodJeremy Kendall
 
Why is crud a bad idea - focus on real scenarios
Why is crud a bad idea - focus on real scenariosWhy is crud a bad idea - focus on real scenarios
Why is crud a bad idea - focus on real scenariosDivante
 
Propel sfugmd
Propel sfugmdPropel sfugmd
Propel sfugmdiKlaus
 
Can WordPress really do that? A case study of vierderduer.no
Can WordPress really do that? A case study of vierderduer.noCan WordPress really do that? A case study of vierderduer.no
Can WordPress really do that? A case study of vierderduer.noMorten Rand-Hendriksen
 

Similar a Wordcamp Fayetteville Pods Presentation (PDF) (20)

PHP and Cassandra
PHP and CassandraPHP and Cassandra
PHP and Cassandra
 
WordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkWordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a Framework
 
Fatc
FatcFatc
Fatc
 
You don’t know query - WordCamp UK Edinburgh 2012
You don’t know query - WordCamp UK Edinburgh 2012You don’t know query - WordCamp UK Edinburgh 2012
You don’t know query - WordCamp UK Edinburgh 2012
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
 
[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018
 
Modeling Tricks My Relational Database Never Taught Me
Modeling Tricks My Relational Database Never Taught MeModeling Tricks My Relational Database Never Taught Me
Modeling Tricks My Relational Database Never Taught Me
 
Supercharging WordPress Development in 2018
Supercharging WordPress Development in 2018Supercharging WordPress Development in 2018
Supercharging WordPress Development in 2018
 
Apostrophe
ApostropheApostrophe
Apostrophe
 
Dirty Secrets of the PHP SOAP Extension
Dirty Secrets of the PHP SOAP ExtensionDirty Secrets of the PHP SOAP Extension
Dirty Secrets of the PHP SOAP Extension
 
Custom Database Queries in WordPress
Custom Database Queries in WordPressCustom Database Queries in WordPress
Custom Database Queries in WordPress
 
You Don't Know Query (WordCamp Netherlands 2012)
You Don't Know Query (WordCamp Netherlands 2012)You Don't Know Query (WordCamp Netherlands 2012)
You Don't Know Query (WordCamp Netherlands 2012)
 
Object Relational Mapping in PHP
Object Relational Mapping in PHPObject Relational Mapping in PHP
Object Relational Mapping in PHP
 
Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)
 
Rich domain model with symfony 2.5 and doctrine 2.5
Rich domain model with symfony 2.5 and doctrine 2.5Rich domain model with symfony 2.5 and doctrine 2.5
Rich domain model with symfony 2.5 and doctrine 2.5
 
Php 102: Out with the Bad, In with the Good
Php 102: Out with the Bad, In with the GoodPhp 102: Out with the Bad, In with the Good
Php 102: Out with the Bad, In with the Good
 
Why is crud a bad idea - focus on real scenarios
Why is crud a bad idea - focus on real scenariosWhy is crud a bad idea - focus on real scenarios
Why is crud a bad idea - focus on real scenarios
 
Propel sfugmd
Propel sfugmdPropel sfugmd
Propel sfugmd
 
Can WordPress really do that? A case study of vierderduer.no
Can WordPress really do that? A case study of vierderduer.noCan WordPress really do that? A case study of vierderduer.no
Can WordPress really do that? A case study of vierderduer.no
 

Último

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

Wordcamp Fayetteville Pods Presentation (PDF)

  • 1. Pods  +  WP  =  CMS   Sort  of  …    
  • 2. What  do  we  want  in  a  CMS?   •  Flexible  –  Does  different  things     •  Robust  –  Does  things  well  
  • 3. Is  Wordpress  a  CMS?  Yes   •  Wordpress  is  really  good  at  publishing  one   kind  of  content:  the  Post   •  Its  interface  is  easy  to  learn  and  easy  to  teach.     •  Theming  is  especially  powerful.  Design   community   •  Plugins  and  custom  fields  provide  addiMonal   flexibility  on  a  post  by  post  basis.    
  • 4. Is  Wordpress  a  CMS?  No     •  Major  challenges  customizing  backend  UI   •  All  post  types  essenMally  the  same   •  Custom  fields  difficult  to  work  with  in  complex   ways   •  Scalability  issues  
  • 5. So  what?   •  Time  is  money   •  Consultants  need  to  maximize  funcMonality/ Mme  equaMon.  
  • 6. Custom  Fields   •  Good  for  on  the  fly  customizaMon   •  Bad  for  complex  content  types  
  • 7. Querying  Custom  Fields   $args  =  “meta_key=airline_name&value=American”;   $args  =  “meta_key=arrives&meta_compare=>=&meta_value=DATE()”   query_posts($args);  
  • 8. MulMple  custom  fields?   funcMon  get_post_meta_mulMple($metaDataList)  {    global  $wpdb;    $querystr  =  "SELECT  p.*  FROM  $wpdb-­‐>posts  AS  p  WHERE  p.ID  IN  (  ";    $querystr  .=  "SELECT  post_id  FROM  $wpdb-­‐>postmeta  WHERE  ";    $innerqry  =  array();    foreach($metaDataList  as  $key  =>  $value)  {      $innerqry[]  =  $wpdb-­‐>prepare(  "(meta_key  =  %s  AND  meta_value  =  %s)",  $key,  $value  );      }    $querystr  .=  implode("  OR  ",  $innerqry);    $querystr  .=  "  GROUP  BY  post_id  ";    $querystr  .=  "HAVING  count(*)  =  "  .  count($metaDataList);    $querystr  .=  ")  AND  p.post_status  =  'publish'  ";    $metaResults  =  $wpdb-­‐>get_results($querystr,  OBJECT);              return  $metaResults;   }   Source:  hsp://Mnyurl.com/ldadam  
  • 9. Scalability   •  Most  wordpress  users  will  never  experience   performance  issues  because  the  number   pages  just  isn’t  enough  to  maser.     •  But  consultants  sMll  need  to  be  concerned.    
  • 10. Scalability   •  All  posts/types  are  in  one  table.   •  All  custom  fields  are  in  longtext  format  which   means  they  can  store  up  to  4GB.   •  Table  sizes  are  effecMvely  doubled  by  custom   fields  10,000  posts  with  10  cfs  each  is  like   having  100,000  rows.  Add  in  revisions  and   even  simple  queries  become  hogs.    
  • 11. So  What  are/is  Pods?   •  Not  a  plugin  …  really   •  Pods  =  Simple,  scalable,  CMS  soluMon  for   Wordpress.   •  UlMmate  flexibility  with  being  too  Mme   intensive.     •  Frontend/Backend  CustomizaMon  a  cinch.      
  • 21. Example:  TemplaMng   <?php   $flight  =  new  Pod(‘flight’);   $flight-­‐>findRecords(‘arrives  ASC’,  -­‐1);   echo  $flight-­‐>showTemplate(‘flight-­‐list’);   ?>  
  • 23. Example:  TemplaMng   {@field.column}  
  • 24. Example:  TemplaMng   {@airline.name}  -­‐  {@name},  {@departs}  <br/>  
  • 27. Example:  TemplaMng   <?php   $flight  =  new  Pod(‘flight’);   $flight-­‐>findRecords(‘arrives  ASC’,  -­‐1);   echo  $flight-­‐>getFilters(‘airline’,  ‘Filter’);   echo  $flight-­‐>showTemplate(‘flight-­‐list’);   ?>  
  • 29. Example:  TemplaMng   <?php   $form  =  new  Pod('flight');   echo  $form-­‐>publicForm();   ?>  
  • 31. Example:  TemplaMng   <?php   $form  =  new  Pod('flight');   $fields  =  array('name','arrive','depart');   echo  $form-­‐>publicForm();   echo   ?>   $form-­‐>publicForm($fields);   ?>  
  • 35. MulMple  custom  fields?   funcMon  get_post_meta_mulMple($metaDataList)  {    global  $wpdb;    $querystr  =  "SELECT  p.*  FROM  $wpdb-­‐>posts  AS  p  WHERE  p.ID  IN  (  ";    $querystr  .=  "SELECT  post_id  FROM  $wpdb-­‐>postmeta  WHERE  ";    $innerqry  =  array();    foreach($metaDataList  as  $key  =>  $value)  {      $innerqry[]  =  $wpdb-­‐>prepare(  "(meta_key  =  %s  AND  meta_value  =  %s)",  $key,  $value  );      }    $querystr  .=  implode("  OR  ",  $innerqry);    $querystr  .=  "  GROUP  BY  post_id  ";    $querystr  .=  "HAVING  count(*)  =  "  .  count($metaDataList);    $querystr  .=  ")  AND  p.post_status  =  'publish'  ";    $metaResults  =  $wpdb-­‐>get_results($querystr,  OBJECT);              return  $metaResults;   }   Source:  hsp://Mnyurl.com/ldadam  
  • 36. Showcase   <?php   $di  =  new  Pod('distress_index');   $di-­‐>findRecords('name  DESC',  -­‐1,  "t.un  >  6.00  AND  t.cpi  <  2.00");   echo  $di-­‐>showTemplate('distress_data_table');   ?>  
  • 37. Scalability   •  Using  Custom  Fields:   –  600  rows  x  6  custom  fields  =  3600  table  rows   •  Using  Pods:   –  600  table  rows  
  • 39. What  about  Custom   Taxonomies/Post  Types?     •  Wordpress  argues  that  custom  taxonomies   and  the  introducMon  of  post  types  alleviates   the  need  for  excessive  use  of  custom  fields.     •  But  this  only  increases  the  scalability  slightly,   there  are  sMll  problems  for  large  sites.    
  • 40. Pods-­‐nosis  NegaMve?     •  Because  pods  data  is  saved  in  separate  tables,   standard  Wordpress  post  features  are  not   available.  (i.e.  comments/akismet)   •  Wordpress  does  not  currently  endorse  the  pods   cms  strategy  and  instead  is  pushing  the  “one  post   type  fits  all  strategy”.   •  Pods  community  is  considerably  smaller  than  the   wordpress  community.    
  • 41. Why  use  pods?     •  Learn  one  plugin,  build  anything  you  want.   •  Your  site  has  lots  of  relaMonships  between   types  of  content.   •  Scalability  is  a  concern.     •  Truly  custom,  customizaMon  
  • 42. Summary     •  There  is  no  RIGHT  way  to  use  Wordpress  as  a   CMS.   •  Pods  is  a  tool  for  developers,  not  users.     •  Pods  is  the  most  flexible/scalable  CMS  opDon   currently  available  for  Wordpress.    
  • 43. More  info?   •  www.podscms.org     •  www.mikevanwinkle.com     •  @podscms,  @mpvanwinkle  
  • 44. A  QuesMon?   •  Should  Wordpress.org  abandon  it’s  own   asempts  to  make  WP  a  CMS?  Can  WP  be   everything  to  everyone?