incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse <>
Subject Re: CordovaView?? - A proof of concept of making a custom Android View with Cordova Web APIs exposed
Date Sun, 11 Dec 2011 10:57:12 GMT
The control is storing/creating/managing it's own instances of the
This could potentially break plugin code in a multi-gap-view world, but I
am considering making those decisions out of scope for this
The main use-case I am working to enable is having PhoneGap functionality
in any app. Essentially the default PhoneGap app that users will build on
iOS will be a simple application container with 1 PhoneGapView.

After this iteration, we can then move on to define all kinds of things,
like one view instantiating another, and communication between them. ( sexy
animations, ... )
General advice for plugin developers would be "don't assume that there will
only ever be one instance of your class", although in OOP this should be
common sense.

On Sun, Dec 11, 2011 at 1:17 AM, Patrick Mueller <> wrote:

> On Sun, Dec 11, 2011 at 01:40, Jesse MacFadyen <
> >wrote:
> > I am working on a similar refactor of iOS code. Moving the majority of
> > the code into the view controller and out of the application.
> > This will allow the use of a phonegap view in any application, not
> > just a PhoneGapApplication subclass.
> >
> I wasn't quite sure what Joe was talking about in his post, but if I read
> Jesse's note correctly, this is a move from a "application-centered"
> version of the Cordova runtime to a "control-centered" one.  +1 on this.
> I'm curious as to the affects on plugins when we move to "control-centered"
> from "application-centered".
> 1) are plugin instances shared across multiple controls?  Or does each
> control get their own private instance of each plugin?  Or - it it more
> complicated than that?
> 2) even if plugin instances aren't shared across multiple controls,
> presumably a plugin may be using "static" sorts of storage, which basically
> makes their plugin instances shared across multiple controls despite the
> fact that they aren't designed to be.  Meaning, you shouldn't be storing
> any control-specific data in static-ish data areas in your plugin.
> I think there are issues here, w/r/t plugin design, that go along with this
> "control-centered" version of Cordova, and we need to get those spelled
> out.  It might just be a note on dangers of using static-ish storage.
> --
> Patrick Mueller

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message