On Dec 12, 2006, at 1:22 AM, Jorge Godoy wrote: >> MochiKit's bigger, if you're using an all-in-one MochiKit.js, but >> MochiKit's >> also modular if you want to use it that way. > > It is hard to use it modularly with our current implementation... > If we need > it our widgets will call the packed version... If we start > splitting things > as needed for widgets then we might end up loading things twice...
Hmmm, I'm going to play with this idea when (re)packing MochiKit into a TW... TW allows JSLinks & JSSources to have a "javascript" attribute like other widgets have, JS* included there will get into the page *before* the Link/Source itself. This means that a JS* can list it's dependencies there so they get automatically included in the template. Maybe MochiKit can be splitted so it's DOM, Signal, Base, etc... modules live in different files (can this be done? I mean, does MK function properly if splitted in this way?). TW should take care of pulling MK.Base, MK.Style and MK.Iter into the template if a widget requires MK.DOM (for example). However, I'm not sure of the net benefit of this... surely total page size will drop, but I've seen many places that recommend joining all JS (and CSS) into a single file for lower load on the server... I guess a "mochikit_full" will keep everyone happy :) Alberto --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
