Hi, Thx for the reply. since we are taking about async loading of script i have one more question here, could it be possible that a module can load a script asynchronously a calss from another module? im thinking more like an interface will be defined the Module-A and and the implementation calss is available in Module-B and the Module-A will be able to load the implementation from Module-B?
Thank you, bala. On Sat, Oct 10, 2009 at 3:36 PM, Alyxandor < [email protected]> wrote: > > > > > Is there a way i can try these? the documents i got along with the > milestone > > download doesn't contain anything about 2.0 Milestone 1 and its Features? > i > > was hoping if some one could point me to examples of Declarative UI and > Code > > Splitting examples? > > > Check the mail sample for declarative UI, for runAsync(), > > http://groups.google.com/group/Google-Web-Toolkit-Contributors/browse_thread/thread/eb9c8cf046cbaaf2 > . The whole process is rather simple; call > GWT.runAsync(new RunAsyncCallback(){ > onFailure(){Window.alert("Failed to load application"); > onSuccess(){ > GuiStuffOrWhatever.init(); > //... > } > }); > > Whatever code that is referenced inside the GuiStuffOrWhatever class, > but NOT outside that class, will be chunked into a delayed download. > Using lots and lots of interfaces instead of full objects will make > your initial download full of basic prototype rules that all your > specific objects will share, and will not need to re-download / wait > for other implementations to be initialized. Basically, if you've > been careful to keep your specialized modules separated into unique > packages and reduced dependencies / use interfaces instead of full > object references, you should be able to take full advantage of this. > If all your code references all your other code over and over again, > you won't get much more use out of runAsync other than to have a nice > splash "loading" page while you do your monolithic onModuleLoad() code > inside a single runAsync(new RunAsyncCallback(){}); call. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
