incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <...@adobe.com>
Subject Re: Work Items for 1.5.0 - unified JS
Date Thu, 09 Feb 2012 17:07:40 GMT
Three parts to this email. First:

>[ Whole bunch of discussion]
> 
>Perhaps it's time to define "AMD-lite" runtime somewhere?

^^ Pretty much.

In my mind the simplest way to distill the discussion down is: do we want
to employ almond or some other AMD+CJS-compliant loaders, and make it
obvious to users that this comes with cordova, or roll our amdlite or smd
or whatever you want to call it, a cut-down version tailored for our
needs, and hide the fact we use it (closure that stuff up)?

Second:

One thing Mike and I chatted about today was the various platform
definition files - there being a common one and various platform-specific
ones, with both defining namespaces/globals that each will drop. It used a
JSON convention that currently is something like:


objects:{
  PhoneGap:{
    path:"lib/phonegap",
    children:{
      exec:{
        path:"lib/phonegap/exec"
      }
    }
  },
  navigator:{
    children:{
      accelerometer:{
        path: "lib/phonegap/plugin/accelerometer"
      }
    }
  }
}

I believe Pat expressed some form of disgust when he saw that :) I agree
it can certainly be better. One convention that could be employed is
having a string value instead of an object if it's a module path alone (no
children). Mike took it a different route and was thinking of something
string-based like:

{
  "window.PhoneGap":"lib/phonegap",
  "window.PhoneGap.exec":"lib/phonegap/exec"
}

Builder would need to be changed to accommodate the above, to sort the
namespace strings and build up the necessary parent object if they don't
exist, but both would work. Not sure if you recommended anything Pat but
it's certainly open to discussion.

Third:

I really want to ship cordova-js for 1.5. There is a lot that can be
improved, but I'm hoping that improvements can be slowly introduced over
the next few releases. I am hoping that none of the issues that you
brought up, Pat, are "show-stoppers".

That's it from me.


Mime
View raw message