Mobile Portal
Table of Contents
Provide a simple portal for access from devices with low bandwidth/screen sizes/ CPU.
- should also support Touch events
This acts like the '/m' version of popular websites.
Example:
Theme which works well on both Desktops & Mobiles:
- http://mobiforge.com/Designing
- http://www.slideshare.net/nickf/mobile-ux (eye opening examples on mobile usability)
- http://www.slideshare.net/nickf/mobile-web-user-experience
- http://www.slideshare.net/bryanrieger/rethinking-the-mobile-web-by-yiibu
- http://www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/
We need to :
- Detect that a mobile device is being used
- Provide an optimised screen size & navigation
- Could use the existing RESTlike CRUD controller's ?format=plain to generate lightweight forms.
- Work on low-bandwidth/high latency
Detection:
- Server-side most reliable:
- http://web2py.com/books/default/chapter/29/5#Mobile-development
- WURFL - an XML library of mobile phone capabilities
- http://pypi.python.org/pypi/pywurfl/
- Djangobile can be used for ideas on how to integrate into web2py
- http://www.handsetdetection.com/
- If not,possible then call fallback to client-side:
MENU(mobile=True)
:
jQuery Mobile
Bandwidth savers:
- Light on AJAX (if present at all).
- JavaScript caching:
Use far-future cache expiration headers. This will prevent the browser from having to send a conditional GET request. Try to limit HTML pages to 25.6KB or less if you want them to be cached, since the previous tests showed that this limit—imposed by iOS 3.2 on the iPad—was the lowest HTML resource limit of the devices tested. Keep CSS and JS components under 1MB. Of course, 1MB is enormous and your components should be much smaller than this, but don’t bother splitting a component into separate requests for the sake of cacheability unless its size approaches 1MB. Consider using the HTML5 application cache if it’s important that your components persist in the cache for a long time, or across power cycles.
Mobile Emulators:
- http://mobiforge.com/emulators/page/mobile-emulators
- http://www.opera.com/mobile/demo/ (No JavaScript)
- Nokia screen sizes: http://forum.mobiles24.com/showthread.php?t=9980
- Remember that some screen lost for nav tools & that usually used in portrait mode
Status
session.s3.mobile
boolean is populated by a quick check on the Browser in models/00_settings.py
.
- Currently disabled as unused & slows system down
session.s3.browser
Storage of capabilities is populated by a detailed check on the Browser in models/00_settings.py
.
These can be used to direct to appropriate pages - e.g. assess/create goes to assess_short_mobile
The values to be populated in session.s3.browser
has to be set in features
(an instance of storage) in models/00_settings.py
under definition of populate_browser_compatibility()
function.
Could we have a Mobile Theme which we activate for Mobile Users?: