Greetings, An application I've been working on is in the process of trying to integrate Gears support into itself. The application is heavily driven by jQuery, UI and an assortment of plugins. The support for gears involves a number of get and set type calls, where data is retrieved and populated in a form or taken from a form and stored some where. We'd like to keep the implementation open enough that down the road we can work HTML5 support and potentially even Adobe AIR support into the app.
Right now these particular requests are attached to click() or submit() handlers in jQuery and fire off various AJAX requests. I'm wondering if anyone has come with a good/decent solution to modularizing these types of requests within jQuery-style javascript code and what the pattern they use are. What I am trying to avoid is a click() handler with conditions for each of the various sources, and I also need to be able to turn a source off, plugin a different source and then optionally return back to that first source. Looking forward to feedback from anyone who's faced this predicament already. Pax, - Stan