I'll make this quick, as the keynote of the conference should be starting in about 30 minutes.

Yesterday was day 1 of the PHP Community Conference, and so far it has been a blast. There were four speakers in two time slots, so I had to choose two. I ended up choosing Lorna Mitchell's talk on API design and Helgi (can't spell his last name)'s talk about front end caching. Both were very informative, and mostly confirmed things I was already aware of.

Lorna focused in the very basics of API design. She covered the use of HTTP status codes as the very first indication of a request's result. That was one thing I hadn't thought about using. She also talked about using the HTTP headers sent to determine the content type requested and other information. While this sounds great in practice, I'm not sure about the practicality. For the latest API I've built, Keno To Go, the requests were all coming from Flash or JavaScript. I don't know if JavaScript can specify certain headers like that. Definitely worth looking in to though.

Helgi's talk on front end caching mostly validated many of the things I already knew. Spiriting, combining JavaScript files, combining CSS files, compressing images, etc. One thing that was very interesting was the different methods that can be used to expire cache. Frequently we've had trouble with replacing images that then don't expire client-side immediately, so the client complains. Obviously you can change the filename, but then you have to change all of the references. You can also use query strings with some unique string each time, such as the timestamp, but then you never cache the image. The most interesting method talked about was the use of URL rewriting to make the image path different, without actually changing the file path. I like this idea the best, because you can change the file path in all of the locations you can find, but if you miss one you're still ok.

That sums up day 1. Today there are 8 speakers with an opening and closing keynote. I'm planning on going to the "Original Hypertext Preprocessor", "XHProf and Wonderproxy", "Is It Handmade Code If You Use Power Tools", and "From Earth To Jupiter With NASA" talks today.
AuthorMichael Cantrell