2013年11月1日星期五

Site News: Popular Posts for the Week of 11.01.2013

Popular posts from PHPDeveloper.org for the past week:

Community News: Packagist Latest Releases for 11.01.2013

Recent releases from the Packagist:

Lee Davis: Is a HTTP DELETE request idempotent?


Lee Davis has a new post to his site with some thoughts about RESTful APIS and the correct response to DELETE calls when a resource has already been removed. One camp says a 404 should be thrown as it's no longer there, the other says 204 a "No Content" should always be returned. Lee looks at both sides of the argument and shares some of his own thoughts too.



Recently I had a read of an interesting post by Lukas Smith (@lsmith) about the use of the DELETE method when building RESTful services. I wanted to get my thoughts down on this. Mostly to help myself, but if it helps you determine a better approach, then great. I'm nowhere near qualified enough to preach, so this is by no means a "you should do it this way / my way is correct post", just food for thought. Besides, there are probably more questions here than answers.


He talks about the idea of "idempotence" when it comes to REST APIs and how it relates back to the DELETE discussion. He points out that the term has more to do with the end result of the request and not so much about how it's handled (and any "side effects" that may come with it). Various checks on the resource in question - like "does it exist" - could be considered a side effect of its operation. In his opinion, though, the 200 series of responses are more appropriate when a resource is actually deleted.


Link: http://www.duckheads.co.uk/is-a-http-delete-requests-idempotent/491

PHP Manual Masterpieces: PHP 2.0: A Review in Retrospect


The "PHP Manual Masterpieces" site has varied a bit from its usual format and has gone with its own "blast from the past" doing a review in retrospect of PHP 2.0, a long forgotten version of the language with some "interesting" features.



This is not about PHP as we now know it in the waning months of 2013. This is about the waning months of the year 1997. I was nine years old. My life was not yet overshadowed by haphazard scripting languages. Somewhere in the wilderness, during a savage thunderstorm in the dead of night, a Danish Canadian pushed the 2.0 revision of his personal home page generator's tarball to a web server.

The post looks at some of the "horrors" that made up PHP at that time including:



  • The footer PHP/FI added to every page
  • No real concept of input/output filtering
  • The use of register_globals
  • Weird handling of superglobal values
  • The inclusion of magic_quotes


And, of course, all of these (and more) complete with quotes from the manual at the time talking about reasons behind their use and code where appropriate.


Link: http://phpmanualmasterpieces.tumblr.com/post/65544023819/php-2-0-a-review-in-retrospect

Community News: True North PHP Live Stream & Video-on-Demand Tickets On Sale


If you were wanting to make it to this year's True North PHP conference (next week!) but can't be there in person, they're providing another option - two new kinds of tickets: a video-on-demand option and a live streaming one.



The live stream version gives you access to a live stream of all three tracks as they happen as well as access to the videos after the fact. If you're not able to watch real-time, the video-on-demand option will provide the same access to the videos post-conference to watch at your convenience.



You can pick up these and the regular in-person kinds of tickets from their ticket sales page but hurry - the conference is just a few days away!


Link: http://truenorthphp.ca/tickets.php

Stefan Koopmanschap: How to Get the Most Out of a Conference


Stefan Koopmanschap recently posted a great new article about how you can get the most out of conferences and what they have to offer besides just the sessions.



At the most excellent PHPNW conference, Kat convinced me to deliver the first unconference talk of the day. It took me a while to get the right topic. I ended up with a topic I felt everyone at the conference could use for the rest of the two days that they were there: How to get the most out of a conference. For those that were not there, I want to try and put my unconference talk into a blogpost, so that everyone can use this information for their next conference.


He's broken it down into a few different major topics including the obvious "learn from the best" as well as:



  • Learn and meet the best
  • Find your new colleagues (or new friends)
  • The backchannels
  • Hack away! (at hackathons)


He also makes a great recommendation about providing feedback - not only is it important to the conference to let them know they've done a good job, but also to the speakers to help improve their skills.


Link: http://leftontheweb.com/blog/2013/10/25/How_to_get_the_most_out_of_a_conference/