Brian Swan's Blog
-
This Week’s Link List (May 20, 2011)
Working on posts for next week didn’t prevent me from doing my weekly reading. Lot’s of interesting news related to Microsoft interoperability with open source technologies, as well as good stuff from this week’s TechEd conference in Atlanta…
-
This Week’s Link List (May 13th, 2011)
I happen to think that Friday the 13th is a lucky day (note that I’m knocking on wood as I write that). In any case, once again, lots of good reading this week. Actually, this list is made up of links I’ve collected over the past two weeks (since I didn’t publish a Link List last week). Enjoy…
-
Book Review: Easy PHP Websites with the Zend Framework
Several weeks ago (more than I’m willing to admit) Jason Gilmore asked approached me on Twitter and asked me if I’d be interested in reviewing his latest book, Easy PHP Websites with the Zend Framework. I was familiar with Jason’s publications on the PHPBuilder site and I had been itching to dive into the Zend Framework, so I jumped at the opportunity. It has taken me a while to get around to reviewing it, but I’m glad I did. Jason’s writing style makes challenging concepts easy to learn and his focus on good development practices are sure to inspire you to become a better developer. Here’s more detail on what I thought after reading the book…
-
Using PDO::quote with Parameterized Queries
I spent some time last week investigating a puzzling issue raised in the SQL Server Driver for PHP forums: Need help with PDO::quote() and PDOStatement::bindValue and PDO::execute using new SQLSRVR 2.0 driver. At the heart of the issue was this question: Should you use the PDO::quote method to quote a parameter if you are also using the PDOStatement::bindValue or the PDOStatement::bindParam method to bind the parameter? My answer is no, you shouldn’t. I’ll explain why not, but I wonder if I’m potentially missing some use cases where it does make sense…I’d be very interested to learn those cases if I am.
-
This Week’s Link List (April 29, 2011)
I’m partial to writing, so one of the highlights in this week’s list is the podcast Elizabeth Naramore’s 2010 DPC presentation on technical writing. Other highlights are Andrew Burst’s look at NoSQL and the Azure platform and my discovery of chat rooms on Stackoverflow. Lots more good stuff too…happy reading…
-
Sorting Azure Table Entities by Timestamp with PHP
This is a short post that describes one way to sort Windows Azure Table entities by timestamp when using the Windows Azure SDK for PHP. The problem boils down to sorting an array of objects by a timestamp property, so the information here is nothing that hasn’t been done before. However, after spending some time looking for a way to use a filter in the Windows Azure SDK for PHP API, I didn’t find one, so I’m hoping this post might save others some time. In the end, my solution simply uses the PHP array_multisort function.
-
This Week’s Link List (April 22, 2011)
There was a lot of good content this week. Highlights for me included the release of the Windows Azure SDK for PHP v3 (beta), some excellent interviews, and Chris Cornutt’s insight into the work he puts into PHPDeveloper.org…
-
How to Use the Storage Emulator with the Windows Azure SDK for PHP
This is a short post to address this question: How do I use the local Storage Emulator (formerly known as Development Storage) when using the Windows Azure SDK for PHP? The Windows Azure Command Line Tools for PHP provide an option for running an application locally in the Compute Emulator, but I didn’t see an option for using the local Storage Emulator. As it turns out, the answer is very simple, although somewhat difficult to find…
-
This Week’s Link List (April 15th, 2011)
Lot’s of news coming out of MIX11 in Las Vegas this week, some interesting discussion of the state of PHP development, and don’t miss the the latest build of WinCache that fixes WordPress plug-in bug…
-
Updating PHP Settings in Windows Azure
I came across this question on Twitter last week: “How can I turn display_errors on for an application that is running in Windows Azure?” I have to admit that I was stumped. The only thing I could think of was to re-deploy the application with an updated php.ini file. But, I happened to mention this question to Ben Lobaugh who suggested a very simple idea: Store your PHP settings in some durable store external to your application as key-value pairs, then loop through the settings and update them with the ini_set function when a page loads. An example will help make this clear, but first, a couple of caveats: