On Oct 30, 7:01 pm, John Simons <[email protected]> wrote: > I think it would be nice to make the registration of local/remote libs > more explicit in code, instead of xml (jslibraries.xml ). > I would consider adding them in global.asax.cs, what do u think?
Hmmm.. I hadn't thought about that. The trick is that the xml file maps the keyword to the path within the website, so a third-party VC couldn't handle registering completely on it own -- It would need to know the internal structure of the site. However, adding a in-code registeration method should be simple. > Regarding "combine", in your scenarios, combine is tricky, because if > page1 needs jsQuery.js + myscript.js(dynamiclly added via VC1) and > then page2 needs jsQuery.js + myotherscript.js(dynamiclly added via > VC2), we would get jQuery.js repeated and cached twice on the client. This is true. Since that it allows some files to be loaded from google's CDN (and possibly others in the future), I was planning on excluding anything from a CDN from being combined, but otherwise I hadn't given much thought to the problem. Adding a new attribute to the <library /> tag to exclude individual file is a possiblity. > Another feature I am considering, is to include if present a js file > for each action or even controller and/or area, and VCs, all via > convention eg: I've actually started implementing a similar feature, using the "self" keyword, i.e.: #component(Javacript with "Std=self, tabs, wmd") But I guess making it automatic based on the existance of the file would work too. Although I do it just based on the Action, and I put those file under the javascript folder (e.g. /javascript/views/home/ index.js). Making that an option would be easy as well, but here we're beginning to get to "configuration over convention". -- You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en.
