June 6th, 2010 by Eric
As PHP applications grow into complex object-oriented systems, developers look to create centralized components to execute repetitive tasks. These include logging, emailing, redirects, and more. The Observer pattern is a commonly used design pattern to hook such components into an application during runtime, thereby making them reusable. Since PHP 5.1, there are two interfaces built [...]
May 17th, 2010 by Eric
As web developers we are familiar with the DRY (Don’t Repeat Yourself) principle of programming. Cut & paste is the bane of object-oriented programmers, and we will frequently hear the phrase “Don’t reinvent the wheel”. However, I typically find myself and other colleagues in the world of PHP doing just that. The plethora of actively [...]
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 [...]
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 [...]
August 15th, 2009 by Eric
I have created a new page for featuring little snippets of code that I think others may find useful. Its name, quite uncreative, is “Useful Scripts”.
http://codemill.studio-connect.com/useful-scripts/
The first function posted is for getting the difference between two dates. This function takes two dates that are convertible to Unix timestamps using strtotime(), and will return [...]
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!
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 – [...]