Recent Blog Posts
Blogs » Archive for November, 2005
What’s your plan for __autoload()?
Of all magic in PHP I probably like the __autoload() hook the most. Actually, you should too. With a little bit of improvisation you can glue together a handy little tool that can make your object oriented life a lot easier.
Dynamically Typed’s New Contributor
It all began some time ago, with a perfectly innocent post to SitePoint’s PHP blog. Little did Kev know that his lighthearted comments would eventually see the addition of Maarten Manders, Swiss Computer Science student and PHP guru, to the ranks of the SitePoint Bloggers.
Please join us in welcoming Maarten to Dynamically Typed!
Who GETs REST?
Prompted by looking at Catalyst and Handel in particular, has me thinking about that whole REST thing again.
Seems to me that very few people get the point (and I’m not claiming I do). There’s been alot of smart debate, some even down to earth, but what does REST really mean? What are practical consequences web developers can use? How do we eliminate grey areas? Is this REST?
What I’m pretty sure of is what Roy was describing is, at heart, a very simple set of ideas, based on a simple protocol that provides everything you need. But in the endless debate vs. SOAP the point seems to have been lost.
One particular quote from the Wikipedia interpretation…
With REST […] the emphasis is on the diversity of resources, or nouns
Turning that on it’s head, how about this as a bold statement that we can actually use:
Never put verbs in URLs
To that extent made this change so that this URL - http://www.example.org/users/search?surname=Michaels becomes this: http://www.example.org/users?surname=Michaels
Will kick off with two exceptions (but I think the only exceptions) - domain names or where the verb is actually part of the name (such as a title in a “search engine friendly” URL) like this
Think the consequences …
Thanksgiving Message and 40th Birthday Greeting
Well, another year has passed and my favorite holiday, Thanksgiving, is here this week. In my opinion, Thanksgiving is absolutely the greatest holiday on the planet. Plus I turn 40 on Friday.
So it is an excellent time once again to give thanks.
This year, let’s keep it simple.
Life has 3 components: what you have, what you do, and who you are. Having, doing, being.
I’m grateful for all three, and hope in your life you are, too.
I have a great family, good health, and lots of good stuff. More stuff than 99% of the people in the world.
I’m doing just about everything I love to do.
And I am happy, satisfied, and generally at peace.
Not much to complain about, and also lots to look forward to: more travels, more great clients, more business ventures, more great times with my children. And thanks to Sitepoint and its readers for your continued support.
Of course, the above list — having, doing, being — is backwards. Most important, as any spiritual path will tell you, is “being.” If you have the right state of mind and of being, doing and having typically follow.
I wish you a great Thanksgiving and sincerely hope that you are grateful …
Setting up a Catalyst development environment
More notes / opinions and tips on setting up Catalyst development environment to play in, in addition to stuff you’ll find here.
Even if you don’t know Perl, you’ve probably heard of CPAN, which was inspiration for PHP’s PEAR. In contrast to PEAR, CPAN is the worlds largest collection of programming libraries and utilities - practically anything “foundation level” you might need to do in Perl will have a CPAN library available that makes it easier. As Perl coders probably get tired of saying, CPAN is the biggest reason to use Perl these days - other languages have slicker syntax than Perl but for getting real work done, it’s very hard to argue with CPAN (and it’s basically why I’m interested in Catalyst).
The easiest way to get Catalyst is via CPAN, like $ cpan install Bundle::Catalyst. Catalyst has a lot of dependencies so if you have a relatively fresh Perl install, expect to spend some time here.
Windows Joys
That assumes of course you have Perl in the first place and if you’re on Windows, this may be a problem. IMO Perl has always regarded Unix as it’s primary platform and Windows as “Well if we must…”. Here may also lie the real …
The right and wrong way to manage outsourced talent
I am working with two development teams in the USA. Both utilize off shore talent. Both charge low fees for off shore talent, and high fees for their own time as project managers. The ratio is about $1500 per week for their time vs. $300 per week for an off shore resource.
So as a customer my incentive is to cut off the expensive talent, if I can.
In one case, that is easy to do. That’s because the project manager isn’t doing much more than passing my comments about the site on to the off shore talent. There is no value added advice, architecture development, etc. If anything, direct communication would be more efficient and effective, so I could even make the argument that the project manager is costing me value rather than adding it. In fact, I bid out completion of the project to an off shore resource I know, and his bid came in at 1/10 the price that it will take me to complete the project as it is currently structured.
In the second case, the project manager troubleshoots, provides business and technical insights, removes and replaces underperformers, and more. He does provide value. Even in his case though, …
Catalyst Impressions
Ongoing thoughts on Catalyst, following from here. This is not meant to be a tutorial or a brochure - just observations and impressions that have been springing to mind and even there, things that really stand out. There’s a good chance I’ve misunderstood things or am simply wrong but figure it’s useful to capture it all somewhere. Also not attempting to fish for answers - want to see how far I can get without help.
- The introductory documentation is good. Gives plenty to start playing around with. More is needed in the Cookbook IMO - although Catalyst leaves much to external CPAN modules, providing examples (esp. lots of form-related stuff) would help.
- The controllers API is easy to remember - despite only having done some very basic stuff, the various special methods like begin, auto (perhaps that might have been better named chain?) and end are lodged in my head, along with the subroutine attributes for URL mapping like Global, Local, LocalRegex and Private. That’s in contrast to other frameworks I’ve tried, where there’s a need to keep returning to the documentation. Also the framework behaviour is easy to grasp - in conjunction with the Intro docs, this diagram says it all. …
One Site or Many?
I often get asked if I would rather have one large site or many smaller sites. Anyone who is familiar with my business knows that I have many sites, over 100 probably, and many of them are small. However, ideally I’d like to combine the best of both worlds and have many large sites.
If you only have one website your income is going to be very vulnerable to changes in the market, likewise if something happens to that website, such as a server crash or a DoS attack, you will be without income. You can of course back up your website and secure it against hackers, but what happens when Google makes a major algorithm change as they did at the end of 2003? Many websites suffered then, including one of mine, and had that been my only site I would have been in trouble.
So diversity is definitely desirable, and you should always try to diversify your holdings by making more websites, especially websites on different topics. Branching into ecommerce can also help diversify your income.
As for site size, well some sites due to their niche will never be that large, but I don’t think anyways starts out …
Should you spend more on technology or marketing?
Here’s a tough question for many tech-savvy web developers: Should you spend more on marketing or technology?
Here’s a story for you: When I was growing up, my father spent time at the local YMCA working out with a shoe salesman. This guy always had new ideas for shoes, and my father and friends got a kick out of hearing his ideas. One day, he bought a small sneaker company called Reebok. The rest is history.
His name is Paul Fireman, and one thing people also said about him in his early days was this: If he had only $100 to spend, he would spend it on marketing. Maybe Reebok isn’t Nike, but Mr. Fireman managed to bring in $11 million per year for himself for a long, long time.
In web development, the question gets a bit more tricky. Here is my take on it:
You are either a technology play or a marketing play. But be careful. Many people who think they are a “technology play” really aren’t. Their technology is nothing new or different, and doesn’t change the world. Really they should be a marketing play.
A marketing play means that, with good marketing and by knowing your customers, you can create …
Looking at Catalyst
Been reading the London web frameworks post mortem over on the London.pm. That and phplondon make me wish I was there rather than here right now.
Anyway, apperently the Perl crowd feels catalyst “lost”. What’s Catalyst? Basically Perl’s answer to Rails.
Reading Simon Wistow’s remarks, I’m personally more convinced about Catalyst because it’s flexible.
There needs to be a slogan like “A framework is for life, not just for Christmas”. Once you start writing code against a framework, you’re stuck with it, at least for as long as you’re willing to maintain that code.
I’ve been burnt by PHP frameworks before and there are very many to choose from. The main issues I’ve run into time and again are either;
- It’s incomplete - work in progress (perhaps stalled)
- It’s too inflexible when it comes to edge cases and my experience has been real projects are, in fact, 50%+ edge case. Once you hit an edge case, it’s very easy to blow any time you saved elsewhere to the point where you even consider “vanilla PHP” (or whatever you’re using) might have been smarter.
- Half way down the road I realise I’ve misunderstood how it’s intended to be used and now have a bunch of code that needs …
Sponsored Links
SitePoint Marketplace
Buy and sell Websites, templates, domain names, hosting, graphics and more.
Download sample chapters of any of our popular books.



