WordPress REST API Conference
iWeb traveled to London for “A Day of REST”, the first conference about the new WordPress REST API which was introduced in WordPress 4.4.
The WordPress REST API allows developers to work with data in WordPress from outside of the platform itself. This will allow developers to make use of and manipulate the information saved in WordPress from another website or application.
It is also possible to build alternative, bespoke admin areas to create, update and delete blog posts, pages or other elements on the original WordPress site. This expands the reach and possibilities for using WordPress. A Day of REST, organised by Human Made gave an introduction to the REST API and covered a number of it’s possible uses along with real world examples.
Here at iWeb, we’re excited about the possibilities the REST API introduces. There have already been a number of cases where we thought the REST API would have been useful for solving real world challenges. We were building a new site for Attack Magazine while they were still using their existing site. At the end of the project, just before going live with the new site, we had to write and run a number of import scripts to bring the new information into the site. Using the REST API we could have synchronised content between a clients live and development website. Wired explained how they made use of the REST API to synchronise their development sites with the live site.
So with our hearts full of hope and excitement we travelled to London! We travelled the night before as registration opened very early the following morning. First thing we did when we arrived was to get some dinner. We were starving after a busy day at work and the long train journey!
We headed to the Bubba Gump Shrimp Co. restaurant. I love fish and I’m a little bit of a fan of the movie Forrest Gump. After looking at the menu we end up ordering, by mistake, two fish plates meant for sharing. Oops! Delicious nonetheless! After finishing both plates we headed straight to the hotel to get some rest (pun intended!) before the conference.
When we arrived we got our conference badges, together with a bag containing some essentials to feel restful – a blanket and a pair of socks, nice touch!
Introduction to the WordPress REST API
This was the first talk of the day. A nice introduction to the REST API. Ryan started briefly explaining the other APIs included in WordPress and how useful they have or haven’t been to the developers. He then went on to explain how other API’s from Facebook, Stripe and Twitter influenced how the REST API would work.
His critical analyse of the WordPress REST API showed that there are still important features missing, including the ability to work with custom meta fields – something we frequently use at iWeb.
The Building Blocks of a REST API Project
Joe’s talk was a practical example of what kind of applications you can build using the REST API. Using WordPress to store the information along with making use of the REST API to pull in data from third parties such as social networks. The data can then be used to feed a number of different applications.
In his example, users were able to sign up using different platforms in order to share their location with other logged in users.
Unlock the potential of the WP REST API at the command line
At iWeb, we love tools that help us do our jobs more quickly and reliably. Command line interfaces (CLI) are tools that help us automate complex tasks such as moving websites to different domains.
There is already a CLI specifically created for WordPress named WP-CLI. In his talk, Daniel spoke about modifying WP-CLI to take advantage of the REST API to help with issues like blog migrations while still keeping it as the fastest interface for WordPress. Or in Daniel’s words, creating a more RESTful WP-CLI.
There and Back Again: A Developer’s Tale
Jack’s talk was about how single-page applications can sometimes be the solution to issues like usability, bad connections, page load times and continuous user experience.
Building Calypso-like Applications With the WP REST API
Calypso is an external interface which can be used to manage one or more WordPress websites. It can be accessed in the browser or downloaded as a desktop app. It can replace the WordPress admin area in some cases.
Nikolay gave a brief introduction to how Calypso works and went further, explaining how similar admin applications could be built to manage bespoke WordPress sites.
Pay no attention to that WordPress behind your application
K.Adam gave us some background to his experience building an application that makes use of the WordPress REST API. He mentioned a number of tools and technologies that could be used and how to pick the most useful ones.
He finished his talk explaining how he thinks the community will create two types of REST API projects depending on the clients budget. Very custom and specific projects that will need to customise the API or generic projects that will use the API out of the box.
Should I use the WordPress REST API? Ask WIRED’s “Ask a Flowchart”
Kathleen presented a few examples of how Wired has used the REST API to solve some problems. She went through the different examples and explained the challenges they faced in the process and why, at the end, it was or wasn’t a good idea to use the REST API.
I found the example about synchronising their live site with their development site most interesting. This is a problem we’ve faced a number of times and Wired’s solution had many advantages over existing techniques.
Other useful examples were how to use it when you need to feed information to other third party applications or import information from them.
The Live Coverage platform at The New York Times
The last talk of the conference was about the live coverage sites at The New York Times.
The live coverage platform at The New York Times is built upon a single WordPress multisite installation. It is used to fire up live coverage sites quickly to cover fast moving news stories and live events.
They built an external application to manage the posts in their live coverage blogs using the REST API. He explained the implementation in detail and some of the challenges.
We found the conference very useful and eye opening. The REST API is still under active development. However, it offers really interesting solutions for a number of problems we face as developers. I’m looking forward to seeing how it gains traction in the larger WordPress community.
After the conference we headed directly to the afterparty venue. We enjoyed some tapas served for us while we mingled with interesting people and continued conversations about the REST API and other subjects with developers from across the globe.
From there we headed home, tired but full of new knowledge and ideas after having a great day thanks to the people of Human Made.
Want to discuss a project?
Talk to our Magento experts on 01785 279920