Apr

14

I think people are missing some of the head nods in Russell’s post about him stopping his experiment called Mowser. ZDNet cracks me up. They jump on the story making it sound like it is an epiphany that some well respected and industry leading startup has thrown in the towel. When in all reality Mowser was an experiment Russell was doing out of his apartment. It had no money behind it. I wouldn’t define this as a legitimate startup. No offense to Russell at all. What he accomplished was really cool and helpful to the mobile technorati.

So let’s talk about the head nods.

First is that Russell is pretty good at PR. He’s decided to get a full-time gig again. So he quickly gains attention by declaring the very thing that he heralded before is dead. Excellent work Russell! That seems a little insulting, but it is really not meant to be. I’m very serious when I say that Russell is good at PR and marketing.

But I think the biggest point people missed is that Russell is referring to mobile-only sites as being dead. The numbers just aren’t there. But wait, Google released numbers at the start of the year saying that mobile traffic was up. These two things don’t gel.

Russell is talking about mobile only sites. Sites built in technologies specifically designed for mobile screens. These include WAP and XHTML-MP.

In other words, I think anyone currently developing sites using XHTML-MP markup, no Javascript, geared towards cellular connections and two inch screens are simply wasting their time, and I’m tired of wasting my time.”

Part of the reason can be summed up by the introduction of smarter phones and more advanced mobile browsers that can render typical Web pages. The iPhone, the new Nokia’s, Windows Mobile’s IE. The other major reason is that mobile only sites have a hard time creating brand. The alternative being sites that are part of our lives on the desktop seem to be successful on mobile devices.

It has been my belief for a number of years that companion apps are the sweet spot for mobile devices. Case in point is Google Reader. Many people have come to rely on it for news reading on the desktop. It’s a borderline addiction. This makes it a perfect candidate for mobile devices. Google recognizes this and makes it one of the best apps for the Nokia series and the iPhone. I use it very often. One doesn’t have to look far to find great mobile companions for Gmail and utilities like Twitter.

Rather than people jumping on the mobile web is dead bandwagon, ahem ZDNet, people should instead look at the key details. Russell has some very insightful thoughts regarding the thinking that the mobile web was an isolated thing to begin with. The mobile web is just a companion to the real web, it’s not this unique, different thing. I don’t think we need to go throwing our arms up and declaring genocide. Geesh.

Apr

14

I’m in the middle of a project that had a catalog of SWFs as content. The catalog needs to be edited/modified. I’m using CakePHP as the framework. The beta version of CakePHP 1.2 introduces something burrowed from Rails called Request Handlers. This works perfect for what I am needing to do. My SWFs are stored in a database as blobs. I am going to retrieve them using AMF (i.e. Flash Remoting). But I need a convenient way to server them, rather than digging through a filesystem. So I am going to use Request Handlers.

The idea is pretty simple. I want to be able to call a controller action something similar to /give/me/swf/number/14. So I am looking for a SWF with ID 14 in the database table. BUT, it would be cool if I could also serve up a corresponding GIF if the user doesn’t have the plugin. Request Handlers allow me to do this with little worlk. My controller can handle requests and react depending on file extension. So something like /give/me/item/index.swf?id=14 and /give/me/item/index.gif?id=14 would deliver either a SWF or a GIF depending. No extra logic in the controller needed. Pretty cool.

There are a couple of things need for this to be setup correctly in CakePHP. First you have to set the Request Handler for SWFs. This goes in the app_controller

/**

* setContent – used to setup request handler for swfs

*

* @return void

**/

function setContent()

{

$this->RequestHandler->setContent(‘swf’, ‘application/x-shockwave-flash’);

}

Next, you need to set the content in the beforeFilter of the controller that is going to react:

/**

* prior to rendering

*

* @return void

**/

public function beforeFilter()

{

$this->setContent();

}

Then in my controller action, I do something similar to:

$this->set(‘file’, $this->Symbol->findByid($this->params[‘url’][‘id’]));

This sets the data for my view, which I have to create corresponding views for extensions so I respond with the correct mime types. So if this is in a medias controller, I need /views/medias/swf/index.ctp. Inside that I set the MIME info:

<?php

// Output the MIME header

header (“Content-transfer-encoding: binary”);

header (“Content-Type: application/x-shockwave-flash”);

header (“Content-Length: ” . $file[‘Symbol’][‘size’]);

header (“Pragma: public”);

header (“Expires: 0”);

header (“Cache-Control: must-revalidate, post-check=0, pre-check=0”);

header (“Cache-Control: private”);

// Output the flv

print $file[‘Symbol’][‘file’];

?>

Hopefully I didn’t forget any pieces. I wanted to write this up right when I did it, mostly so I wouldn’t forget the steps, but unfortunately that didn’t happen. Leave comments if I forgot something.

Linkroll

Recent Projects