|

WordCamp GR 2017 – WP-API: The Good, the Bad, and the Ugly – J Andrew Scott

J Andrew Scott – http://rubberchickenfarm.com/

History of APIs

  • RSS
    • Advantages
      • Fast & reliable
      • Easy to consume
      • Almost no technical footprint
    • Disadvantages
      • Read-only
      • Static content
      • No authentication
      • No user-driven content (i.e. comments, favorites, etc)
  • DIY API
    • Advantages
      • Dynamic content
      • User-driven content
      • App & user authentication
      • Roles & permissions based
      • Connected applications
    • Disadvantages
      • DIY OAuth
      • Redundant URI scheme
      • Mediocre performance
      • Large technical footprint
  • WP-API
    • Advantages
      • Succinct URI scheme
      • Improved performance
      • Small technical footprint
      • Available in WordPress core
    • Disadvantages
      • Granular transactions
      • No batch uploads
      • Increased number of API calls
      • What once required 2 web servers now required 12-15 servers

WP-API Disadvantage Factors & Solutions

  • Number of content types
    • Solution: consolidate endpoints
  • Volume of individual API calls
    • Solution: batch processing endpoints
  • Frequency of individual API calls
    • Solution: page-level caching

Lessons Learned

  • Use standard authentication methods
  • Use page-level caching on GET requests
    • Varnish
    • WordPress object caching
  • Use custom endpoints
    • for upload of large batches of content
    • for consolidating repetitive API calls

Similar Posts

  • A Little Bit Of #WCGR With Me Camping

    As I headed off camping with the family this weekend I was choosing what to bring to keep my phone charged. When you are a tent camping family you only have so much room. The charging pack I received for speaking at last year’s #WordCamp Grand Rapids, and the USB conversation dongle from this year…
  • |

    WordCamp US 2019 – Just Enough React for WordPress – Shannon Smith

    New Block Editor Discover the Possibilities Block templates Blocks instead of custom fields, shortcodes, etc How Does the New Block Editor Work? Uses React, JavaScript/JSX Blocks are like plugins There is a Core Layer & Editorial Layer React abstraction is built-in Cool Stuff Blocks can be reusable Backend Workflow-only blocks Block level locking – you…
  • |

    Using WordPress As My Note Taking Tool

    So this past Sunday, in a continued effort to find my replacement note taking tool for Evernote, I decided to give my blog a try as a not taking tool. I have the Android app on my phone and tablet so that step made things fairly easy. For the most part things went very well,…
  • |

    WordCamp US 2019 – Technical SEO Checklist: How to Optimize a WordPress Site for Search Engine Crawlers – Pam Aungst

    Why SEO is Important For search engines Why Technical SEO is Super Important Search Engines: Crawl / Index / Rank If technical SEO isn’t working search engines can’t crawl/index/rank. Visitors wont’ find your site. The Ultimate SEO Checklist Basic/Traditional Items Domain & CMS Run by a well designed platform Meta Robots Search Engine Visibility checkbox…
  • |

    Enterprise API Development…Navigating The Battlefield

    Right now at work I’m the lead on a project to establish a new vendor API. Unfortunately there were decisions made on key specifications of how the API was to be developed before it was handed to me. Where I work there is a lot of legacy standards and so it’s challenging to introduce new…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)