incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Mueller <pmue...@gmail.com>
Subject Re: Unified phonegap javascript layer incorperating modules / plugins
Date Fri, 18 Nov 2011 09:27:05 GMT
On Fri, Nov 18, 2011 at 02:50, Brian LeRoux <b@brian.io> wrote:

> So in short, CommonJS gives us:
>
> - better performance
> - better aesthetics
> - closer to the future
>

+1 on all that


> +1 for AMD
>

um, what? :-)

Seems pretty clear that we will have to easily tolerate AMD - I'm sure IBM
folk will be using Dojo, which uses AMD-style loading.  While we could try
what Node did for a couple weeks - implement a define() function - this
doesn't seem feasible as the API surface for define() is quite large; eg,
requireJS and Dojo both support "plugins" somehow.  But requireJS has some
kind of shim they can use to run in Node, and I suspect we would want to
aim for that shim also working with us.  Not clear to me if Dojo has a
similiar shim (dunno, but doubt they could share requireJS's shim).

Another nice things about using CommonJS/node style modules is that
consuming existing npm modules is a snap.  I've found this to be true for
some personal projects I've worked on, using modjewel, the CommonJS-styled
loader I use for weinre.

-- 
Patrick Mueller
http://muellerware.org

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