Wednesday, October 21st, 2009
You’ve written a PHP based web app, and you’ve made sure it doesn’t cause errors if the user submits unexpected values via any URLs or forms. But there’s something you quite likely forgot to test: What if the data that’s expected to be a singular value happens to be ...
Posted in Programming | 11 Comments »
Monday, October 12th, 2009
I was contacted by Packt Publishing to review a new Zend Framework book, Zend Framework 1.8 Web Application Development. I have previously reviewed Object-Oriented JavaScript, also published by Packt, which was a quality title so I’m looking forward to reading this ZF book. The book is written by Keith ...
Posted in Programming | 5 Comments »
Thursday, May 7th, 2009
Zend_Forms, models, validation and how they all work together is a tricky topic. There are many opinions and many ways to do it.
This time I'll show you what I think could be the answer to validating forms without having to duplicate validation code both in a model class and ...
Posted in Programming | 9 Comments »
Thursday, April 9th, 2009
Firstly, apologies for the lack of posts lately. I'm pretty busy with various things right now, so I don't have much time for blogging. Hopefully I'll have some pretty interesting/cool stuff to show you later, though!
Now, here's something interesting I spotted recently: Creating a custom front controller for Zend Framework.
Federico ...
Posted in Programming | 1 Comment »
Sunday, April 5th, 2009
How to use FCKeditor, or any other WYSIWYG editor, with Zend_Form? Another relatively common question.
There are many ways you can do this, but let's look at these two as they are the best in my opinion:
Adding some JavaScript to your view script
Creating a Zend_Form_Decorator
We'll be using FCKeditor, but you can ...
Posted in Programming | 12 Comments »
Monday, March 23rd, 2009
A common reason to use Ajax in a website is to make it feel faster, so you usually want Ajax requests be processed as quickly as possible.
While there are many ways to speed up Zend Framework based applications, there are still some things like routing and dispatching which still add ...
Posted in Programming | 15 Comments »
Monday, March 16th, 2009
In some MVC style frameworks the controller's action methods take parameters in the method signature, ie. someMethod($userId)
Zend Framework controllers do not - in ZF, you access parameters through the request object in the controller itself.
I thought it would be nice to get the parameters you want in the method, ...
Posted in Programming | 4 Comments »
Monday, March 9th, 2009
A relatively common task when working with forms is filling select boxes or checkbox and radiobutton lists from a database.
It's not very tricky to query a database, and fill a Zend_Form element's possible values from the resultset, but it can be quite boring and extraneous code...
We could also create an ...
Posted in Programming | 14 Comments »
Monday, March 2nd, 2009
In Zend Framework based applications, error handling is typically done using the error controller, but there are different ways to send the execution to it - some better than others.
Let's look at some ways to trigger the error controller and how to have it handle different error conditions.
Posted in Programming | 35 Comments »
Wednesday, February 18th, 2009
In this third post of the series, I'll talk about using dynamic ACLs: How to store an ACL in a database, and construct it from there when needed. This post builds on the things introduced in part 1 and part 2.
We will first look at a simple example with users ...
Posted in Programming | 21 Comments »