October 18th, 2009 by Eric
Have you ever wanted to set up an application that displays tabular data, and wanted to use the same view for each query? While PHP is excellent for writing small-footprint queries, its ability to be embedded in HTML leaves the creativity to the programmer to figure out a consistent display solution for tabular data.
We need two things – first, we need a way to dynamically retrieve table information, query information, and query results. Second, we need a way to dynamically build the display based on the information we have. Using the metadata methods of PDO, along with PEAR::HTML_Table_Matrix, we can do just this. Continue reading ‘Flexible Data Display with PDO and HTML_Table_Matrix’
September 15th, 2009 by Eric
Today I encountered a problem that many developers will likely face while building a web application with Ajax, so I wanted to share my experience with it.
The Problem:
You create a web site with the goal of consuming content from the web. This may be in the form of a geocoding service, or perhaps a lightbox service for browsing images. You need to load an external resource though Ajax. The XMLHttpRequest object cannot make a connection, and you receive a javascript error, or a blank page. Continue reading ‘Writing a Cross-Domain Proxy in PHP’
July 10th, 2009 by Eric
I wanted to write a quick post about a library one of my co-workers stumbled upon this week. It is called php.js and is a compilation of php functions ported to javascript. That sounds pretty convenient!
Continue reading ‘PHP and Javascript Combine with PHP.JS’
May 29th, 2009 by Eric
Tonight I started working on a set of classes that will build forms for Propel objects. While Propel already has implementations of PatForms and HTML_QuickForm, they are both not up-to-date in svn. They both also require Creole for gathering metadata, and I am not at all interested in integrating another library into this project – especially one labeled “dead” on its own site.
Continue reading ‘Working on a Propel Form Builder…’
May 26th, 2009 by Eric
Recently when browsing past issues of php|architect magazine, I came across mention of a Firefox add-on called FirePHP. For those who have not heard of it, FirePHP is both a Firefox add-on and a PHP library used to send messages to the Firebug console.
Continue reading ‘Quick PHP Debugging with FirePHP’
March 14th, 2009 by Eric
As I posted in a previous blog, the Gentle Beginnings site that I left over a half a year ago was 90% done, but was missing one core feature – the ability to post and read birthing stories. Recently I revisited this site to add the birthing story component, and learned a couple of hard lessons about Joomla! application development. Hopefully by posting this I can shed some light on the less documented portions of Joomla!, and perhaps save someone else precious time. Continue reading ‘Joomla! Applications: The Basics’
March 2nd, 2009 by Eric
When developing a web application using PHP, it is important to follow best practices for optimizing memory usage, database access, and file sizes. All these thing taken into account for, you will likely still find parts of an application to be bulky, or you may find repeated data calls an unnecessary overhead. When you need it, you should use Cache_Lite. Continue reading ‘Application Caching with Cache_Lite’