Jack has been thinking for several years about how WordPress themes are made, and whether the paradigm of how developers think about theming can shift. His talk at A Day of REST aims at sharing what he’s learned along the way.
Single Page Applications
Single Page Applications only require one page load for the server, and then subsequent calls to grab and display data utilize Ajax, and only partially reload page data.
Over the years, Single Page Applications have presented challenges for websites that have had to be resolved. For instance, search engines long relied on a page load to identify content for indexing. Also, browser history is more difficult to maintain in a SPA, meaning the “back button” doesn’t work. And, Jack notes, the initial page load can take a lot longer depending on what all is included in the request to prepare for both the initial page load and other technologies the web page will need to enable the SPA functionality.
— I Am Devloper (@iamdevloper) December 9, 2015
Neverthless, SPAs are becoming more popular, and bring a lot of benefits to web pages, and Jack wanted to explore what it’s like developing a WordPress theme as a Single Page Page Application.
WordPress themes as a Single Page Application
When creating a WordPress theme as a Single Page Application, Jack walked through how one could solve each of the challenges for SPAs in general, applied to WordPress themes.
- Search engine optimization
- Browser history
- Client / Server code partitioning
- Initial page load speed
Browser history and analytics
The History API — part of HTML5 — helps solve the problems associated with browser history as well as analytics. The API itself handles the browser history part, and Google Analytics has built in support for the API.
Speed of initial load
Jack realizes this is a strange and experimental processes, but that’s why this talk is titled, “a developer’s tale.”
Jack dug into a number of concepts in this talk, and you can follow along with his slides and click on various resources while you watch. Be sure to stick with it through the Q & A, because he answers a few really good audience questions.
The videos at A Day of REST were shot and edited by Rhys Alexander. The conference was organized by Human Made, and you can stay up to date with A Day of REST — which is going to Boston — and learn about other potential future events. There were eight great talks at A Day of REST, and you can read my review of the event as a whole, and look out for the next video to be posted here soon.