I'm very excited to be able to say that I was published in php|architect, in December's issue. I had the /etc column, where I wrote a bit about phpwomen.org and what we're up to these days. As I've wanted to write for them for ages, I was very chuffed to be asked and it was fun doing it :)
Using a HTTP Error code doesn’t stop you serving up a custom error page. In fact thats the best way to do it.
People who visit with a web browser will be none the wiser, but anyone that needs to programatically find out what the server responded with can. And if you’re serving up an API err [...]
I don’t use errors codes at all.
Custom error pages with description what is happened and recommendation what user need to do – it is my way.
Keep in mind not all users can understood error by number and less of them will know what to do.
I gather most js libraries will now provide an error handler for 4xx and 5xx, which is quite handy to know whether to display an error dialog. I also use 4xx for when client errors eg when a db constraint fails, I respond with a 4xx and put the error message in the body of the response. For [...]
Gaetano: I quite like having the version in the URL but that depends a lot on what kind of service you designed as to what makes most sense. I like major.minor as a naming scheme but it is probably overkill as really APIs shouldn’t be changing a lot.
Chris: Whether you support multiple ver [...]
Bart: yes, we love it – thanks for dropping by!
Caity: It doesn’t seem like 2 years, does it? Looking forward to showing you how much has changed by the time you come again, ooh and I’ll take summer garden photos so you can see the flowers :)
hey patio looks very smart and i love the garden gate! you can have a very big YAY about being in your house 2 years from me! cant wait to see it all for real! Miss u! Caity x x
@Gaetano My preference is put version in the URL. This gives you some flexibility on whether to completely branch off and have a new set of API code, or to simply pass the version in as a parameter.
The only scary part about this is that there are now multiple versions of the same API tha [...]
Interesting post, but more detail would be welcome: – is it a good idea to put version nr. in url, so that new versions of the same webservice can be immediately located? – is using the classic major.minor.revision versioning scheme a good idea or is it overkill? – shall both clients and se [...]