The slides from my "Introduction to PostgreSQL" talk at Confooare now available for view/download
and can found here: http://ilia.ws/files/confoo_pgsql.pdf. Hopefully it will make people more interested in PostgreSQL, which is a great database system and take it into consideration when making their database platform decisions.
For me personally, it was quite interesting, as it is one of the rare chances I get to speak about something that is not directly related to PHP, although I did sneak-in a few...
On the Code2Learn blog there's a recent tutorial about creating PDFs from CodeIgniter using the R&OS PDF class (not bundled with the framework, but easy to integrate).As a programmer I find PDF files very helpful to me when generating reports and getting them printed. We will be using R&OS pdf class. I find this to be the best one because all others libraries I came across didn't offer me a good control over the making of the file and also the process of making i.e the code required for this library is...
On the Refulz blog they've posted the next in their series about access control in CakePHP applications. In this new article they look at Access Request Objects (AROs) and Access Control Objects (ACOs) and how they can be managed via the built-in ACL functionality.Continuing with Access Control Lists, we will read about the two Access Control Lists and their mapping. The Access Request Objects (AROs) are a list of the things that seek permissions and the Access Control Objects (ACOs) are the resources on...
Rafael Dohms has posted a new review of a book that focuses on helping you create better, more readable code - "The Art of Readable Code" (Dustin Boswell, Trevor Foucher, O'Reilly). This is isn't about "pretty code" as much as it is manageable, easy to follow structures and logic flows."The Art of Readable Code" was written by Dustin Bowell and Trevor Foucher and basically focuses on concepts and suggestions to make you code not just readable, but comprehendible by other developers, or as the author's...
To GMT or not to GMT
Wednesday, February 29th 2012, 11:18 EST
A leap day with a post on Date/Time issues seems fitting...
Earlier today, on twitter, @skoop asked: "dear #lazyweb, when I use DateTimeZone('GMT'), why does format('e') output UTC?" What he means is that:
$date = new DateTime('now', new DateTimeZone('GMT'));
echo $date-format(DateTime::RFC2822 . ' e');
Wed, 29 Feb 2012 16:26:23 +0000 UTC
As you can see that has UTC and not GMT as you might expect.
Rob Allen, Zend Framework guru extraordinaire, has posted an introduction to the Dependency Injection container that's a part of Zend Framework 2 - ZendDi.Zend Framework 2 provides its own dependency injection container, ZendDi which is a key underpinning of the entire framework and especially the MVC system. I have covered before, my thoughts on the reasons for using dependency injection, so this article looks at the fundamentals of using ZendDi.He includes some sample code showing a current setup...
Lorna Mitchell has a new post to her blog today showing off a lesser-known but very useful function included in PHP - the iterator_to_array function, used to translate things that implement Traversable into arrays.Someone watching over my shoulder recently had never seen the ubiquitously-useful iterator_to_array() before. [...] Mostly I find this useful when I'm working with collections of data as these often present themselves as an object that you can foreach() over, but you can't dump it directly. If...
PayPal Library for PHP CodeIgniter
A simple memcached class
JSON RPC Client
Data validation class
PDO Database Utils
My DeviantArt API
Colossal Mind Language Detector
Lightweight MVC MySQL SP Class
Someone watching over my shoulder recently had never seen the ubiquitously-useful iterator_to_array() before. I'm sure they weren't alone and since I just typed it again, I thought I'd share a snippet.
Mostly I find this useful when I'm working with collections of data as these often present themselves as an object that you can foreach() over, but you can't dump it directly. If the object in question implements the Traversable interface, you can instead pass it into iterator_to_array to get the data as...
The Voices of the ElePHPant podcast has posted their latest episode - an interview with Luke Stokes, a co-founder of FoxyCart.Cal's "three questions" for Luke were:
Why did you choose PHP to build the Foxycart platform?
What did you learn in the process of becoming PCI certified?
What lessons do you have for people looking to put together a platform and an API?
You can listen to this latest episode either via the in-page player or by downloading the mp3 directly.
On the php|architect site today there's a new article from Luke Stokes asking a question about the future of the web (and web serivces) - is the future in REST or SOAP?I was recently asked why we chose REST over SOAP for our re-write of the FoxyCart.com API, and the short answer that immediately came to mind was, "Because I don't hate myself". To expand on that answer, let me give you a little bit of the back story.He talks about their goals for the product and its API, how they wanted to create...
In this new tutorial on NetTuts.com Phil Sturgeon looks at how to "elevate your PHP" to a cloud-based hosting service, specifically Pagoda Box.This article will walk you through cloud hosting for your PHP application with Pagoda Box. It'll detail how to handle PHP dependencies, get your MySQL databases up and running (and debug locally), and customise various aspects of PHP with ease.He walks you through the entire process you'll need to fire up a (free) application on their service (including a...
On PHPMaster.com today they've posted the second part of their series looking at creating a SOAP web service with NuSOAP. (Part one is here)In this article we'll talk about what WSDL files are and how to use them. I'll show you how to quickly build your WSDL files with NuSOAP and incorporate a WSDL file into the SOAP server and client examples from the first part.He introduces WSDL files, the specially formatted XML definitions that tell SOAP clients what's available on the service and includes some...
In this new post to his blog Kenny Katzgrau has announced the formation of a new PHP-related group in the New York City area, the Pro PHP NYC group.We felt that the other handful of PHP Meetup groups in the area cater to those just starting out more often than not. The engineers who are serious about building professional, enterprise-level applications don't really have a group where they can consistently expect presentations on those topics.The focus of the group is less on the basic "hows" and "whys"...
Stuart Herbert, a big fan of the Sublime Text 2 editor, has put together a post showing you what he thinks is an effected way to set up the editor for PHP development.As the interest seems to be there, I thought it would be a great idea to follow up with a post taking you step by step through how I've set up Sublime Text 2 for PHP development, and showing you some of the useful features that you get out of the box with Sublime Text 2.He's come up with some screencasts of his setup so you can see the...
Latest PECL Releases:
Wow. Last week's opinion piece about switching from Netbeans to Sublime Text 2 has been the most popular blog post I've written for quite a while.
As the interest seems to be there, I thought it would be a great idea to follow up with a post taking you step by step through how I've set up Sublime Text 2 for PHP development, and showing you some of the useful features that you get out of the box with Sublime Text 2.
You'll find the details below, and as a bit of an experiment, I've also put the details...
Hugh Williams has a new post with his recap of the "PHP at Scale" panel from this year's PHP UK Conference.The good news was that Rasmus and Nikolay couldn't see any reasons why PHP was particularly challenging. What we saw were general challenges in scaling applications to large traffic volumes - and that's pretty much where the panel discussion went. Here's a few key points from the discussion.Highlighted points included: removing bottlenecks to help performance (simple in theory, hard in practice),...
In a new post to his site Till Klampaeckel shows how to use PEAR and composer resources (two popular PHP package management tools) from inside of a chef deployment script.This is something experimental I have been working on for our chef deployments. So the objective was/is to find a sane way to install PEAR packages and install dependencies with composer.He shows how to set up the configuration script to discover a new PEAR channel, make the chef script not "fail hard" if a command returns a failed...
On PHPMaster.com there's a recent tutorial introducing the concept of a "domain model" and showing how to create them in PHP (manually, not inside of any ORM or database solution).First off, creating a rich Domain Model, where multiple domain objects with well-defined constraints and rules interact, can be a daunting task. Second, not only is it necessary to define from top to bottom the model itself, but it's also necessary to implement from scratch or reuse a mapping layer in order to move data back...