Well, “this article”:http://www.phpbuilder.com/columns/bosanac20030225.php3?page=2&print_mode=1 at PHPBuilder.com is the first one ever to make me think _”Hmm, maybe iterators could be useful”_.
Following on from “Harry’s comments”:http://peter.mapledesign.co.uk/weblog/archives/using_classes_in_php.html#comments I’ve started to think about the design of the system I’m going to use for my RSS aggregator more. Originally I thought what he’d written in the comments was over-engineered, over-designed, put-in-an-object-cause-its-trendy. But now I’m not so sure. I’ve gone back to reading Bertrand Meyer’s book “Object Oriented Software Construction”:http://www.amazon.com/exec/obidos/tg/detail/-/0136291554/peterswebpage04 (available cheaply in the *UK* from “Computer Manuals”:http://www.compman.co.uk/cgi-win/browse.exe?ref=278755) now to learn how to design OO systems - something I’ve been meaning to read since Easter, but never got the enthusiasm for (after all, isn’t this just overdesign, jumping on the bandwagon????)
We’ll see where it leads. I’m getting frustrated because I want to get on and have a working script to do what I need (and in my mind I can see exactly how it’ll work; how the interface will look etc) yet I’m not going anywhere because I want to get the design right. Which if I’m not careful may mean I never get anywhere, as the design’s never right ![]()
Here’s a couple more resources:
* “Eclipse Library documentation”:http://www.students.cs.uu.nl/people/voostind/eclipse/api/Iterator.html on their Iterator class.
* “Harry’s page”:http://www.phppatterns.com/index.php/article/articleview/50/1/1/ on the subject
* “A forum posting”:http://www.devnetwork.net/forums/viewtopic.php?t=8532 suggesting an alternative to Harry’s approach. I liked this quote: ??it doesn’t take into account the fact that PHP is a very dynamic language, and doesn’t need to rely on methods built for languages like C++ and Java (strongly typed languages).??
Finally, in the same vein as the quote above, a quote from “PHP Everywhere”:http://php.weblogs.com
bq. Here’s an example of something that is very hard to implement in VB.NET or C# or Java: PHP can dynamically recompile itself; the famous Smarty template compiler being just the tip of the iceberg. There is a world of PHP innovation out there beyond cloning PHPNuke or J2EE, just waiting to be discovered!
Some things are good to copy, some things aren’t. Some patterns are good for PHP, some aren’t. In 20 years time I’m sure we’ll all know which; at the moment we’re still developing the best approaches to take with dynamically typed languages.
0 comments ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment