views:

482

answers:

4

Hi -

I have an existing website that I need to develop a small portion of for mobile devices. For reasons that are not in the scope of this entry - I am using the Microsoft platform and tools - VS2008, ASP.Net, VB.net, .Net AJAX Framework, jquery.

I have 2 questions:

  1. What is the best page size (Height and Width - mostly width) to make the pages as I do not know what devices will be accessing the mobile portion of the site. I can detect if they are mobile devices and direct them accordingly to the mobile portion but I do not want to write customized content for each mobile device - so I would like to create something that will be sort of a one size fits all mobile app.

  2. Any suggestions or links for Mobile Web development in the .Net 3.5 framework environment?

Thanks

A: 

Ideally you should be developing pages that work regardless of screen size. Creating separate pages for mobile devices means having to update things in two places when they need to change. This goes against the principle of don't repeat yourself. Create a stylesheet using the handheld media type to serve your content to mobile devices. This allows you to reposition the elements into a single-column format quite easily. Just beware that many mobile devices will report to the server that they accept both handheld AND screen media types, because they are trying to offer a consistent user experience with the desktop. You will likely need to override some screen rules in your handheld stylesheet.

Scott
Scott - Thanks for the reply. The mobile portion of this site is for mobile devices only. It is a seperate business requirement and is isolated from the main site - I just need a good screen size. It is sort of an "Out on the floor" part of the app.
Jim Evans
+1  A: 

We are developing a mobile app right now as a separate application. The reason for this design decision is that we won't use our existing pages because they contain too much information. So while Scott has a point about being "DRY" to an extent, it is not an accurate generalization to make.

Mobile apps should be optimized for really small screens and low bandwidth. Reduce images, JS files, etc. as much as possible. This will improve the user's experience. The best thing you can do is to get a mobile device or some simulators and check out how they perform/look on those devices. Here's a cool one for iPhone.

Also, keep in mind that many mobile users only use mobile apps for a few minutes - and only to get to critical information quickly. Your app should make it easy for the user to access only the information they need with the lowest amount of few clicks and page loads.

Brandon Montgomery
Thanks Brandon - yes - our mobile portion is also different than the rest of the app - see my comment to Scott above. You also make some very good points but what I am really looking for here to start out with is the optimum screen size for most devices. These users will be using the mobile portion a lot as they are the ones that have been urgently requesting it to perform part of the job that requires them to be out on the floor away from a large format computer.
Jim Evans
Also - checkout the Mobile doctype to put on your aspx pages. We've found this to help out in displaying the page on mobile devices.
Brandon Montgomery
+2  A: 

Your average mobile device still has a very small screen resolution.

A quick google found a number of sites listing this sort of thing, or pointing to lists, the best one I saw was:

Cell phone screen resolution by Brand and Model

or for a better idea of average:

Cell phone screen resolution, sorted by size

As for building the mobile version, I'd start with System.Web.Mobile, and work my way on from there - taking in System.Web.Ui.MobileControls, and also their walkthroughs.

And can I say "thank you for thinking of us"? As a user of the "mobile" internet, it's always a pain to come across a heavily javascript enabled site (I'm looking at you SO) that doesn't work on my phone (Windows Mobile 6.1, with Opera Mobile 8.5 installed) because of limited (or percived limitations) in the JS support.


Just had another thought - with everyone talking about DRY - looking into an MVC framework would be a really good thing to do - then your controllers can all be the same, and just return a modified view based on the browser caps - Scott Hanselmann included a bit about this in his MIX talk, all good stuff.


I knew I had more here.

Scott also had a podcast (ASP.Net and the mobile web) on this, and the Mobile Device Browser Files are on codeplex

Zhaph - Ben Duguid
+1 for mentioning the Mobile Device Browser Files
Element
A: 

There are several distinct display sizes that is worth considering when you build up your XHTML+CSS templates.

They are as follows (width in px):

  • 120 - I suspect there is no need to worry about smaller displays than 120px. Less than that would probably have to be served in WML anyway.
  • 128
  • 176
  • 240
  • 320 - probably the largest width you need to worry about at the moment.

All variations should be suited with these widths. Also consider setting the width with something around 10px less than the view port (e.g. 240 must be 230). Same goes for images. That is necessary because of the scrollbar which is shrinking the viewport even more on many mobile browsers.

There is no need to worry about height, as with normal browsers, that is not a concern - one can always scroll down. However, a good advice might be to keep pages relatively short.

Oh, and I will point you out WURFL, although I haven't used it myself, perhaps you might find it useful.

Petrunov