PHPNews

One Month Since OpenAPI v3.0

Last month today OpenAPI v3.0 was released , and not only is there a lot of cool stuff , but it unblocks some akward situations with vendor prefixes and other lacking features. I was hoping the tooling would be hot on its tails. Progress is being made in all of the repositories I've got my eyes on, but sadly v3.0 …

Continue reading »

Written by Phil Sturgeon - - Aggregated on Saturday August 26, 2017


Chasing the Perfect API Specification Workflow

Documentation is a nice thing to have, but it is often treated as optional or superfluous, especially in teams where the clients and servers are managed by the same people. Here the code is considered the contract, so why define it again in documentation? Certainly, with all the tooling around, API documentation …

Continue reading »

Written by Phil Sturgeon - - Aggregated on Thursday July 20, 2017


Representing State in REST and GraphQL

Representing state is a complex thing. At my last two jobs, it's been very common for APIs to be treated like "databases over HTTP". The fields are sent up and down from the server to multiple mobile/web apps, and there's not too much else going on. Over time, we noticed this specific problem happening over and …

Continue reading »

Written by Phil Sturgeon - - Aggregated on Monday June 19, 2017


You Might Not Need GraphQL

After writing about how GraphQL and REST differ in various regards, and taking a closer look at caching in particular , I wanted to write about how you can get some of the benefits of GraphQL into an existing endpoint-based API. It's finally live, and over on the Runscope blog . Normally I'd post this sort …

Continue reading »

Written by Phil Sturgeon - - Aggregated on Monday April 17, 2017


GraphQL vs REST: Caching

Recently I wrote GraphQL vs REST: Overview , giving a hype-free outline of the differences between REST and GraphQL . One section that would not have fit into that already lengthy article was caching, so I thought I'd fire that out next. Comparing how caching is used for the two approaches is tricky, because …

Continue reading »

Written by Phil Sturgeon - - Aggregated on Thursday January 26, 2017


GraphQL vs REST: Overview

A few months back I wrote a comparison between RPC and REST for Smashing Magazine, and now I want to talk about the differences between REST and GraphQL: the new kid on the block. GraphQL is incorrectly considered by some to be a "replacement" to REST . GraphQL is a newer concept, being released by Facebook …

Continue reading »

Written by Phil Sturgeon - - Aggregated on Tuesday January 24, 2017


Building APIs with Rails: Documentation Testing

Now that we've started building a very basic API, we should make sure that the documentation continues to keep up to date with our progress. Even better, we can use our documentation as a basic contract test, to make sure we aren't lying about what our API offers. I've written tutorials in the past about how Dredd …

Continue reading »

Written by Phil Sturgeon - - Aggregated on Wednesday December 21, 2016


Building APIs with Rails: Documentation Testing

Now that we've started building a very basic API, we should make sure that the documentation is kept up to date with our progress. Even better, we can use our documentation as a basic contract test, to make sure we aren't lying about what our API offers. I've written tutorials in the past about how Dredd works , …

Continue reading »

Written by Phil Sturgeon - - Aggregated on Wednesday December 21, 2016


Mocking APIs with API Blueprint

The second video in a pile of LiveCoding.tv videos shows how to use your API Blueprint documentation to mock APIs, and a few different ways of serving those mocks up to people. Using a mock server, you can basically see how an API would work, without actually building anything. This is really helpful as early on …

Continue reading »

Written by Phil Sturgeon - - Aggregated on Friday December 2, 2016


API Documentation: Do it First

Two years ago I finished the first edition of Build APIs You Won't Hate , and since then I've worked on bigger and better projects, using my API experience, honing some approaches, and throwing out some approaches entirely. These projects were big and scary. I did some things I'm not proud of, and in general - …

Continue reading »

Written by Phil Sturgeon - - Aggregated on Monday November 21, 2016


Tips on Sidekiq Queues

Sidekiq is great. It's a really handy way to take slow stuff that your application is doing like uploading images or sending emails, and get them out of the web request. Users don't want to sit around waiting for that stuff to happen most of the time, and if they do want to be alerted as to the success or failure of a …

Continue reading »

Written by Phil Sturgeon - - Aggregated on Wednesday November 16, 2016


Sidekiqing Your Queue in the Nuts

Sidekiq is great. It's a really handy way to take slow stuff that your application is doing like uploading images or sending emails, and get them out of the web request. Users don't want to sit around waiting for that stuff to happen most of the time, and if they do want to be alerted as to the success or failure of a …

Continue reading »

Written by Phil Sturgeon - - Aggregated on Wednesday November 16, 2016


Codes of Conduct: Maybe They're Not So Bad?

I've written a few articles about Code of Conducts, which are a hotly debated version of the Anti-Harassment policy you almost certainly signed at any job you've held since delivering newspapers. Before I grappled the subject head-on, I wanted to clear a few related points out of the way: Why is Everyone …

Continue reading »

Written by Phil Sturgeon - - Aggregated on Saturday September 17, 2016


Talking About Diversity: Conspiracy

This is part two of a blog series, about why the PHP community is having a rough time talking about diversity related issues (like code of conducts), and struggling to handle toxic behaviors from members. In the previous article I discussed one of the major problems in the conversation: negative assumptions about …

Continue reading »

Written by Phil Sturgeon - - Aggregated on Saturday September 17, 2016