Hey, that's the point! The idea of putting the extjs sources in public folder is a little bit heavy and not very useful. 2 days ago, I posted a question exactly about the same subject.
Isn't it possible to have one directory in your webapp/application where you point your modules to it? I was thinking not to point to a different domain, rather than to directory inside your application. D. On Tue, Mar 31, 2009 at 10:36 PM, Gabriel Gutierrez <[email protected]>wrote: > > Well this is just a tip not a question. > > Today I was doing an application and i realice that when you use GWT- > Ext the .war sizes more than a megabit because of the ext-js files and > the libraries. > > So the first and dummy thing, was to move all libraries to the common > server lib folder. (reduces a lot). If you do only this, the > application still will size more than a mega. > > So if your production or wharever server is in another country and you > need to go under internet or a VPN you still need to pass more than a > mega, and without a good brandwith it could take some time, so this > can help a bit, not much but is something. > > For the ext-js files i came with this: > > 1.- I build another web project that only have js-ext files inside the > webcontent folder, lets called it "resources" > > resources.war > + WEB-INF > + web.xml > + METAINF > + js (this is the folder where all ext-js files are) > > then create the war and uploaded into the web server, this war will > size about 600 Kb > > Remove any welcome file, cuz this will be for .js, .css and images, so > there shouldn't be any .html or .jsp files here, if you dont do this > nothing will happen is just to reduce a bit the size of this file. > > Then in the app project, locate the module.gwt.xml file and add the > full path of the ext-js resources, something like > > <module> > <stylesheet src="http://IP.AD.DR.ESS<:PORT>/resources/js/ext/ > resources/css/ext-all.css" /> > <script src="http://IP.AD.DR.ESS > <:PORT>/resources/js/ext/adapter/ext/ > ext-base.js" /> > <script src="http:/IP.AD.DR.ESS<:PORT>/resources/js/ext/ext-all.js" > / > > > /* ... other stuff here .... */ > </module> > > And finally test your app, > > Here are some good point that i see by doing this. > > + You don't need to add ext-js files in every application you do. > + Application's size gets reduced in a significant way (4.7 megas from > gwt-servlet, gwt-user and gwt-ext libs, and about 600 Kb from ext-js > file) > + If you want to change ext-js version, just replace the resources.war > project, there is no need to change/restart the rest of the > applications (imaging havin 5 o more applications to update) > > Disadvantages so far... > > + An outside project can use your server as a resource server (but > this will happen too in the normal way). > > If you have any comment ( and i know this is a bit dummy, but i wanted > to post it) or disagrees, please do it. > > I tested in a local and remote servers and it worked so far. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "GWT-Ext Developer Forum" 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/gwt-ext?hl=en -~----------~----~----~----~------~----~------~--~---
