LogoPhly, boy, phly
the weblog and site of Matthew Weier O'Phinney

Tuesday, August 17. 2010

Autoloading Benchmarks

During the past week, I've been looking at different strategies for autoloading in Zend Framework. I've suspected for some time that our class loading strategy might be one source of performance degradation, and wanted to research some different approaches, and compare performance.

In this post, I'll outline the approaches I've tried, the benchmarking stategy I applied, and the results of benchmarking each approach.


Continue reading "Autoloading Benchmarks"

Posted by Matthew Weier O'Phinney in PHP at 09:30 | Comments (39) | Trackbacks (0)
Defined tags for this entry: best practices, pear, php, zend framework

Monday, August 16. 2010

Applying FilterIterator to Directory Iteration

I'm currently doing research and prototyping for autoloading alternatives in Zend Framework 2.0. One approach I'm looking at involves creating explicit class/file maps; these tend to be much faster than using the include_path, but do require some additional setup.

My algorithm for generating the maps was absurdly simple:

  • Scan the filesystem for PHP files
  • If the file does not contain an interface, class, or abstract class, skip it.
  • If it does, get its declared namespace and classname

The question was what implementation approach to use.

I'm well aware of RecursiveDirectoryIterator, and planned to use that. However, I also had heard of FilterIterator, and wondered if I could tie that in somehow. In the end, I could, but the solution was non-obvious.


Continue reading "Applying FilterIterator to Directory Iteration"

Posted by Matthew Weier O'Phinney in PHP at 10:30 | Comments (13) | Trackbacks (0)
Defined tags for this entry: php, spl

Monday, August 9. 2010

Running mod_php and FastCGI side-by-side

Because we're in full throes of Zend Framework 2.0 development, I find myself with a variety of PHP binaries floating around my system from both the PHP 5.2 and 5.3 release series. We're at a point now where I'm wanting to test migrating applications from ZF 1.X to 2.0 to se see what works and what doesn't. But that means I need more than one PHP binary enabled on my server...

I use Zend Server on my development box; it's easy to install, and uses my native Ubuntu update manager to get updates. On Ubuntu, it installs the Debian Apache2 packages, so I get the added bonus of familiarity with the configuration structure.

I installed Zend Server some time ago, so I'm still on a PHP 5.2 mod_php binary. I have several PHP 5.3 binaries compiled and installed locally for running unit tests and sample scripts already -- so the question was how to keep my 5.2 mod_php running while simultaneously allowing the ability to run selected vhosts in 5.3?

The answer can be summed up in one acronym: FastCGI.


Continue reading "Running mod_php and FastCGI side-by-side"

Posted by Matthew Weier O'Phinney in PHP at 10:45 | Comments (10) | Trackbacks (0)
Defined tags for this entry: apache, fastcgi, php

Thursday, July 1. 2010

Creating Zend_Tool Providers

When I was at Symfony Live this past February, I assisted Stefan Koopmanschap in a full-day workshop on integrating Zend Framework in Symfony applications. During that workshop, Stefan demonstrated creating Symfony "tasks". These are classes that tie in to the Symfony command-line tooling -- basically allowing you to tie in to the CLI tool in order to create cronjobs, migration scripts, etc.

Of course, Zend Framework has an analogue to Symfony tasks in the Zend_Tool component's "providers". In this post, I'll demonstrate how you can create a simple provider that will return the most recent entry from an RSS or Atom feed.


Continue reading "Creating Zend_Tool Providers"

Posted by Matthew Weier O'Phinney in PHP at 09:05 | Comments (7) | Trackbacks (0)
Defined tags for this entry: php, zend framework

Friday, June 4. 2010

State of Zend Framework 2.0

The past few months have kept myself and my team quite busy, as we've turned our attentions from maintenance of the Zend Framework 1.X series to Zend Framework 2.0. I've been fielding questions regularly about ZF2 lately, and felt it was time to talk about the roadmap for ZF2, what we've done so far, and how the community can help.


Continue reading "State of Zend Framework 2.0"

Posted by Matthew Weier O'Phinney in PHP at 10:00 | Comments (26) | Trackback (1)
Defined tags for this entry: git, php, zend framework

Thursday, May 6. 2010

Writing Gearman Workers in PHP

I've been hearing about and reading about Gearman for a couple years now, but, due to the nature of my work, it's never really been something I needed to investigate; when you're writing backend code, scalability is something you leave to the end-users, right?

Wrong! But perhaps an explanation is in order.


Continue reading "Writing Gearman Workers in PHP"

Posted by Matthew Weier O'Phinney in PHP at 09:00 | Comments (10) | Trackbacks (0)
Defined tags for this entry: gearman, php, zend framework

Monday, April 19. 2010

PHP Invades Amsterdam; or, the Dutch PHP Conference

For the third year running, I'm pleased to be speaking at the Dutch PHP Conference, held again in Amsterdam this coming 10-12 of June.


Continue reading "PHP Invades Amsterdam; or, the Dutch PHP Conference"

Posted by Matthew Weier O'Phinney in PHP at 23:58 | Comments (2) | Trackbacks (0)
Defined tags for this entry: conferences, dpc10, php, zend framework

Wednesday, April 7. 2010

Please Join Me At TEK-X

I'll be speaking this year at TEK-X, this year's incarnation of the php|tek conference, in Chicago in May.


Continue reading "Please Join Me At TEK-X"

Posted by Matthew Weier O'Phinney in PHP at 09:48 | Comments (2) | Trackbacks (0)
Defined tags for this entry: conferences, php, tekx

Tuesday, April 6. 2010

A Primer for PHP 5.3's New Language Features

For the past month, I've been immersed in PHP 5.3 as I and my team have started work on Zend Framework 2.0. PHP 5.3 offers a slew of new language features, many of which were developed to assist framework and library developers. Most of the time, these features are straight-forward, and you can simply use them; in other cases, however, we've run into behaviors that were unexpected. This post will detail several of these, so you either don't run into the same issues -- or can capitalize on some of our discoveries.


Continue reading "A Primer for PHP 5.3's New Language Features"

Posted by Matthew Weier O'Phinney in PHP at 11:10 | Comments (31) | Trackbacks (0)
Defined tags for this entry: oop, php, zend framework

Wednesday, March 24. 2010

GPG-signing Git Commits

We're working on migrating Zend Framework to Git. One issue we're trying to deal with is enforcing that commits come from CLA signees.

One possibility presented to us was the possibility of utilizing GPG signing of commit messages. Unfortunately, I was able to find little to no information on the 'net about how this might be done, so I started to experiment with some solutions.

The approach I chose utilizes git hooks, specifically the commit-msg hook client-side, and the pre-receive hook server-side.


Continue reading "GPG-signing Git Commits"

Posted by Matthew Weier O'Phinney in Linux, PHP at 12:26 | Comments (15) | Trackbacks (0)
Defined tags for this entry: git, linux, php
(Page 1 of 24, totaling 232 entries) » next page
  • Home
  • Resume
  • Blog
  • Phly PEAR Channel
  • Twitter
  • Contact Me
  • About this site

ZCE

Zend Education Advisory Board Member

Add to Technorati Favorites

Calendar

Back September '10
Mon Tue Wed Thu Fri Sat Sun
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      

Quicksearch

Links

  • PHLY - PHp LibrarY
  • Planet PHP
  • Zend Framework, where I'm project lead
  • Sebastian Bergmann
  • Cal Evans
  • Shahar Evron
  • Paul M. Jones
  • Bill Karwin
  • Mike Naberezny
  • Fabien Potencier
  • Ben Ramsey
  • Derick Rethans
  • Ralph Schindler
  • Marco Tabini

Archives

September 2010
August 2010
July 2010
Recent...
Older...

Categories

XML Linux
XML Personal
XML Aikido
XML Family
XML Programming
XML Dojo
XML Perl
XML PHP

All categories

Syndicate This Blog

XML RSS 0.91 feed
XML RSS 1.0 feed
XML RSS 2.0 feed
ATOM/XML ATOM 0.3 feed
ATOM/XML ATOM 1.0 feed
XML RSS 2.0 Comments

Show tagged entries

xml apache
xml best practices
xml books
xml conferences
xml cw09
xml decorators
xml dojo
xml dpc08
xml file_fortune
xml git
xml linux
xml mvc
xml oop
xml pear
xml perl
xml personal
xml php
xml phpworks08
xml programming
xml rest
xml ubuntu
xml vim
xml webinar
xml zendcon
xml zendcon08
xml zendcon09
xml zend framework
© 2004 - present, Matthew Weier O'Phinney
matthew-web <at> weierophinney.net