神刀安全网

Embracing the WordPress REST API

The WordPress REST API may still be under development, but that hasn’t stopped it from becoming quite the topic of discussion. Recently I attended my local WordCamp and, sure enough, there was a session dedicated to it.

For those who aren’t familiar with the REST API, it essentially allows data from your WordPress website to be made available to other applications. So, for example, you could build a mobile app that grabs pages, posts, etc. directly from WordPress. And as I learned at that WordCamp session, you could even create a single page JavaScript app (thus, bypassing the traditional WordPress theme) using the REST API. This can certainly increase portability of data and open up a lot of creative space for developers.

If you haven’t already done so, check out Calypso , Automattic’s desktop app that uses WordPress.com’s version of the REST API. That will give you a taste of some of the possibilities for creating a fast, beautiful interface.

Developers must evolve

As someone who has become pretty decent at creating and modifying WordPress themes, I have to say that some part of this scares me to death. And while Matt Mullenweg told us to “ learn JavaScript deeply ” at WordCamp US in 2015, it can be a bit intimidating for those of us who aren’t experts in the language.

That said, it’s all part of the challenge of working in this industry. Once you get comfortable working a certain way, everything changes. Back in the days before WordPress, PHP and MySQL scared the daylights out of me. Things worked out just fine.

The point is, we will evolve along with the tools we use.

Small business sites and the REST API

Along with our evolution as developers, we have to think about how these new capabilities will affect our clients. Is the REST API going to be useful for the typical small business website?

A recent post by Rachel McCollin on the WPMU DEV blog made some great points regarding when (and when not) to use the REST API. Among her arguments were that a client’s budget and timeline for getting a project launched may mean using the REST API isn’t an option.

Ms. McCollin is spot-on with that assessment. I’ve worked with a number of small businesses over the years who need projects launched quickly and within a fairly limited budget. Adding another layer of development, at least for my business, just seems unrealistic at this point.

But that doesn’t mean there isn’t great potential to do some very creative things with small business. I can see microsites, for example, being created with REST API boilerplates that allow for some stunning visuals and lightning-fast load times. And those businesses who utilize mobile apps will benefit from having their site’s content so readily available.

Where we are, and where we’re going

As with a lot of technological advancements, it may be that we see larger agencies (with more development resources) taking advantage of the REST API at this early stage. As the API evolves and gains more traction among developers, it certainly wouldn’t surprise me to see a robust market of related products pop up — not unlike the theme and plugin markets. In fact, there are already some products out there that can use the REST API ( AppPresser , for one).

My feeling is that, once the market becomes mainstream, we’re going to see a big trend towards using JavaScript-based interfaces. The question is how many, and what types of business sites make that switch. It will also be interesting to see what, if any, unexpected pitfalls come with this change. There’s already talk that SEO may take a hit by going with a JS interface. Then again, those things do get worked out over time.

Regardless, this is an exciting time for WordPress and those of us who work with it. The REST API is opening up avenues to us that could shape the web for years to come.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Embracing the WordPress REST API

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
分享按钮