18
10 Tips and Tricks for Building Top-Performing Mobile Applications by Gautam Chandna Bruce Lawson Opera Software ASA

W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

Embed Size (px)

Citation preview

Page 1: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

10 Tips and Tricks for

Building Top-Performing Mobile Applications

by Gautam Chandna Bruce LawsonOpera Software ASA

Page 2: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

Opera Software ASAhttp://www.opera.com/

Page 3: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

W3C and Opera Widgets

Standardized Client side Apps Device APIs Local Storage Powerful XHR Auto-update App Manager

Page 4: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

Easy to develop

Page 5: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications
Page 6: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

Device types

10 feet device

Large screen

Large fonts

1 App at a time

Difficult Input

Only when needed

Remote

Medium memory

1 foot device

Small screen

Small fonts

1 App at a time

Difficult Input

Always on

Direct access

Very little memory

3 feet device

Normal screen

Normal fonts

Multiple Apps

Easy Input

Always on

Direct access

Lots of memory

Page 7: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

Device types

10 feet device

Large screen

Large fonts

1 App at a time

Difficult Input

Only when needed

Remote

Medium memory

1 foot device

Small screen

Small fonts

1 App at a time

Difficult Input

Always on

Direct access

Very little memory

3 feet device

Normal screen

Normal fonts

Multiple Apps

Easy Input

Always on

Direct access

Lots of memory

Page 8: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

1. Things to think about

Physical and Virtual Size of the screen (DPI) Readability Input mechanism Memory, CPU and Battery limitations Network speed, stability, and recovery Usability

Page 9: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

2. Know your target devices

High resolution Low memory Device APIs Touchscreen Keyboard or Numpad Background activity

Page 10: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

3. Work round flaky networks

Queue XHR requests, avoid hitting max Cache data Time out XHRs yourself Make sure there's a try again option What you see is where you left it – pick up a

call so phone killed your app.

Page 11: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

4. Markup for mobiles

W3C Best Practices MWABP draft: Reduce HTTP requests: CSS sprites, Data

URLs for images (with caveats) Enable incremental rendering: Place JavaScript

tags at the bottom of the page Declare image sizes in HTML Consider SVG for illustrations, <canvas> for

dynamic images

Page 12: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

5. Understand accessibility

Lots of similarities with accessibility techniques: Relationship between Mobile Web Best Practices (MWBP) and Web Content Accessibility Guidelines (WCAG)

No images? No fonts/ colours?

http://www.w3.org/TR/mwbp-wcag/

Page 13: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

6. CSS for mobiles

ems instead of px for fonts CSS sprites Fluid layouts: remember motion sensors Media queries (demo in browser)

Page 14: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

7. A little goes a long way

Use a minimum amount of graphics Use time-based rather than frame-based

animations Avoid active, focus, mousedown, and

other events that are meaningless or unnecessary on mobile.

Page 15: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

8. Be prepared for HTML 5

Form validation is free Client-side persistent storage of key/value

pairs and support for embedded SQL databases

Server-sent events and <event-source> element reduce need for polling in web applications

Caching mechanism to support off-line web applications.

Page 16: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

9. Opera Widgets SDK

documentationemulatorLibraries (animation library etc)

www.opera.com/b2b/solutions/widgets/

Page 17: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

10. Opera Dragonfly

In a hostile environment, work remotely

Tools> Advanced > Developer Tools

Page 18: W&M 2009 – 10 Tips and Tricks for Building Top-Performing Mobile Applications

Opera Software ASA

[email protected]/brucel

Open for questions.