Mobile website development
Contents
1) Why is this so important?
2) Single site or a separate mobile site?
3) Design Needs and Options
4) Testing
5) Tips, tricks, tools and resources
6) Mobile Snippets
for Expression Web V4
Why is this so important?
Depending on which survey you read, mobile internet usage is set to
overtake desktop usage somewhere between 2013 and 2015. Some areas of the
world already (Dec 2011) have in excess of 25% mobile usage and India
for example has over 40%.
Whist this may not be urgent for corporate sites, any site that has a
consumer focus needs to be easily viewable on a SmartPhone to cater for the
many users who already use their mobiles as their prime (and sometimes only)
internet viewing platform.
A survey in 2009 found that 52% of consumers are
unlikely to return to a website they had trouble accessing from their
phone.
Most obviously, if you have a site that is consumer facing, you should
ensure it can be used on mobile devices. Typical examples would be sites for
real estate, shops, restaurants, on-line stores, schools, childcare etc.
The message is clear. It's not a case of 'if' but 'when' we make at
least some of our websites mobile friendly.
Single site or separate mobile site?
From ease of maintenance if nothing else, a single site is preferable but
there are applications where two versions of a site are warranted, a
desktop/tablet version and mobile version, particularly where they can be driven
from the same content.
If you already have a large site that would take a huge amount of effort
to redesign, a separate mobile site may be an interim or even permanent solution.
However, in most instances with small to medium complexity sites, a single
site version is the solution.
A year or so ago creating this single site would have been difficult.
Fortunately two related things have made this very much easier. The
first is the support for extended media queries in CSS3 and the second
is that modern mobile browsers support both HTML5 and CSS3. Mobile
devices can therefore be catered for using 'responsive design'. (See below).
Without doubt it's easier to create a mobile friendly site from scratch
than it is to modify an existing site, unless it's a very small one. It may
also be easier to start with a CSS framework that is mobile friendly than
re-invent the wheel yourself, particularly if your time or CSS skills are
limited. See the Design section below.
If you do want to have specific mobile pages you'll need to detect
when a mobile browser is using the site. This is done by looking at the
browser UserAgent string but isn't 100% reliable. See this article
Detecting Smartphones Using JavaScript
Design Needs and Options
Testing
Test, test and test again
Testing normal sites across a range of browsers is critically important.
Testing mobile sites is even more so, if that's possible.
Mobile browsers are far less tolerant of misplaced or missing HTML
tags. Make sure you note and correct any errors Expression Web
highlights. Validate you pages to ensure everything is correct.
The ultimate and best way to test mobile compatibility is to test on the target
device itself. Obviously this isn't always possible unless you have deep
pockets or have friends or colleagues who can help. However, the Apple iPod
Touch gives a cost effective way of testing on the iOS platform and the
latest version of Opera Mini can be installed on older Windows Mobile PDAs
and phones.
The next best thing is
to use emulators which can give identical results to the real thing in most
cases. The Windows Phone 7 emulator is particularly good.
If you don't have or can't install emulators then simple resizing of your
browser window to the appropriate size gives a reasonable indication of
correct presentation, although it can't react to mobile specific 'viewport'
meta tag and other mobile settings.
A number of tools exist to help browser
sizing.
http://quirktools.com/screenfly/
http://resizemybrowser.com Gives
pre-set sizes for common mobile devices, plus a dynamic display of browser
size.
http://mattkersley.com/responsive/ Uses iframes to show three
different sizes at once
iPhone Tester Iframe based (so not an emulator) with iPhone skin. (Best
viewed in Safari).
http://iphonetester.com/
http://iPhone4simulator.com is another desktop browser based tool
that gives a very realistic iPhone 4 skin
If you have a Mac but not an iOS mobile device, you can get slightly
closer with iPhoney.
http://www.marketcircle.com/iphoney/
The Opera
'Resize Me ' add-in allows you to launch browser windows in typical,
predefined mobile sizes
Chrome mobile browser simulator extension
Emulators
Tips, tricks, tools and resources
QR Barcodes
These are appearing everywhere now, in newspapers and magazines,
trade catalogues, adverts on public transport, flyers etc.
They are easy to create on-line and can be added to any printed
publication you or your customer produces. They can link to the main
site or specific pages giving details of products or offers. Here's one
tool that can create them:
http://www.qrstuff.com/
there are several others.
Make sure your pages are mobile friendly before using them though!
Links
Responsive Web Design 'Web Design Shock' article. More
than an article in fact, a huge resource on the topic with links to
examples, tools, frameworks and templates. If you read nothing else,
read this.
Responsive Web Design
'MSDN' article on the subject
Respond to Different Devices with CSS3 Media Queries an article on
ScriptJunkie{}, a great MS resource for 'serious web development'.
Mobile-Friendly: The Opera guide to mobile web optimization
How to validate and test your mobile site
'SitePoint' article
How to add mobile pages to your ASP.Net application Useful
background information including browser and mobile detection.
There are a number of CSS frameworks which are designed to work from
small screen upwards. The 'Web Design Shock' above article has a
comprehensive list.