tags:

views:

479

answers:

5

I have recently written a Hello World application using SmartGWT and noticed that the size of the application is huge. In my case it is over 600kb just for that application.

I think that size is obscene so I narrowed the culprit down to two core libraries, ISC_Core and ISC_Foundation which combine for a total size of 649kb. Is there anyway to reduce the bloat of these libraries?

Any help would be appreciated.

+2  A: 

Unfortunately you cannot, as SmartGWT have already stated here the size will remain constant or even increase. I tried SmartGWT but because of this issue and 3rd party framework integration problems I chose another framework.

A possible solution to their problem would be to introduce a dynamic JavaScript loader like is present in ZK. I have used it in my enterprise projects and it works very well.

Nowadays for smaller applications I tend to use jQuery directly.

Roger
+2  A: 

SmartGWT is not designed for Hello World applications, but for sophisticated enterprise applications that work with lots of entities and have lots of screens. In that use case, the final delivered size of a SmartGWT application is comparable, if not smaller, than the size you would get working with any other technology.

Basically if you tackle a larger-scale application like that with a flyweight technology, you end up with application code that re-creates the features that are already in SmartGWT. There's no bloat - SmartGWT is very compact on a features-per-byte basis - there's just more features.

If you really have an ultra-lightweight use case - say, adding minor interactivity to a web site that consists mostly of static content - then JQuery and other ultra-lightweight frameworks are the way to go. A lot of enterprises use a mixture of JQuery and SmartGWT/SmartClient, each for different purposes.

Charles Kendrick
+1  A: 

If the foot print is really important to you, you might consider Ext GWT. Ext GWT has everything done in Java (and compiled with GWT). It techincally could remove the codes that your application doesn't count on.

Mo
I thought gwt-ext is no longer maintained, having been replaced by SmartGWT
Michael Donohue
Trimming actually has very little effect in Ext GWT. Use a BorderLayout, Grid and some form controls, add an event handler or two, and you have an irreducible 600k core, similar to SmartGWT. You only get a small size with a meaningless demo (eg one Tab and one Button, no event handlers)
Charles Kendrick
Can't GWT code splitting be used with ExtGWT though?
Kango_V
A: 

As Charles stated you have to keep in mind that you actually build a rich client on a single HTML page, so it's loaded just once. You can preload the libraries on a login page where nobody notices it while he is entering the credentials.

Take a look at http://www.smartclient.com/docs/7.0rc2/a/b/c/go.html#group..networkPerformance

dube
A: 

I just started lkooking into parring down the core files, as I see in my small app that has a only three Canvas and no other widgets, compared to the SmartGWT Showcase website.

my ISC_Core.js = 623,000 showcase = 160,000 my ISC_Grid = 615,000 showcase = 155,000 my ISC_Foundation = 171,000 showcase = 46,000 my ISC_Forms.js = 516,000 showcase = 125,000

etc

Is this just a hack that makes us think smartgwt performs well or is there now a way to trim the files?

Scott