Design by contract is an important concept for controlling what type of input your methods or functions can receive. One of the most dangerous features of PHP is that functions will still execute even when they are missing required arguments, by emitting a warning instead of an error. In this post, I am [...]
I recently gave a presentation on Lithium PHP for the South Florida PHP Users Group. This was my first talk in this type of setting and the experience of preparing it really gave me the opportunity to improve my understanding of [...]
Note: see comments below for a better solution
I’ve been working on a project that is using the MySql adapter for Lithium and I keep running into roadblocks when it comes to using some MySQL specific features. Unfortunately the adapter for MySQL that comes with Lithium doesn’t quite handle all of the features [...]
Occasionally, you will want to cache entire responses from different areas of your Lithium app. Micheal N already posted a nice tip about response caching by applying a filter to the Dispatcher::run() method, but I wanted to be able to set my cache times differently per route. Now in keeping with the aspect-oriented [...]
Note: This article may not be pushing best practices. Instead of setting view data via an AppController, we can create a helper for any arbitrary data we need. Due to Lithium’s autoloading, this takes care of including our helper as needed and may make a bit more sense than injecting view variables via an AppController.
[...]
One of the core features of the Lithium PHP 5.3 Framework is the innovative filter system. I initially found the concept a bit hard to understand at first, but the idea is that you can modify a filterable method by applying a filter in some other part [...]
My new application written using the Lithium PHP Framework needed to make API calls to Apple’s iTunes service. The web service in question returns JSON which can be parsed and used to build an array or object on our server via php’s native
Lithium Day 2. This time just a simple quick tip about adding different input types using the FormHelper in Lithium. I want to create a button element in my form but there is no native method to do it. The trick is to use FormHelper::field(‘Button Text’, array(‘type’ => ‘button’, ‘label’ => [...]
I’ve finally had a chance to start hacking on the Lithium PHP Framework and I must say it’s really cool. I have been working with CakePHP for a few years and most of the concepts familiar to CakePHP developers will feel natural for those who [...]
For part of a new project at work, I needed to be able to render a progress bar showing progress towards completion of an assignment. I had not yet made a proper jQuery plugin so I though it would be a good idea to release this so others could take advantage of it or possibly contribute back [...]
Projects & Profiles
Tags
ajax async beanstalk beanstalkapp blogging bug tracker bug tracking cakephp cakephp google group clojure closures douglas crockford git github giving a technical presentation handlebars handlebarsjs issue tracker issue tracking javascript jquery json lighthouse lithium lithium filters lithium php memcached mvc mysql mysysgit netbeans nginx node node.js php php-fpm php 5.3 php ide phpunit podcasts scaling subversion svn tickets wordpress
