> And I could have a module without an EntryPoint, as I understand it. Yes. Useful for common utility classes, UI components, authentication framework, etc.
> > Or you can have one GWT module that > > itself includes and arranges other GWT modules (the sub-applications). > > Perhaps a *really* stupid question, but how do I do that? Let's try a concrete example. Feel free to specify something closer to what you want. I think you want to have a bunch of applications, each of which could run on its own, but you also want a "housing" application that provides navigation, etc. and decides which sub- applications to include in the UI. Yes? One way to do this: 1. Make a core GWT module. It defines an "Application" abstract class that inherits from GWT's Composite class. 2. Make the "housing" GWT module. It provides the high-level UI with navigation, etc. and placeholders for one or more Application instances. 3. Make additional GWT modules, each containing a concrete sub-class of Application. These are your "sub-applications". They each define an EntryPoint, useful for testing them on their own, but mainly you will instantiate each Application as a UI component in the "housing" application. Your Application base class will probably define methods like getTitle (), getPreferredSize(), which your "housing" app might find useful. Depending on how you determine which sub-applications should be included, you could for example have a Servlet which generates the appropriate HTML depending on some parameters. > I didn't realize a GWT module could load another one itself. In your GWT module definition (XML), you specify all other modules upon which this module depends. The GWT compiler uses this information. But this is likely not the "loading" to which you refer. > Well, I'd just as soon not have one big .war file that everyone is whacking > away on. For one thing, I'd like to use Maven to version the various > artifacts. In my dumb example, assume the presence of some sort of housing > artifact (.war, probably), the finance app artifact (another .war? something > else?), the order app artifact (another .war? something else?) that get > pulled together and aggregated into some sort of distribution unit that gets > sent off to clients. Each client may get a different distribution unit made > up of these building blocks. Yup, should be doable (see above for a simplified example). How do you determine which client gets which building blocks? I think you are free to decide how you wish to package these sub- applications, i.e. modules. You can put them all in one WAR, or you can put them in separate WAR's. Once a WAR is in a J2EE container, the .js files etc. that make up the module are all accessible by URL's ... That said, you should pay attention to where you define your server- side code, aka servlets. Will each module have its own? Will there be a separate module that contains all the server-side code? Will they be servlets that are not part of a module? Depending on how you work this out, it will be easier or more difficult to resolve the appropriate back-end URL's to be called from your asynchronous data access methods in the client-side code. > > To make this work well, you should set up each module to be packaged > > into its own JAR file (which is how GWT library modules are > > distributed), which then can be included by the developer. > > Ah, OK. I need to do some more reading; I did not realize that GWT library > modules could be distributed as jar files. If I can do that--as in, work in > isolation in a corner somewhere, set up a stupid little hosted war > environment to test things out with, but then only distribute my end product > as a jar file--to be combined together with my other teams' jar files and > aggregated together into the final war file--that would probably work well. > > I'm sure it's in front of me somewhere, but do you have a pointer to get me > started on this packaging method? Hmm, best I can come up with now is to read the "Loading Modules" section on the following page, where it indicates that they are loaded from the usual classpath. Also read the section titled "Loading multiple modules in an HTML host page": http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html#DevGuideModules Note how GWT's core classes are packaged, as a .jar file. Also, look at 3rd party GWT modules, and some from Google, such as what is here: http://code.google.com/p/gwt-google-apis/ > Thanks very much for your time and help; it is greatly appreciated. You're welcome, good luck! > > Best, > Laird --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---