by Johanna Cherry |
| February 8, 2010
Writing code is easy. Instantiating objects, calling methods, memorising functions (or using the documentation instead); these are all trivial tasks that we have all taken time to study and practise. But engineering software is so much more than coding. As a software engineer you take on several roles throughout the software development life cycle. Let us take a look at some key roles that developers play during the software development life cycle, some problems you can run into, and how to solve them.
(more…)
by Cal Evans |
| February 2, 2010
Speaker: Sebastian Bergmann
In this presentation we introduce a new language construct to demonstrate how one might go about modifying the PHP interpreter. The internals of which follow a pattern common to many language implementations, with lexical analysis, parsing, code generation, and execution phases.
By the end of the presentation, it is hoped the audience will see that contributing to the PHP language core is not necessarily as difficult as it might seem.
by Cal Evans |
| February 2, 2010
Speaker: Michael Wittke
Michael Wittke received the Dipl.-Ing. degree in electrical engineering and the M.Sc. degree in computer science from the Technical University of Brunswick, Brunswick, Germany, in 2006 and 2007, respectively, and is currently pursuing the Ph.D. degree in electrical engineering from the Institute of Systems Engineering at the Leibniz Universität Hannover, Hannover, Germany. While studying computer science, he spent a semester at the Polytecnica de Valencia, Spain, where he specialized in computer architecture. His research interests lie in mobile Internet devices with built-in CMOS sensors that are able to form ad-hoc smart camera networks.
by Lorna Mitchell |
| January 28, 2010
With the growing use of continuous integration and static analysis tools hooked into those processes, there is a particular analysis tool that is very useful but rarely mentioned: phploc, the PHP Lines of Code tool. This has been a feature of PHPUnit for some time but has been released as a separate project in the phpunit pear channel. The nature of PHPUnit means that many of these statistics can be collected while the tests are running, which is why it was added to that tool in the first instance.
(more…)
by michael |
| January 26, 2010
Here are some little tricks that might be useful to you if you’re working with dates and times in PHP:
- A "Unix timestamp" or "epoch" refers to the number of seconds since 1970-01-01 00:00:00 UTC. (i.e. a point in time in one specific timezone.) A Unix timestamp is never timezone-specific; if you call
time() at the same moment on computers in different time zones, you get exactly the same value back.
mktime/gmmktime – Passed a number of arguments (day, month, year, etc.), returns a Unix timestamp. mktime interprets its arguments as representing a local time, whilst gmmktime interprets its arguments as a time in the time zone UTC. (That is, given the same input gmmktime returns the same results everywhere; mktime returns timezone-specific results.) Note that in this case, the gm- prefix affects how the input is interpreted.
strftime/gmstrftime – Passed a Unix timestamp and format string, and returns a string. In strftime's case, the string is the time according to the current timezone, whilst gmstrftime returns the time in the UTC timezone. (Given the same input, gmstrftime returns the same time in all timezones (though not necessarily the same string–the actual string may be different if the locale is different) whilst strftime returns timezone-specific results.) Note that in this case, the gm- prefix affects the output string.
strptime – Inverse of strftime/gmstrftime: passed a time string and a format string, and returns an array representing the local time. (This not a great return value; it would have been better to return a Unix timestamp.) The time string is interpreted as a local time; there is no gm- equivalent, or even any way to simulate one, since it ignores the value of date_default_timezone_set. Note that you can impose a timezone on the input string if it contains a timezone abbreviation or offset (e.g. Sun 26 Apr 2009 21:50:35 BST) which the format string reads with %z or %Z.
date/gmdate – Passed a Unix timestamp and a format string, returns a string. As with strftime/gmstrftime, the gm- prefix affects whether the result is a representation of the time in the current timezone or in the UTC timezone. Note that the format string is completely different to that of strftime/gmstrftime! (One reason to use this set of functions is for the useful date format constants.) There is no inverse of this function.
strtotime – Passed a string in "US English date format", and returns a Unix timestamp. Note that there is no way to override the US date format! strtotime ("03/04/2008") is the 4th of March 2008. Note that this function will parse relative times, like tomorrow and next monday; this is about the only reason to use it.
- How does PHP know what your current timezone is? It tries a few different places, including the
TZ environment variable and the date.timezone ini option. (See date_default_timezone_get for more information.)
by Cal Evans |
| January 20, 2010
Speaker: Rob Allen
More, now than ever, websites need fast response times and be able to cope under load. As web pages contain more and more dynamically generated content, the challenge is on for PHP developers to develop efficient caching solutions. This presentation will focus on using caching techniques that can be used in a PHP project to increase the performance of a web site. We will look at a variety of caching techniques, showing practical implementations and before and after statistics. We will also cover the cache storage options available and when you might use one over another. We will also address how to get browsers to cache content for us using HTTP headers.
by Peter Verhage |
| January 11, 2010
Creating an ORM for PHP is not an everyday task but writing one is a good way to improve your PHP skills, especially if you use some of the additional features PHP 5.3 adds to the language. There are many excellent ORMs (Object Relational Mappings) already in existence and for a real-world project it would probably better to use one of these, but this tutorial uses the task of creating an ORM as a way to take a look at applications for some PHP 5.3 features.
(more…)
by Cal Evans |
| January 5, 2010
Speaker: Jan Lehnardt
Learn how to use CouchDB replication for load-balancing, fault tolerance, offline work and backup. We are showing how to set up each and what you need to look out for.
Finally, this talk is sprinkled with neat tricks and best practices for deploying CouchDB. Which load balancers are people using, how to make the best use of caching, etc.
by Cal Evans |
| December 21, 2009
Speaker: Maarten Balliauw & Kevin Dockx
This session covers the basics of Microsoft Silverlight and demonstrates how PHP developers can benefit from developing rich client-side components that run in the web browser using Silverlight and PHP.
by michael |
| December 16, 2009
If you want to transform XML from one format to another, and especially if either the input or output XML is complicated or the transformation itself is difficult or awkward to express, then XSL may be a good choice. XSL is the eXtensible Stylesheet Language; a family of three W3C recommendations to do with the transformation and presentation of XML documents. This article will walk through some examples of how XSL and PHP can be used to achieve these types of XML tranformations.
(more…)
by Cal Evans |
| December 9, 2009
Speaker: Jonathan Lawrence
In today’s dynamic Web environment, developers want to build Web applications quickly, re-use and combine them simply, and adopt an agile approach to development.
IBM’s WebSphere sMash (aka Project Zero) is a complete platform for developing, assembling and executing agile Web 2.0 applications. In this talk I’ll demonstrate how PHP developers can use WebSphere sMash, with its focus on speed, simplicity and agility, to develop and deploy leading edge Web 2.0 applications.
by Lorenzo Alberton |
| December 1, 2009
If there’s something we developers are really bad at, it’s guessing. We think we know which parts of our application are slow, and spend a lot of time optimising those, but in reality the bottlenecks are often somewhere else. The only sane thing to do is measuring, with the help of some profiling tools.
There are a few profilers available for PHP, the most commonly used being Xdebug, which combined with KCacheGrind/WinCacheGrind/MacCallGrind can show the function call graph and the time spent in each function.
In this article, we’re going to try another profiler, XHProf, developed at Facebook and open sourced in March 2009 (under the Apache 2.0 license). XHProf is a function-level hierarchical profiler, with a PHP extension (written in C) to collect the raw data, and a few PHP scripts for the reporting/UI layer.
(more…)