Archive for July, 2008

Setting up command-line PHP on Windows

Monday, July 28th, 2008

On *nix systems you usually have the php executable available in shell, so you can run command-line scripts like unit tests and such, but on Windows this isn't usually the case. Let's fix that! There's two ways to do this: Temporary and permanent

Opera UserJS competition

Saturday, July 26th, 2008

Opera recently held a UserJS competition, where I participated with a script that makes Google Spreadsheets work in Opera, a script which improves Apache directory listings and a social bookmarking site toolbar. Opera chose my Google Spreadsheets script as the winner of Site Fixes category, and I will be receiving a ...

On template “tag soup”

Tuesday, July 22nd, 2008

Jeff Atwood's latest post (at the time of writing this) talks about mixing HTML markup and server-side code, àla He also throws in the question: Is there a better way? - However, it seems there's at least as many ideas of a ...

Is Smarty really obsolete?

Saturday, July 19th, 2008

There was a short discussion on Zend Framework general mailing list about Smarty being obsolete. I decided to take my opinion here, since the discussion was getting quite off-topic... Arguments against Smarty presented were mainly the facts that it is PHP4 and its no longer necessary in "modern" web development.

How to make back, forward and reload work in Ajax-based apps

Wednesday, July 16th, 2008

With Ajax apps getting more and more popular, there's often the question of the browsers own controls working or not in the app in question. If you hit reload, you might end up back on the start page of the application, if you hit back.. who knows. I think this is ...

Does Google test with just IE and Firefox?

Monday, July 14th, 2008

Ever tried using Google Spreadsheets with something else than IE or Firefox? Yeah, it doesn't work very well... Docs used to be the same, but at least something is getting better... However, the issue in Spreadsheets that stops it from working in Opera 9.5 is ridiculously simple! The JavaScript function which ...

Automating creation and caching of image thumbnails

Tuesday, July 8th, 2008

The other day I needed to create some thumbnail images. You know, the usual stuff: Admin uploads image, needs it resized to a smaller one for preview or such... I thought, why bother with writing code manually in the admin to create the thumbnail? I mean, the requirements for its size ...

Making working with DB records easier with a controller helper

Saturday, July 5th, 2008

The other day I noticed a pattern that repeats quite much in my code: Take a parameter from the request, such as id Query the DB for a record that matches the param Redirect or throw a 404 exception if record was not found Why do all this, when it could be simply a ...

Ideas for testing Zend Framework apps

Thursday, July 3rd, 2008

Here are some ideas I was thinking of for making testing Zend Framework (and Doctrine) based apps nice and easy.