Liip @ JSDay/PHPDay in Verona, Italy
CachingFor me PHPDay started with a workshop about caching by Fabien Potencier, starting off with the question about who in the room has already read the HTTP specification. We learned a lot about the different caching headers and what impact they have in what server setup. After the theory we played around with the different headers with a small silex app. Find more details about that workshop in the blog post by Patrick Zahnd.
RESTful web servicesAnother very interesting talk was given by David ZAlke, chief developer of the Agavi framework, about how to define RESTful web services. With real world examples of badly designed APIs (e.g. the twitter API) and explaining how it could be done better he explained very well what is important when designing RESTful web services. Find more details about that talk in the blog post by Patrick Zahnd.
Profiling your PHP applicationLorenzo Alberton suggested in this talk some tools that can be used to profile your PHP application, mainly xhprof that was developed by facebook. He also explained how to interpret the results of such a profiler and where to start looking for possible problems. Some examples: - if a website accesses the database, these calls should usually be at the top when sorting the profiler data by CPU usage - when sorting the results by number of function calls find out if that function really needs to be called that often or is the call maybe in the wrong place, e.g. inside a loop where it could also be outside He also gave some hints on how to optimize some things on system level, for example: - if you don't use htaccess files turn it off in your server config, otherwise the server searches for those files needlessly - always put a favicon.ico into your project so there is no error and the 404 error handler is not triggered in the case where you use a framework Find more interesting optimizations here. Oh, and by the
Truncated by Planet PHP, read more at the original (another 1226 bytes)