Long ago when I started playing with Symfony I fell in love the with the toolbar that shows up when you’re running your app in the “dev” environment. The toolbar allows you to see what’s going on and debug many problems.
iContact Labs recently decided to try and bring the toolbar into our home-grown framework and codebase so our developers could get similar feedback. Luckily, we found out someone had done most of the work for us! Some smart folks have extracted and older version of the Symfony toolbar and packaged it for inclusion in your project — called PHP Debug.
If you’re starting your own project, I’d recommend using Symfony or another framework that has a drop-in toolbar available. There’s a toolbar plugin for Zend Framework called ZFDebug.
We integrated the toolbar into our existing code for profiling database connections and doing logging (using Log4PHP).
The information in the toolbar allows the developer to have data right at their fingertips for understanding both the baseline, and changed state for any page they’re working on or any new page they’re creating. Having logging information at their fingertips also improves the quality of that information.
We’re starting to look at the data shown by the toolbar every time we commit new code. For example:
- How long does the page take to generate?
- How much memory does it consume?
- Are the log messages useful?
- How does the page perform on different sized data sets?
- How does the page load the second, third… time. Does it use caching effectively?
Having this information right at our fingertips will be pivotal to continuing to improve the performance, quality, and scalability of everything we write.