Originally Posted by
Vladimir
It is not required with Ext.Net because UI is built in Ext.onReady event (when all resources are loaded and DOM tree is ready) therefore moving scripts to the end will give you nothing
I believe what you're describing is execution order, not load (thus compilation) order. The reason the profiling services recommend moving javascript loads to the end is to allow objects in the dom to be made available sooner. Granted that makes more sense in a non-ajax environment where all the dom is not rendered in runtime, but there are other reasons in SEO as well. For instance, I have a number of public pages that use content sections that are not rendered dynamically on the client-side so crawlers can read the critical text and terms close to the top of the page.
Of course, I can move the ResourcePlaceHolder for ScriptFiles to the end, but the problem this causes is compilation order will fail if I have any xscripts in the htmlbin of any objects that refer to Ext objects or calls. In other words, they'll reference libraries that won't have been loaded yet.
The only way to get this all to settle is getting xscript objects to be rendered at the end of the page (or at a placeholder after the scriptfiles placeholder). Linked would be even better.
Moreover, its probably easier and faster to minify all of the javascript code in the stream as one blob instead of multiple if and when that functionality becomes available... which I think was part of this original thread suggestion.
The best implementation would be to minify in ext.net internally. ASP.NET 4.5 has features to do this but none that I know I can work out of XScripts given the way you've implemented the write streaming engine.