Eliminating repetition and encouraging code reuse are central tenets of software development.
PHP’s lack of multiple inheritance means sometimes there are tough design choices to be made when similar functionality is required in separate branches of the class heirarchy.
As proposed in the Horizontal Reuse for PHP RFC, traits offer a means of duplicating functionality in [...]
Trait-like Functionality for PHP
by Steve on 05. Apr, 2010 in PHP
Super-Skinny your Zend Framework Action Controllers (Part One)
by Steve on 09. Mar, 2010 in PHP, Zend Framework
Inspired by Padraic Brady’s post on Fat Stupid Ugly Controllers and Chris Hartjes’ Fat Models, Skinny Controllers, I’ve been putting my controllers on a crash diet.
Slim controllers are easier to test, encourage the DRY principle and force business logic back into the model layer where it belongs.
In this first article, I’ll be looking at a [...]
Practical Nested Transactions with Zend_Db and MySQL
by Steve on 04. Mar, 2010 in MySQL, PHP, Zend Framework
The need to save dependent or child models appears frequently in object oriented applications. In such cases, it’s usually desirable to group all the save operations for a parent and its children into a single atomic transaction. Many RDBMS brands support transactions, but few can handle these kind of “nested” transactions.
This article discusses how to [...]
Blimey! I’ve got a blog!
by Steve on 04. Mar, 2010 in General
To be honest, I’m a bit ashamed.
I’ve been working with web development and internet marketing for almost half a decade and only now, in 2010 for Christ’s sake, have I got round to starting a blog.
There are plenty of excuses: haven’t had the time, I thought it might be tricky to set up, didn’t need another [...]
About Steve
PHP developer, internet marketeer and owner of Dogfood Media. A Zend Certified Engineer, loves his two dogs and home brewing. Lives by the sea in Kent.
Recent Comments