Why WordPress’ Support For REST API Is a Big Deal

WordPress has unveiled its latest iteration, version 4.4. It’s called Clifford, after the jazz trumpeter Clifford Brown, and comes with the usual slew of new features that all updates have.

It sports, for example, responsive image functionality, so pictures are automatically sized depending on the device — no tinkering or cursing necessary anymore.

Clifford has also made the leap to oEmbed provider “allowing any oEmbed consumer to embed posts from WordPress sites.” Previously WordPress operated as an oEmbed consumer only, letting users to embed content from other sites.

Under the Hood

The biggest changes, though, are occurring under the hood — and their impact might not be apparent for some time. But these features are laying the groundwork for what many see as WordPress’ next chapter. 

“In the short term users may not notice what makes version 4.4 so special but in the longer term they will,” Brian Krogsgard, a Birmingham, Ala.-based WordPress developer and founder of Post Status, a WordPress news service told CMSWire.

“We are going to see WordPress used in ways that it hasn’t, at least not frequently, thus far. The infrastructure is set up to allow companies to do a lot more.”

REST API’s ‘Scaffolding’

The infrastructure Krogsgard referred to is the beginning of a multiple-stage REST API infrastructure rollout. Version 4.4 contains the “scaffolding” as Matthew Mullenweg, founding developer of WordPress put it in his own intro.

To be sure, WordPress is not the first CMS to incorporate the REST API framework. But because it powers about half of the entire Internet, according to BuiltWith, WordPress is probably the most important to do so. Word Core Developer Scott Taylor noted that fact when he was on stage at WordPress’ recent 2015 State of the Word. Actually what he said was: “When WordPress adopts modern technologies, the Internet adopts modern technologies.”

On his personal blog Taylor is a bit more modest. In slide share he pointed out that that “WordPress is not unique for having REST. Many other frameworks/languages do it.”

But his comments at State of Word were funny because they were true.  A closer look at REST API, therefore, is in order.

A Quick Tutorial

REST, or more formally, Representational State Transfer, is an architectural style that has a number of attributes, starting with what it can replace. It is an alternative to XML-RPC  and to admin-ajax.

Some other attributes, roughly and briefly explained:

It has a Layered System constraint — meaning the client does not know if it is connected directly to the end server, or to an intermediary server. A connection to the latter is better for scale and load-balancing.

It is also client-server based, which means the client is separate from the server, allowing the servers to be more scalable and the client free of data storage concerns. They are connected by the user interface.

Finally, it can speak JSON with other websites and create arbitrary endpoints.

A More Consumable WordPress

Now we get a better sense of Krogsgard’s excitement over WordPress’ new direction and the range of projects he predicts WordPress will be used to support.

“The REST API makes WordPress more consumable. You don’t have to use WordPress as the data store anymore; now you can get the features out of the box more easily and decouple the admin or front end,” he said.

“You can make it unique to what your service needs actually are, versus what WordPress wants to spit out.”

For example, Krogsgard predicted that companies will start using WordPress together with Software-as-a-Service functionality, now that WordPress can be used for the storage layer and the API offering up the services.

There are examples of this already, he wrote in an article covering State of the Word. 

Here’s one you might recognize: “Microsoft Dynamics AX is a project by WebDevStudios that uses the WordPress REST API to interface between Dynamics AX and the web,” he wrote.

Article source: http://www.cmswire.com/web-cms/why-wordpress-support-for-rest-api-is-a-big-deal/

Related Posts