[dojo-contributors] Tentative agenda for today meeting

Richard Backhouse backhous at us.ibm.com
Wed Oct 3 11:30:24 EDT 2012


I'll let Adam answer whether Maqetta can handle loading it via a script
tag.

I will look into seeing if Zazl's AST parsing code can be enhanced to
resolve the define call however it seems to be such an edge case scenario.

Richard


                                                                                                                       
  From:       Christophe Jolif <cjolif at gmail.com>                                                                      
                                                                                                                       
  To:         "dojo dev." <dojo-contributors at mail.dojotoolkit.org>,                                                    
                                                                                                                       
  Date:       10/03/2012 11:21 AM                                                                                      
                                                                                                                       
  Subject:    Re: [dojo-contributors] Tentative agenda for today meeting                                               
                                                                                                                       





Well I like Maqetta so I would really prefer Maqetta to do the safe thing
which is to not load this as AMD :) (even if we "allow" it for not breaking
existing apps)

Now if you really insist to keep your code as is and even if I don't like
that idea we can maybe study this.

In any case it would be a temporary solution as at some point we will
revisit deviceTheme and either force it for to be loaded as a script or as
Ben suggested rely on some kind of CSS plugin. Just to say that you will
anyway have to change things at some point.

Also I'm far from being a Dojo loader/build expert so I would worry
hardcoding a module ID in a file without studying that more. Can other
comments? Is that a reasonable thing to do? Wouldn't it possible to cause
issues for example when aliasing modules names or things like that by
hardcoding this?


Thanks,
--
Christophe

On Wed, Oct 3, 2012 at 4:59 PM, Richard Backhouse <backhous at us.ibm.com>
wrote:
  If that's the case then what is the harm with adding a module id to the
  define call :

  (typeof define === "undefined" ? function(id, deps, def) { def(); } :
  define)("dojox/mobile/deviceTheme", [



  "dojo/_base/config",
  "dojo/_base/lang",
  "dojo/_base/window",
  "require"
  ], function(config, lang, win, require){

  I know it's not recommended to hard code ids but I think this can be
  considered a special case, especially as loading via AMD is discouraged.
  This is the patch we use to get it loading in Maqetta with Zazl

  Richard

  Inactive hide details for Christophe Jolif ---10/03/2012 10:53:42
  AM---Richard,Christophe Jolif ---10/03/2012 10:53:42 AM---Richard,
                                                                           
                                                                           
       From:      Christophe Jolif <cjolif at gmail.com>                      
                                                                           
                                                                           
       To:        "dojo dev." <dojo-contributors at mail.dojotoolkit.org>,    
                                                                           
                                                                           
       Date:      10/03/2012 10:53 AM                                      
                                                                           
                                                                           
       Subject:   Re: [dojo-contributors] Tentative agenda for today       
                  meeting                                                  
                                                                           





  Richard,

  That code is just here is to _not_ totally break existing apps that might
  be doing that prior to our recommendation of _not_ doing it. I don't feel
  this would be reasonable to remove that code and totally breaking
  existing in a patch release.

  --
  Christophe

  On Wed, Oct 3, 2012 at 4:48 PM, Richard Backhouse <backhous at us.ibm.com>
  wrote:
        If it won't load via an AMD loader reliably then I suggest taking
        out the define call completely and make it only load via a script
        tag.

        BTW the Zazl issue has nothing to do with plugins. It's when you
        have code like what is in deviceTheme problems arise with
        dependency analysis

        (typeof define === "undefined" ? function(deps, def) { def(); } :
        define)([
        "dojo/_base/config",
        "dojo/_base/lang",
        "dojo/_base/window",
        "require"
        ], function(config, lang, win, require){



        Inactive hide details for Ben Hockey ---10/03/2012 10:39:12 AM---On
        Oct 3, 2012, at 9:26 AM, Christophe Jolif wrote:Ben Hockey
        ---10/03/2012 10:39:12 AM---On Oct 3, 2012, at 9:26 AM, Christophe
        Jolif wrote:
                                                                           
                                                                           
       From:      Ben Hockey <neonstalwart at gmail.com>                      
                                                                           
                                                                           
       To:        "dojo dev." <dojo-contributors at mail.dojotoolkit.org>,    
                                                                           
                                                                           
       Date:      10/03/2012 10:39 AM                                      
                                                                           
                                                                           
       Subject:   Re: [dojo-contributors] Tentative agenda for today       
                  meeting                                                  
                                                                           







        On Oct 3, 2012, at 9:26 AM, Christophe Jolif wrote:

        > Adam,
        >
        > On Wed, Oct 3, 2012 at 4:05 PM, Adam L. Peller <adam at peller.org>
        wrote:
        >
        >> Could your team take another look at
        >> http://trac.dojotoolkit.org/ticket/15901 whether for 1.8.1 or
        1.8.2?
        >> It's a blocker for Maqetta, and we had to fork the repository to
        get
        >> around it.
        >
        > Maybe Eric will have a different stance on this. But to me from
        our
        > past experience this is really not a good idea to load that piece
        of
        > JavaScript as an (asynchronous) AMD module (that might change in
        the
        > future if we are able to get notified on CSS loading but as of
        today
        > this might well end up in initialization nightmare, especially
        when
        > running in a container like Cordova) so I'm wondering why Maqetta
        > seems to be reluctant to use it as recommended which, if I'm not
        > mistaken, would solve the issue without having to change Dojo?
        >

        i agree with christophe, i've had exactly the same experience.
        this file does not work when loaded asynchronously via a loader.

        if you have never seen this issue, the things i found that
        exacerbated the problem was to do a build and try to load an
        alternative theme to iPhone (which is the default so iirc sometimes
        it seemed like it was working) - i was using android.

        the only way this file works consistently is to add it as a
        separate script tag.  although this is inconvenient, i don't think
        changing it to suit static analysis is going to help - if anything
        it just makes it easier to use it in a way that doesn't work.

        as christophe eluded to, this file can't be loaded reliably by an
        asynchronous loader without knowing when the css is fully loaded -
        perhaps by using some kind of css plugin.  i believe zazl has
        difficulties with plugins (maybe i don't understand and it might be
        able to handle this case) so this doesn't seem like it would move
        you forward either.

        ben...

        _______________________________________________
        dojo-contributors mailing list
        dojo-contributors at mail.dojotoolkit.org
        http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors




        _______________________________________________
        dojo-contributors mailing list
        dojo-contributors at mail.dojotoolkit.org
        http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors



  --
  Christophe_______________________________________________
  dojo-contributors mailing list
  dojo-contributors at mail.dojotoolkit.org
  http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors



  _______________________________________________
  dojo-contributors mailing list
  dojo-contributors at mail.dojotoolkit.org
  http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors




--
Christophe_______________________________________________
dojo-contributors mailing list
dojo-contributors at mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20121003/32c8a1ed/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20121003/32c8a1ed/attachment-0002.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20121003/32c8a1ed/attachment-0003.gif 


More information about the dojo-contributors mailing list