Recent Blog Posts
Blogs ยป Archive for July, 2005
PHP 4.4 Minor Gotcha
In the days after the release of PHP 4.4, it was interesting to watch the discussions surrounding a possible backwards compatibility issue which had been introduced with the release. Commentors seemed to be divided on whether this did, or did not, actually constitute a break in backwards compatibility.
The ‘backwards-compatibility break’ is in fact a new notice generated by the PHP error-handling code, warning developers when trying to return a temporary variable by reference. The notice seems to have been added in response to a bug in PHP 4.3 in reference handling.
Today, when I upgraded my own development server at home to PHP 4.4, I was confronted by the problem. An application I’ve been working on runs in its own ‘debug’ mode, which makes notices really visible by echoing the notice to output.
The culprit:
Notice in D:\htdocs\aaa\resources\includes\controls.inc.php, line 14: Only variable references should be returned by reference
The line in question falls in the following method:
function &getnodecontrol($objecttype)
{
require_once(RESOURCE_DIR . “nodecontrols/$objecttype.inc.php”);
return new $objecttype($this->db);
}
The problem here is that “new $objecttype($this->db)” is not a variable - it is the result of a “new” statement - effectively a ‘temporary’ variable - which PHP can’t create a reference to. The only thing that can be …
Leo Laporte on Open Source
For those who were rabid fans of TechTV (like myself) and latched onto Leo’s lively coverage of modern tech - he lives on in many ways - including a growing podcast, blog as well as in mainstream media.
The Mad Penguin has a great interview with Leo on the intersection of traditional media and content and the open source world. Apparently there is a theme emerging here as we see modern media converge with modern open source technology.
It is interesting to think about this shift of technology, presentation and how web professionals will leverage content and open source beyond the web browser. Certainly we need to begin exploring this more in depth.
The Web Designer’s Sketch Pad
I’ve got a nasty habit of buying a new sketch pad and another click pencil every time I wander into the newsagent. As I’m always leaving them somewhere other than where I need them, the only way to guarantee there’s always one on hand is to have massive redundancy in my system.
So, looking at Webjillion’s Mockup Maker, I’m guessing I’ll need to order around 15 to 20 to get me started. Ouch.

The Mockup Maker is a hefty, 75 page, spiralbound sketchpad — unremarkable other than for the fact the each (one-sided) page has a diagram of 800×600, 1024×768 and 1280×1024 screen sizes with 5 pixel markers up the left side and across the top.

On of the problems I’ve found with presenting ‘onscreen mockups’, is clients believe they are finished art. Even if you tell them a dozen times ‘this is an early phase mockup’, they often still can’t seem to think beyond what’s onscreen.
The Mockup Maker looks like it could be good for presenting consistent, neat and (hopefully) impressive mockups that clients understand aren’t finalized.
I like it when someone follows through with a simple idea.
Open Source Becoming More Than Software
Public Radio International, known to many in the US as a partner to National Public Radio, has taken the term ‘open source’ to a new level in its global radio programming.
The organization, possibly best known for its show The World, which brings an international flavor of news and features to the US,launched a new talk show format online in July.
Talk shows have long already been successful largely based on audience participation - PRI tapped the open source philosophy by leveraging the community of listeners to truly drive content and improve show quality. This has been done through a live Internet radio show, podcast and user community-based blog combo.
As we have discussed before - the BBC has started down a similar road as well (though not using the same methods, yet).
I find it fascinating that the momentum of open source is now trickling outside of technology spheres and impacting our everyday language and life. More importantly, this may be returning to the original philosophy of open source from years ago- an open and free exchange of knowledge and ideas (without needing to pay for a support contract).
IE7 Beta 1 released… but not to you
Just when I was starting to like Microsoft’s approach to the Web… Just when I was defending the cross-browser support in their latest Web application… Just when I thought there was some hope for the little browser that wouldn’t…
…they release a closed beta of their free browser (free as in “free with every Happy Meal”).
WTF.
Insert rant here. I’m on holiday.
Caution: Online Publishing is Permanent
Interesting article in today’s Wall Street Journal (sorry - subscription required but there is a free two week trial!).
It seems that today’s attorneys are using the Wayback Machine and other caching services like Google to nail down folks on what they have potentially said, posted, hosted or otherwise executed online in years past even after pages have been deleted.
Precedent has now been set via a lawsuit by Dell against a small computer maker who in the past used dellcomputerssuck.com as a bit of humor and redirected to his own business site.
Using the cache of old pages - Dell was able to gain a favorable ruling and take possession of the domain and close it down.
As a web professional, great thought should go into any endeavor that has the possibility of crossing the line. I am not suggesting supressing free speech - however - consider legal fees and your reputation when possibly shifting into unchartered waters.
Savant Template Engine
When we (as in my business partner and I) started developing the third version of our open source program (our first ever ‘commercial’ product), Olate Download, we had to decide how we were going to handle templates to allow the user to customise their site. At the time, the options available to us were to use Smarty (or find a different engine) or create our own template engine to handle it. We had a look at Smarty and decided it was too complex for our simple download management application. As such, we went ahead and created our own system.
Looking back at our engine now, it does its job, but it is limited. We added our own very basic control structure syntax and built in includes and even a simple language system. It did the job well.
Several months after we released that product, I started development on our latest product - a paid application to manage software sales. This too was to have a template system because it is easiest way to allow customisation of the product. I had recently read an article in PHP Magazine about an engine called Savant2. After playing around, I decided that this time, I …
Small Screen Testing in FireFox
A month or two ago I wrote a little piece on Testing for Smartphones & PDAs in the Design View. In essence, the article was a barebones rundown of the more well known small screen emulators.
Today I discovered I had overlooked a reasonably handy alternative — particularly if Firefox is your weapon of choice — Disruptive Innovation’s ‘Small Screen Rendering XPI’ extension’. Although it appears to have been around for quite a while, it seems to have been overlooked by most developers.
Don’t look for bells and whistles. After installation the only change you’ll notice is an extra option in your ‘View’ menu — ‘Small Screen Rendering’, and the results are not unlike Opera’s Small Screen mode.

At this point, the Opera option is probably still more technically useful, if only for the fact it can show you exactly how your page will render in PDAs and smart phones that use Opera for Mobile — a reasonably significant minority.
As Mozilla’s mobile offering (MiniMo) is still in development, Firefox’s ‘Small Screen Rendering XPI’ can only give you a ‘best guess’ at how an average small screen device might tackle a given page.
Ultimately, no single emulator can show you …
Open repository brings modularity to JavaScript
It’s early days, but a group of Perl hackers have banded together to form JSAN, The JavaScript Archive Network. Like the venerable Perl equivalent, CPAN, and other sites that borrowed inspiration (e.g. PEAR for PHP), JSAN aims to be an open repository for JavaScript scripts that are designed in a modular fashion so as to have manageable dependencies that encourage code reuse.
In practical terms, what this means is you can choose a particular module that provides functionality you’d like on your site, and the JSAN system will automatically download and install not only the files for that module, but also the files of any modules upon which that module depends. With the files installed in your site’s directory structure, you can then go ahead and use the functionality they provide in your own scripts.
As JSAN was conceived by Perl hackers, the automated system for downloading and installing JSAN modules is naturally written in Perl. If you’re a developer who works on a Windows box, I sympathise with that groan you just let out. If it’s any consolation, there are rumblings of an “alternative JSAN client” in the works, so fingers crossed. In the meantime, you need to install Perl and …
Microsoft launches Virtual Earth
Microsoft’s new Virtual Earth was launched today in Beta form. Though sooner than expected, this launch is an apparent response to Google’s new Hybrid View in its competing Google Maps service, which trumps the labelled aerial photo feature that had previously been touted as unique to Virtual Earth.
Virtual Earth is a direct competitor to Google Maps, providing a free pannable, zoomable, DHTML-powered view of the world that can be switched between flat maps and satellite imagery.
The user interface provided by Virtual Earth is more innovative than Google Maps’, with the map view occupying most of the browser window, with floating tool windows appearing over the map. The interface allows you to pan around by dragging the map directly, or by clicking and dragging away from the floating compass in the corner (Microsoft calls this “game mode”). You can also make use of your mouse’s scroll wheel to zoom in and out. Zooming is done with a spiffy animated effect, stretching the currently-displayed imagery to the new scale before loading the new imagery in its place. Also included is a “Locate me” feature, which does its best to pinpoint your current location either using your IP address or via an ActiveX …
Sponsored Links
SitePoint Marketplace
Buy and sell Websites, templates, domain names, hosting, graphics and more.
SitePoint Kits
Download sample chapters of any of our popular kits.
The Search Engine Marketing Kit, 2.0
The Web Design Business Kit 2.0
The Email Marketing Kit
The Usability Kit
SitePoint Books
Download sample chapters of any of our popular books.
