what is this mobile web is dead talk?

April 14th, 2008

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.

Handling SWF Request Handlers in CakePHP

April 14th, 2008

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.

Merlin Mann’s Flockdup

March 13th, 2008

I am a huge fan of Merlin Mann and his site 43Folders.com. Apparently Merlin did an un-panel at SXSW on his latest project “flockdup.” The video of his panel has just been posted: http://tinyurl.com/3yq39d. One of the funniest things I have ever seen. Merlin, thanks for opening the kimono!

Barefoot hiring a Rails developer

January 28th, 2008

we’re hiring a Rails developer, come join our team:

Location: Cincinnati, OH
URL: http://www.thinkbarefoot.com

Description

Barefoot has an immediate opening for a Senior Web Application Developer. We’d like you to have 5 years experience developing database-driven, dynamic web sites. We’re strong in a number of technologies, the primary ones being Ruby on Rails, PHP and .NET. You need to be very strong in Rails, and if you’ve got substantial experience in a second language, bonus points. You’ll need to be able to point us to multiple Rails sites in production. Strong SQL application development experience is also a must. You’ve also got to be at least comfortable with client-side Web development (JavaScript, CSS, XHTML), although that won’t be the main part of your job. You’ll receive excellent benefits and a salary commensurate with your experience.

To apply
Send your resume, and URLs to recruiting@thinkbarefoot.com

Posted Here: http://jobs.37signals.com/jobs/2744

casaframework, _root, and security sandbox

January 22nd, 2008

for anyone else out there that is using the casaframework and in the end their SWF is being loaded into a SWF at a remote directory, you are going to run into security sandbox issues. reason being the use of _root in a number of classes used mostly to create empty movieclips. in order to alleviate the issue, you could simply use a _lockroot, or go through and replace the _root paths with _level0 etc… I ran into them existing in classes like “enterframe” and i believe “framedelay.”

not sure if i am sold on frameworks in flash or not. i think as a developer wanting to implement a framework you really have to understand classes and the ideas of object orientation, otherwise you could just be adding a bunch of bloat to your SWF, and making it hard for others to debug/troubleshoot if they have to pick up the file and run with it. not to mention you run the risk of deploying code that you are not 100% familiar with, which could result in the situation described above where something simply stops working when loaded into a remote SWF.

is that an FLV in your database?

January 3rd, 2008

Last night I was working on a project where I am extending Wordpress to include a couple of CMS responsibilities. Among them is a way to update the homepage content of the site, using FLVs. The admin will have the ability to update the homepage with either an image or an FLV, along with some accompanying text. Rather than write the files to the file system, I decided to try storing the binary data as a blob in mySQL.

First thing I did was add a “homepage” tab to the top of Wordpress, then add the necessary form fields. Inserting the binary data was no problem. Onto retrieval on the actual homepage.

Next was some logic to determine if an image or an FLV was uploaded. Images produce an IMG tag. FLVs produce a shell video player(SWF), which then calls a PHP script as the path of the FLV. The PHP script retrieves the FLV from the database and delivers it just as if the shell was retrieving a FLV from the file system. This can be somewhat tricky I found. A couple of small details are required for the SWF to recognize the FLV using standard Flash Components. Mostly, a couple of headers have to be set, including mime type and file size.

Make sure to write the uploaded file’s file size to the database for easy retrieval. Then I used the following headers before simply spitting out the file.

// set $size and $file with the details from your database

// Output the MIME header

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

header (”Content-Type: video/flv”);

header (”Content-Disposition: attachment; filename=”watch.flv”");

header (”Content-Length: ” . $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;

Fairly quick and easy to implement and removes the obstacle of file writing permissions on some hosts. Performance has been fine so far. Wordpress can actually make a great CMS.

Founders at Work

December 26th, 2007

I finally finished reading “Founders at Work.” Good book. The book contains interviews with prominent startup founders. Some were very unique, like Woz from Apple. Some weren’t real exciting. Others were very interesting. I think my favorite founder was Max Levchin from PayPal. The different roles he had to play were really telling of what the startup life was like for PayPal. His flexibility and way to identify problems was a very interesting read for me. Having been in startups, and considering future startups, this book helped me think about the different angles and how business mindfulness is very important. I could see a version 2 of this book with some of the newer startups of today (aka, Facebook, a Google product, etc…). Great book, fairly fast read. I recommend it.

iphone sound problems

December 26th, 2007

I’m hoping the next version of the iphone goes back to a standard ear phone jack and eliminates the problem many people are having with the phone sound (ear speaker) not working after using the earbuds. The issue and solution can be found here: http://discussions.apple.com/thread.jspa?threadID=1167507&tstart=120. I had the problem recently. It makes me not want to use the earbuds at all, which pretty much eliminates using it as an ipod. Apple, please use a standard earphone jack and another mechanism for detecting the earbuds.

facebook mobile platform

October 24th, 2007

Today at CTIA, Facebook announced support for mobile versions of Facebook applications. Well at least kind of. I’m not entirely sure of the details yet, but it looks like app developers can tie into mobile components, like SMS messaging. Facebook uses SMS to alert me when I have received a new inbox message. This is convenient and handy. Apps can now use this, which is cool, because individual developers would have to rely on email->sms gateways or pay for a messaging service to work with all carriers. Now it seems they can piggyback on Facebook, who have the message infrastructure in place.

It also sounds like apps can have mobile versions that will work with the mobile version of the site. Note that there are two. One wap (or maybe xhtml-mp), the other for iPhone. The iPhone app is the best app out there. Although the applications aren’t supported, basic Facebook functionality works fabulously. I’ll have to take a look at the developer API a little more now and see what else can be exploited for mobile apps. The SMS gateway is enough already for the little guy.

Thanks Facebook, I’m actually becoming a fan.

do you subscribe to more than you can read?

October 18th, 2007

I’m having a love/hate relationship with my news feeds lately. I switched to using Google Reader as my main reader to help speed up my feed crawling. It helps. The iPhone interface is nice, but there was still something that was keeping me from liking my feed reading habits. It kept feeling like a chore to read them. I felt guilty if I didn’t at least browse all the posts. Seeing boldness indicating unread was like having new email messages in my inbox. This is obviously not sufficient with the number of feeds I had subscribed to. So yesterday, I removed many of them (probably cut 50%). Quite a few I hadn’t read for months. Some simply had too many posts and noise. Sorry Engadget, I couldn’t keep up. But today, I feel much better. I can almost read all of my feeds in a fifteen minute glance, if I have that much time in the morning. I’m trying to check my feeds at two set times during the day, once in the morning and once at night. We’ll see how that goes. But I certainly feel better that I took the time to go through and do some “spring cleaning.” Most feeds just weren’t relevant any more any way. So now, I am going to be very “firm” on what I subscribe to.

Do you have policies for feed reading? Do you subscribe to more than you can read in one sitting? I’m curious.