Most content websites use a content management system like WordPress to generate web pages on the server before sending them to the browser. There are advantages to this approach: generating pages on the server asks little of the web browser; the business logic of the application is located in one place, rather than spread across the server and the client; and search engine crawlers are well-equipped to deal with HTML: even modern crawlers may have problems with Single Page Applications (SPAs).
It’s against that background that WordPress released its REST API, predicting that the future of WordPress depends on its ability to serve content to rich applications that run mainly in the browser. But the question remains, why would we want to abandon the traditional server-side rendering offered by classic WordPress and embrace the idea of API driven content sites?
A well-architected front-end application can download and cache content in the background. A visitor lands on your site’s home page, and once the application is loaded, it starts downloading the article content before the user clicks on anything. When they do click on something, that content is available in an instant, displayed without so much as a page refresh.
Technology like Service Workers allow web applications to cache content and intercept browser requests. They can run the application even when there is no web connection. Although the user won’t be able to download new content, they will be able to use the application and access content that has already been cached.
The WordPress REST API presents a uniform interface that can be interacted with by any authenticated client, including mobile applications, other content management systems, analytics platforms, and so on.
React, the popular front-end framework from Facebook, includes React Native, which can be used to build native applications for iOS and Android devices that share code with the web application.
Users Benefit from the Content Management Power of WordPress
WordPress is ubiquitous, it’s free, and it’s easy to use. Many years of development have been invested into making WordPress a fantastic content management platform for sites of all sizes. Writers, editors, and developers are familiar with it. The API means that content publishers can embrace a tried and true technology without having to forgo modern app development workflows and technologies.