WordPress is built using PHP while the REST API removes the reliance of PHP altogether. Here are just a few reasons why moving towards a fully RESTful WordPress is the future, and why you should consider embracing it: One of the major reasons is building out a REST API guarantees WordPress’ spot as a full fledged application platform. Ok…But Why?Īt this point, you may be asking yourself “Ok…cool…but Why?” You may be thinking, “Why fix something that isn’t broken?” WordPress works perfectly fine now, why reinvent the wheel? And you would be perfectly valid in thinking that. This allows you to do some truly custom work – from building out custom admin dashboards to fully functional themes utilizing Angular.js or React.js.īuilding out a theme with Angular.js or React.js creates a seamless website – where posts and pages load near instantly and without the need for a full page refresh – providing a much better end user experience. This means that each component that makes up a WordPress site is completely independent of one another. One of the benefits of REST is its decoupled architecture. REST is essentially a method of communication between one or more web services, allowing you to send or retrieve data between sites that lie on different hosting environments. REST stands for Representational State Transfer and is a web architecture style. My goal is to provide a basic understanding of the REST API and some of its capabilities, as well as provide you with some working code that you can implement, use a starting point or as inspiration. In this article I am going to explain what the REST API is (in layperson’s terms), how you or your agency can benefit from it, and provide a real world example or two. Further down the road, building out a REST API within WordPress allows WordPress to communicate with other technologies – further widening the “Internet of Things” – transforming your website into a data mine. As the web moves towards web applications, the REST API is going to play an integral part in the way data flows through your site. But I knew that it was going to be a game changer, and something that developers should at least become familiar with. I didn’t know why, and I couldn’t think of any real world uses for it – mainly because I didn’t understand what it was. When I first heard that a new REST API was coming to WordPress, I too was excited. It’s all the rage at WordCamps over the past year, and you see articles popping up on sites like Torque and WP Tavern. You may notice others getting excited, or gearing up for a major overhaul of the WordPress infrastructure. By now, I’m sure you’ve heard a ton of information about the new WordPress REST API coming to a future releases of WordPress.
0 Comments
Leave a Reply. |