With the introduction of the WP REST API, I think WordPress is taking a step in the right direction to becoming more adaptable to a wider variety of needs. With a few easy techniques, we can easily build much more complex applications, which use WordPress for what it’s best for. The problem with the default implementation of the REST API is that it relies on sessions for storing authenticated user’s data. This means, that if we want for WordPress to play well with a host of other services, all the requests must go through WordPress to handle the security of those requests. Example Application Let’s say we are building an application consisting of 2 web services. One is WordPress with EDD installed, to handle users and payments. The other web service is a component that allows the users with the right subscription to post messages in a chat, of course this could not be easily written in PHP, so we should choose NodeJS, Golang, or something like this. And we also have a frontend application written in Vue. So our architecture would look like this: Traditionally, to connect these 3 services, we would make all the calls from the frontend through the WordPress REST API,
Share This