SHOULD WE GO
ALL-IN ON JAVASCRIPT?

Kristoffe Biglete - WordPress Meetup

  • Web-designer, frontender
  • 9 years of experience with WordPress
  • Works at Peytz & Co
  • @kristoffe_

ABOUT ME

CALYPSO

  • Released in nov. 2015
  • Wordpress.com new admin application
  • Based on clearly defined goals
  • Open-Source on GitHub

CALYPSO

CALYPSO

FEATURE OLD WP-ADMIN CALYPSO
Performance Multiple slower page reloads Neat-instant page loads, no reload needed
Real-time updating Reload each page to see changes reflected Changes update in real time, no reloading needed
Editor Slower, boxy interface.
Desktop only post previews.
Clean, modern interface.
​Instant publishing, with in-page previews for desktop, tablet and mobile.
Multi-device Desktop web, and limited mobile web support Desktop and full mobile web, with matching desktop and mobile native apps.
  • Node.js
  • Sass
  • Webpack
  • Babel
  • React

CALYPSO

  • MVC vs Flux

REACT

Basic MVC flow

  • MVC vs Flux

REACT

Complex MVC flow

  • MVC vs Flux

REACT

Basic Flux flow

  • MVC vs Flux

REACT

Complex Flux flow

  • HTML-like language embedded in JSX
  • Supply with data (JSON)
  • Render HTML structure
  • Components, reusable & modulable

REACT

  • Virtual DOM

REACT

  • Downsides
    • SEO / Google
    • SPA initial load

REACT

  • Modern Tribe
    • tri.be/blog
  • WordExpress
    • wordexpress.io

APPLICATIONS

APPLICATIONS

  • Modern Tribe
    • WP REST API
    • Custom endpoints
    • Static JSON dumps of API responses
    • Stringified and cached in localStorage

APPLICATIONS

APPLICATIONS

  • WordExpress
    • Node.js application
    • Express for backend
    • React for frontend
    • GraphQL for database

APPLICATIONS

  • GraphQL vs REST

APPLICATIONS

  • GraphQL vs REST

APPLICATIONS

  • React
  • CSS Modules

APPLICATIONS

  • React
  • CSS Modules

APPLICATIONS

  • PHP is not going anywhere (for now)
  • You need to get into JS now though
  • Calypso is WordPress paving the way to innovation (REST API in Core, pure JS product)

WHAT ABOUT WORDPRESS?

"Even core Calypso project team members had to get over our intimidation. None of us were strong JavaScript developers. But as each day passed our experience built, we made mistakes, we reviewed them, we fixed them, and we learned."

 

Andy Peatling, Calypso project lead

WHAT ABOUT WORDPRESS?

"A wizard is never late, nor he is early, he arrives precisely when he means to."

 

Some old dude

WHAT ABOUT WORDPRESS?

"The times they are a changin'."

 

Some other old dude

WHAT ABOUT WORDPRESS?

WordPress DK Meetup - Should we go all-in on Javascript?

By Kristoffe Biglete

WordPress DK Meetup - Should we go all-in on Javascript?

  • 1,665