While the status of merging REST API default routes into core is unclear, the infrastructure for custom APIs is already there. This means that plugins and site-specific, API-driven interfaces can now be easily built.
The track was full of discussions on these topics and more. In this post, I want to share my takeaways.
Is This The New Way?
I suspect that more new plugins will ship with their own custom endpoints built in. In a sense, this has always been the case, but instead of using admin-ajax, which has no declarative structure for endpoints, more developers will use custom REST API endpoints.
Of course, for existing plugins, backwards-compatibility with the existing plugin code and older versions of WordPress is an issue. For example, Ninja Forms 3 has been completely rewritten as a Backbone app to support users running older versions of WordPress that have not yet adopted the WordPress REST API standard. This makes sense as they have a lot of users and not all are able to update to the latest version.
I asked Gennaro Piccolo, a developer at Time4Learning.com, how this new approach is affecting his work:
“As a developer, not accounting for user experience is no longer an option. Users are getting more and more accustomed to very fast, very easy to navigate UIs,” Piccolo said. “In order to keep up with user demands, I am forced to constantly reevaluate how my application is being used and roadblocks people face in accomplishing their task quickly and efficiently.”
The moderator of the track Michael Schofield agreed,
Nobody can predict what WordPress 7.0 will be like. But for now, these REST API driven interfaces require a well-written, decoupled set of REST API endpoints written in PHP.
Many people I spoke with at WordCamp Miami expressed how excited they were to work more with Angular. I am not sure if I made the case that well, or they were just being nice because I’ve been the “Angular Guy” for the last few months. Many people I spoke with also had a new interest in Backbone, since it’s bundled in core.
While I learned a lot at WordCamp Miami, and had several conversations about “what’s next for WordPress,” the truth is I don’t know and I don’t think anyone else does either. That’s what’s so exciting, we are all learning new things, trying new things, and building in new ways.
Although it is possible that we might settle on one new way of doing WordPress, it’s more likely that WordPress core will continue to provide a standard set of tools, and that more and more developers will use those tools to build solutions for their specific situations. WordPress, at the adoption rate it’s at today, can’t be all things to everyone. The best it can do is enable developers to make different interfaces for different types of users.