building a web app on wordpress
play

BUILDING A WEB APP ON WORDPRESS THE GOOD, THE BAD & THE UGLY - PowerPoint PPT Presentation

BUILDING A WEB APP ON WORDPRESS THE GOOD, THE BAD & THE UGLY Nathan Tyler @croixhaug nathan@tylerdigital.com https://stagingpilot.com WHY BUILD AN APP ON WORDPRESS Matt Mullenweg has mentioned using WP as an app framework several


  1. BUILDING A WEB APP ON WORDPRESS THE GOOD, THE BAD & THE UGLY Nathan Tyler @croixhaug nathan@tylerdigital.com https://stagingpilot.com

  2. WHY BUILD AN APP ON WORDPRESS • Matt Mullenweg has mentioned using WP as an app framework several times over the last few years • WP REST API opens up lots of possibilities to break out of the CMS mold • There are 45,619 free plugins available in the WordPress plugin directory to get you started

  3. PRO: WP REST API Built-in support for CPTs Easy custom endpoints Security, authentication, response codes, validation are all handled

  4. PRO: USER AUTH/CAPABILITIES Registration, login, lost password, etc. Passwords, security, limit logins, captcha Powerful and Flexible Permissions

  5. PRO: 3RD PARTY PLUGINS Rapid prototyping All things built to work within the WP ecosystem

  6. CON: PLUGINS EXPECT WP-ADMIN Plugin functionality is built to be managed in wp-admin To make front-end “app” interfaces, you lose 50%+ of using existing plugins

  7. CON: DATABASE & ENVIRONMENTS Lots of functionality is tied to the database No built-in concept of Environments (for dev/testing/production) Quick wins with 3rd party plugins now present challenges

  8. CON: BUILT FOR PAGE LOAD IN BROWSER For long-running background jobs, you have to fight WP’s built-in cache for queries and postmeta

  9. BUILDING A WORKFLOW FOR SEAMLESS WORDPRESS UPDATES Take screenshot Update plugin Take Screenshot Compare images Process comparison and rollback with error, or commit & deploy

  10. Update Workflow * Take screenshot * Update plugin * Take Screenshot * Process Comparison * * (automated browser tests) Rollback update * or * Deploy to production site * JOB QUEUES This workflow is too long to do all in one step, we use a job queue Like a job board, with employers, job postings, and workers

  11. JOB QUEUE PROS & CONS + run big tasks in background + run multiple tasks in parallel + error-prone jobs (api rate limits or unreliable 3rd party) + workers in different languages + queuing (less crashes) + scaling (more workers) - complicates dev, debug & testing - long-living workers can introduce new issues (WPQuery/ACF cache/memory leaks)

  12. INTERACTIVE TESTING Virtual web browser execute complex functionality registration pages, private login areas, e-commerce checkout, interactive elements, etc.

  13. TRY THIS AT HOME • Setup beanstalkd on Digital Ocean step by step tutorial: 
 https://www.digitalocean.com/community/tutorials/how-to-install-and-use-beanstalkd-work-queue-on-a-vps • Download Pheanstalk library 
 https://github.com/pda/pheanstalk • Create a queue, provider, and worker (as part of WP or just PHP by itself) • Ideas to try: API call, large/slow/background jobs, handle/ process uploads

  14. SHOULD YOU USE WORDPRESS AS AN APP FRAMEWORK? + Registration/Authentication - Everything tied to the database + REST API - Handling environments 
 + Existing code and plugins dev/staging/testing/production + Rapid prototyping - WP Core (and third party plugins) are 
 + Strong admin interface for 
 all built for the majority (WP as CMS) - Prototyping => Refactoring & migration later managing your app

  15. Thank you! I’m happy to answer any questions (now or anytime) @croixhaug nathan@tylerdigital.com https://stagingpilot.com

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend