My thoughts on his thoughts on PHP

June 16th, 2008

On the Zend Framework mailing list Jurriën Stutterheim asked for thoughts on his blog post PHP… what to say?. I started replying to the list but found I’d written so much that it was better to clutter up my own space than a public one.

“Zend Framework already has a set of conventions. In my opinion it’s a good thing to improve these conventions even further and make them apply not only for Zend Framework, but for PHP as a whole.”

I suspect that Zend Framework will introduce an interesting dilemma for Zend and PHP where by improving more users experience and understanding of so called advanced programming concepts like OOP, design patterns, etc, they will also increase their expectations of the underlying language.

What onus that puts on the development of PHP itself is really the question. It may be a positive one, with PHP developers and those from other frameworks/languages able to move between their framework and Zend Framework more comfortably. The negative may be that Zend Framework is working on a layer above PHP to the extent that it begins to feel like a language within a language (something that Lukas Smith has been referring to in his Kiss my … post) and the nagging question then creeps in as to how much we are duplicating the functionality of a web development focussed language in a web development focussed framework? I’ve already started kicking myself for getting a bit carried away and unnecessarily using Zend Framework components when the same can be achieved with PHP.

An even bigger question that I’m dealing with right now is what to train new programmers in? The argument is almost endless, but the answer is rarely PHP for any other reason than ease of entry. If developers are going to be working at the higher level that Zend Framework has moved development to, then the question is why start new programmers with a programming language that is rarely recommended as being at that level?

Zend Framework is actually a good way to get someone into PHP and also make sure they keep away from so many of the bad habits that have plagued PHP development. But that is partly a case of keeping them away from PHP itself. Wouldn’t they then be better learning a language that is often used to teach programming, like Python, and once they’ve developed good habits introduce them to a framework for development? In other words I would prefer to have someone learn PHP via Zend Framework whereas with Python I’d be content to have someone learn Python and then a framework.

The question I know that only time will answer is what the cross-pollination will be between Zend Framework and PHP. Targetting that at the core developers I’m interested to know what future plans there are for removing and/or adapting Zend Framework features that become native to PHP itself and/or become more widely hosted such as 5.3′s namespaces against Zend Framework’s pseudo-namespaces.

Of course I’m not naive enough to think that Zend hasn’t thought about any of this, but then I’m not looking at it from that high up. From my perspective the disciplines that Zend Framework introduce actually open possibilities that are as lateral as they are upwardly PHP. Once you climb the Zend Framework mountain you begin to see it has neighbouring mountains that it has a lot in common with and that’s actually a good thing.

Zend Framework in Action in the Works

September 17th, 2007

Zend Framework in Action cover Since Rob has beaten me to the punch, the only thing left for me to do is put up a pretty picture of the cover so you can see what has occupied the time I may or may not have put into this blog!

The story is that the book that we are co-authoring on the Zend Framework has now been released through Manning’s early access program. This means you can read it as we’re writing it, basically.

It’s certainly hard work, in particular trying to find the time alongside the “day job”, but nonetheless rewarding and I do have to say thanks to Rob for asking me to be part of the process. When he originally asked I was quite taken aback in a “why me?!” way.

Anyway, I’ll chat more about it now that it’s more official and if you’re interested please feel free to let us know any thoughts/comments/ideas through either of our blogs or the author’s forum. The point of this early access program is to get as much feedback as possible and therefore improve the quality of the final publication.

Zend Framework article on Zend Developer Zone

July 25th, 2007

I know my blog is watched mainly for its Zend Framework content so I should mention that I have an article up on Zend Developer Zone entitled Zend Framework and the New Hybrid Designer.

It will likely be preaching to the converted for many of you but having had the odd “why use Zend Framework” discussion I felt it would be good to write it down in some form. Feel free to brutalise it as you see fit!

Zend_Acl and Zend_Auth Example

February 8th, 2007

Simon Mundy has written up a well-worth-reading Zend_Acl / Zend_Auth example scenario in which he illustrates setting up authorisation and access privileges with the Zend Framework.

Feedburning Feeds

November 28th, 2006

Just a quick note to mention that I’m testing passing the feeds from this site through FeedBurner, partly to get an idea of how the feed is being used and partly because it’s my job to know about all these internet technology thingies.

Anyway, if anyone has any issues with the feed please let me know.

Using Netinfo Manager to add hosts

November 23rd, 2006

As an addition to my Networked Virtual Hosting Party on Mac OS X article, comments in the How To Setup Development Domains On OS X article on The Apple Blog pointed to something I’d not tried before; using NetInfo Manager to add hosts to local hosts file.

An official Apple article; How to Add Hosts to Local Hosts File clearly outlines the steps. It’s a little confusing as the instructions for Mac OS X 10.2 or later are to edit the /private/etc/hosts file (the same file as /etc/hosts) directly. However, I just tried using NetInfo Manager to add a host on one of the machines on our network and it worked fine despite it running OS X 10.4.8.

A minor detail to mention is I that the niload command was more like this for me:

sudo niload hosts . < /etc/hosts

Really there is not a huge difference between editing the /etc/hosts file directly or using NetInfo Manager and I’m not convinced the latter really makes it that much easier. Either way, it’s useful to know about alternatives.