Pragmatism in the real world

MongoDB on OS X with the stock PHP installation

MongoDB was mentioned a few times at tek and I said that I wanted to have a look at. Travis' article, MongoDB: A first look, came out a few days ago and piqued my interest further. Then Matthew sent me some source code that requires it. The stage was set for getting MongoDB working on my Mac. MongoDB I use homebrew as a package manager for installing open source bits and bobs like couchdb, git,… continue reading.

Tek.X recap

TekX (pronounced Tek-Ten) has finished and we've all gone back to our respective daily lives. I had a blast and learnt a thing or two as well… I've also been a little busy, which is why this post is "late". The week started on Saturday when I flew to Chicago from Manchester. Rather helpfully, tek was held at a hotel close enough to the airport, that the hotel had a free shuttle. As a tip… continue reading.

Meet the TEK·X speakers

I mentioned back in January that I'll be speaking at TEK.X in Chicago next month. Since then I've fleshed out the talks that I'll be giving and think they should be quite interesting. It turns out that Zend_Form is such a large topic that I could probably speak for 3 hours on it! As a result, I've concentrated on providing a overview of the component and how to use it followed by a look at… continue reading.

Using PDT with Zend Framework Projects

I original wrote this as a comment on Victor Nicollet's blog, but I thought I should document it here too so that I can refer other people to the information. These are some tips and tricks when using PDT with Zend Framework that make my life easier: Autocompletion for dynamic properties Zend_Db_Table_Row_Abstract uses __get() and __set() magic in order to map to the underlying database table row in question. This means that you can use… continue reading.

Akrabat_Db_Schema_Manager: Zend Framework database migrations

So, it turns out that I had a need for database migrations within a Zend Framework project that's using Zend_Db_Adapter. Those of you with long memories may remember that I created a proposal along these lines back in 2006. Nearly four years later, I read it again and implemented the core section. One of the comments, by Wil, asked why it's worth bothering with a DDL to create tables, columns, indexes etc. as sooner or… continue reading.

Photos of Seagulls

Today was a good day in photography for me as for the first time in absolutely ages, I took some time out to take photos for the sake of taking the picture. My son was at a birthday party and I had about an hour free, so I went down by the river Severn in Worcester. Worcester has a cathedral and I was lucky enough to have some lowish sun shining on it: I don't… continue reading.

Sending a file to IE using SSL

I keep coming across this one, so I'm noting it here so I can find it again. Internet Explorer doesn't like certain headers related to caching when you send it a file from an SSL site. The Microsoft knowledge base article, Internet Explorer is unable to open Office documents from an SSL Web site explains the problem quite well: When you attempt to open or download a Microsoft Office document (.doc file, .xls file, .ppt… continue reading.

Zend Framework, IIS and 500 errors

One of the dangers of frameworks in general is that you forget that they do lots of handy things for you. Consider Zend Framework's default error controller: public function errorAction() { $errors = $this->_getParam('error_handler'); switch ($errors->type) { case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE: case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER: case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION: // 404 error — controller or action not found $this->getResponse()->setHttpResponseCode(404); $this->view->message = 'Page not found'; break; default: // application error $this->getResponse()->setHttpResponseCode(500); $this->view->message = 'Application error'; break; } // Log exception, if logger… continue reading.

Mobile web monopoly

There's a recent post by Peter-Paul Koch called The iPhone obsession about how Mobile Safari is being treated by web developers as the only web browser to develop for. PPK likens this to how we all used to only develop for IE6. Unfortunately, the article has lots of hyperbole and iPhone hate which significantly detracts from the actual message. The fundamental point is that Mobile Safari is not the only web browser available on phones… continue reading.

Zend Framework Tutorial for ZF 1.10

Zend Framework 1.10, was released a week or so ago. As a result, I have updated my Zend Framework tutorial so that it is completely current. The main change I made was to remove the _init methods in the Bootstrap as they are no longer needed. I also take advantage of the new features of the zf tool to enable layouts and create forms. It's a shame that it gets the class name of the… continue reading.