Archive > February 2007

PHP 6 and Request Decoding

21 February 2007 » In PHP » 4 Comments

It looks like we have finally settled on an approach for HTTP input (request) decoding in PHP 6. There have been no fewer than 4 different proposals floated before, but this one combines flexibility, performance, intuitiveness, and minimal architectural changes, and has only a couple of small drawbacks. Let’s take a closer look.
As you probably know, correctly determining the encoding of HTTP requests is somewhat of an unsolved problem. I know of no mainstream clients that send the charset specification along with the request. This means that it is up to the server or the application to figure out the encoding, which can be done in a number of ways, including encoding detection, looking at Accept-Charset header, parsing request to see if _charset_ field is passed, and more. Unfortunately, none of them are completely reliable and the best you can do is guess the encoding with some degree of confidence.
Continue reading “PHP 6 and Request Decoding” »

99 Frameworks of Code Out There

16 February 2007 » In PHP, Rants » 34 Comments

People, enough with new frameworks already. I know you might be lusting after Rails for some reason and want to have the fame, the glory, and the dancing girls of DHH, but are we not going to be satisifed until Sourceforge is filled with the object-oriented diarrheal remains of our overblown egos and delusions of grandeur? I counted no less than 3 separate announcements about new PHP frameworks today, just by scanning the front pages of phpdeveloper.org and planet-php.net. As well intentioned and technically robust as these efforts might be, do we really need yet another patterns-based abstracted MVC-driven buzzwords-filled concoction? Look at the list of existing PHP frameworks, are they really all that different? Why start another one? Why? How long are we going to be suffering from the NIH syndrome? Oh, the humanity…
If you have an itch that only frameworks can scratch, then my advice, should you choose to take it, is to find an existing mature framework that gets as close as possible to your requirements and work on it. Add features, fix bugs, write documentation, promote, contribute, and improve in general, but resist the urge to spew out a torrent of code into our environment simply because you thought of an oh-so-clever moniker and need to stick it onto something. Please, no more new frameworks.

"VIM for (PHP) Programmers" slides and resources

16 February 2007 » In Talks » 13 Comments

By popular demand, I have uploaded the slides and the VIM script files from my VIM for (PHP) Programmers talk in Vancouver. You can find them on the Talks page.
This was the inaugural presentation of the talk, so I beg forgiveness for the rough edges and any inadvertent mistakes (of which there should be none, I hope).
It was nice to see that the talk was well attended and received. With any luck, it might become a semi-regular one on the PHP conference circuit. Happy VIM’ing.

Unicode slides from Vancouver PHP Conf

15 February 2007 » In PHP, Talks » 1 Comment

The slides from my Unicoding with PHP 6 talk are now available on the Talks page. VIM slides and resources will be coming up shortly.
I want to thank Shane Caraveo, Audrey Foo, Peter, and the rest of the organizers for the excellent, well-run conference. I really enjoyed the variety and quality of the talks.