Refactor: Commando Mode

StevenBlack edited this page May 6, 2011 · 7 revisions

Commando Mode is a proposed mode of jQuery Mobile processing that minimizes DOM manipulation and JavaScript processing for clients that, in any event, don't support what we're adding.

BACKGROUND: Issue 1276: Opera Mini Page ScrollTo issues - blank & cut off pages and, in particular, the notes in this comment.

THIS IS JUST A HUNCH: that Opera Mini servers cut-off JavaScript processing after 1 or 2 seconds (citation needed) so blank pages on Opera Mini may be due to abrupt arbitrary termination of processing.


Assuming truth to this, here are areas where we could radically trim execution processing for browsers like Opera Mini by limiting what we do within the DOM in this context.

  • Transitions -- not supported by Opera Mini anyway -- in jquery.mobile.navigation.js and jquery.mobile.transition.js.
  • Much list, page, and control markup -- not supported by Opera Mini anyway -- in
    • jquery.mobile.page.js
    • jquery.mobile.list*.js
    • jquery.mobile.buttonMarkup.js
    • Others?

One way to look at this is: it might be good to have access to different markup strategies based on execution context. IOW, the http://www.vico.org/pages/PatronsDisseny/Pattern%20Strategy/index.html, or a Strategy-like design; TL;DR: at runtime, pick from available interchangeable markup generating implementations.