The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

making a mobile site?

An interesting article says Browsing: The Mobile Data Killer App (http://www.russellbeattie.com/notebook/1008744.html).

How do you make a specialized mobile site? You can do something like mobile.yoursite.com. But do mobile platforms have recognizeable user agents that you can customize for?
son of parnas
Thursday, January 12, 2006
 
 
user agent recognition is not the way to go (assuming this is a public site). There are soooooo many brands of mobile phone/pda/tv browser..... that user agent checking is going to get tedious fast. I would say the best approach would be xml/xslt and spit out wap, html, chtml and so on. This way you could use the same data on your main site, and just write a few transforms for each supported output. The other approach is just to use bog-standard HTML/CSS. There are validators out there http://validator.w3.org that will confirm for you.

Of course if this is a private site, then use the ASP.NET mobile controls. They're fun.
outcast (ex-developer) Send private email
Thursday, January 12, 2006
 
 
I'm doing some work on this space and let me reiterate:  DO NOT USE USER AGENT.

Each device model (let alone carrier) will often have a distinct User Agent.  You need to get a collection of devices to test on.  For development purposes, I have access to about 4-6 phones for about 6 different carriers.  That has proven to be sufficient.
KC Send private email
Thursday, January 12, 2006
 
 
So then how does Google do it? If I go to google using the mobile emulators in Visual Studio I always get a mobile version of the page. I'm not a mobile developer (but may be soon) so I'm just curious...
Turtle Rustler
Thursday, January 12, 2006
 
 
I've read in other forums that they just look at the screen resolution, but I haven't tried it.  If it's less than 640, or not available, must be mobile I guess.

I know this isn't the answer most super-techies go for though.
Ben Mc Send private email
Thursday, January 12, 2006
 
 
>  If it's less than 640, or not available, must be mobile I guess.

That's clever. I hadn't of thought it. I never thought that stuff was accurate. It's techy enough for me if it works.
son of parnas
Thursday, January 12, 2006
 
 
Uh, how do you plan on getting the screen size in order to check it? 

And using bare bones HTML/CSS won't work.  You're dreaming if you think all phone browsers support HTML/CSS.  WML is different enough from HTML to not be directly compatible.
SomeBody Send private email
Thursday, January 12, 2006
 
 
There's got to be some extra HTTP header.

For example, the AvantGo client has its own extra headers, where it sends info about screen size.

See:
http://www.ianywhere.com/avantgo/developer/channel_developer/customizecontent3.html

Of course this works only for the AvantGo client and server, but maybe there's some kind of de facto standard?
The best way would be to analyze headers sent by a sample of common mobile devices and see if there's anything interesting?
Parisian developer available for cute geek girls
Friday, January 13, 2006
 
 
Found it. It's javascript.

<script language="javascript">
function checkRes()
{
if (screen.width == 640)
{
window.location = "page.php?&screen=640";
}
if (screen.width == 800)
{
window.location = "page.php?&screen=800";
}
if (screen.width == 1024)
{
window.location = "page.php?&screen=1024";
}
}
</script>
son of parnas
Friday, January 13, 2006
 
 
"So then how does Google do it?"

They probably look for certain key words in the user agent...
(palm,PPC,Windows CE,etc..)

This doesn't always work... It automatically redirects me to the /palm page when I use my Pocket PC, but it does not redirect me when I use my Blackberry.

This site has a list of mobile "User Agent" strings

http://www.zytrax.com/tech/web/mobile_ids.html
Josh in Jersey Send private email
Friday, January 13, 2006
 
 
SOP,

If they don't have Javascript, that will just be decorative text...
KC Send private email
Friday, January 13, 2006
 
 
> If they don't have Javascript, that will just be decorative text...

As will the rest of my AJAXian masterpiece :-)
son of parnas
Friday, January 13, 2006
 
 
That JavaScript code for screen size would likely result in an attractive error message on most mobile phones today.  JavaScript is out of the question if you want anyone with a mobile phone to actually be able to view the page.  Even HTML and CSS are out of the question for probably most phones today.
SomeBody Send private email
Saturday, January 14, 2006
 
 
Which brings you back to user agent recognition -- despite what outcast says in the second post, it's really the only way to go.
Almost H. Anonymous Send private email
Sunday, January 15, 2006
 
 
>  There's got to be some extra HTTP header.

I didn't find a standard header or a common but unstandard header for this. That's doesn't mean it doesn't exist. I just didn't find it. A header would seem the best way to go. Or maybe it's just slapped in the UA somewhere.
son of parnas
Monday, January 16, 2006
 
 
It doesn't exist as a header or in the user agent.  There should be a separate content-type on the request ("text/vnd.wap.wml", I think) for WML versus HTML requests ("text/html") but other than that, you're pretty much on your own in terms of figuring out capabilities.  You can either go with the most basic WML or check the user agent for better capabilities.  OpenWave is a pretty common browser so you can cover a big portion of the market just by checking its user agent and different versions.
SomeBody Send private email
Monday, January 16, 2006
 
 
What about IP address?

Don't all mobile carriers come from fixed IP blocks?
Eric
Monday, January 23, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz