In the example you've given, GWT would compile the shared code into
the module containing the Widgets, so there is only one copy.
Furthermore, any unused methods in the libraries are not compiled or
downloaded, as the GWT compiler eliminates dead code.

Furthermore, you can break up an app into multiple pieces that get
loaded "just in time" with
http://code.google.com/webtoolkit/doc/latest/DevGuideCodeSplitting.html

HTH,
/dmc

On Wed, Dec 15, 2010 at 12:14 PM, clintjhill <[email protected]> wrote:
> I'll ask the same question in a different way.
>
> There are 2 widgets. The first is for Alerts and the second is for
> Messages.
>
> Both share a library for their services (get/parse JSON data).
> Both share a library for their UI (extending GWT or composites).
> Both are separate GWT projects (code base is separate).
>
> When both are compiled they both receive separate JavaScript for the
> following same things:
>
> 1. GWT core
> 2. library for services
> 3. library for UI
>
> When both are used on a single page you end up with essentially
> duplicated downloads from different JavaScript files. However the
> desire would be that the GWT core, service and UI libraries be
> "shared" and not downloaded twice.
>
> In this example - would GWT be chosen - or is this an example where
> GWT doesn't "fit"?
>
> On Dec 15, 10:05 am, "[email protected]" <[email protected]> wrote:
>> I see "Google Web Toolkit, Atlanta, GA USA" after your name, so I
>> expect that you are just the kind of person whose opinion I'm looking
>> for... What say you?
>
> --
> 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.
>
>



-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
http://googlewebtoolkit.blogspot.com/

-- 
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.

Reply via email to