3 Nov 2008 1:51 PM #1
about big generated xxxx.cache.html, >2M
I am newcomer about gxt and extjs.
I did a small test which contains a TabPanel which has two tabs. and each tab contains a BorderLayout. To my surprise, the generated .cache.html files are very big (>2M). Therefore, that's slow to visit the site in the first time, which is about 5,6 seconds.
Could you tell me some tricks and articles about how to use gxt in a better way?
4 Nov 2008 2:51 AM #2
I've not seen this - I'm using a lot of widgets (more than what you described) within an app and its only 500K which is reasonable considering most of the library is used.
How about you post an example app so we can compare?GXT JavaDocs: http://extjs.com/deploy/gxtdocs/
GXT FAQ & Wiki: http://extjs.com/learn/Learn_About_the_Ext_GWT_Library
Buy the Book on GXT: http://www.apress.com/book/view/9781430219408
Follow me on Twitter: http://twitter.com/gslender
4 Nov 2008 6:52 AM #3
4 Nov 2008 6:56 AM #4
4 Nov 2008 8:17 AM #5
When I build and compile your app, I get the following screen shot...
the *.cache.html files are all smaller than 340KB
Just curious, What versions (GXT and GWT) are you using, and what operating system?
4 Nov 2008 8:30 AM #6
4 Nov 2008 8:35 AM #7Can I use gwt+gxt in tomcat6?
Is it possible because of crypal studio plugin, which requires tomcat 5 (servlet 2.4)?
Darrell put a very good step-by-step procedure for setting up your project in Eclipse
(http://extjs.com/helpcenter/index.jsp) that might be of help.
4 Nov 2008 8:36 AM #8
4 Nov 2008 12:23 PM #9
I took out the cypal studio plugin in my eclipse and use gwt+gxt in a Java Project.
The generated html files are much smaller as you did, about 300K. That's perfect for me. thanks a lot, guys.
another question, I used to export the project into a war using cypal studio plugin in the eclipse. And drop the war into tomcat's webapp folder, which is very convinent. If I use Java project like now, do you guys have a easy way to do the deploy? are you using an ant build file? if so, could you share with me?
4 Nov 2008 1:12 PM #10
Yes, I was using ant to handle the building of the war.
Right now I'm using Maven2. I would really recommend Maven, but for simple builds I would use ant.
I have a few scripts you could use, but it's on my other computer
I can attach to this post when I return tomorrow.
Here are the basic steps you'll want to follow:
1. Have a folder where you plan to put everything (like... one named webapp)
2. Compile your Java source with javac and copy class/resource files to webapp/WEB-INF/classes
3. Copy your library files to webapp/WEB-INF/lib
4. Copy your web.xml file in webapp/WEB-INF
5. Compile and copy your GWT/GXT files (*.cache.html... et. al) into the webapp/ directory
6. Zip your webapp dir as a .war file.
Actually, find attached the build.xml file that darrell uses for the samples...