Re: General question about project architecture.
Thanks for the replies, guys, and yes that's a great explanation! We're very new to GWT. So, clearly we're learning these ins and outs.
Unfortunately, we started with a Struts2-based application, and we're only adding new "screens" in GWT as they come up. I'll have to think about it, but it's kind of hard to see, right now, how I can consolidate those into a single module. I definitely can see the benefits, now that you've explained it, though.
Thanks again,
Dave
rjcarr wrote:
Great explanation Sri, I just wanted to add that you could also do both. In my project, I have two GWT entry points (and about 5 GWT modules for sharing / reuse), but I also have another 4-5 "regular" web pages with static content. You need to decide the portions of your site that require the dynanicism of GWT and the portions that will suffice with plain old HTML. Mostly likely, only a small portion of your site will require GWT. On Nov 14, 3:50�am, Sripathi Krishnan <sripathi.krish...@gmail.com> wrote:Multiple modules is the wrong way to use GWT. GWT highly recommends using a single module. Most of the performance optimizations GWT does relies on the fact that you have a single, monolithic module. Plus, as you observed, the time to build your application keeps growing as you add more modules, so it doesn't scale well. Part of the problem is deciding whether you are building a "Web App" or a "Web Site". Lots of discussions<http://www.clyral.com/za/pages/web/website_vs_webapplication.html>can be found on this topic. GWT is great if you want to build a Web App. Typically, there is only a single HTML page, and different "screens" are manipulated on the client side using DOM. But if you are building a traditional, multi-page Web Site (nothing wrong with that), then GWT is not for you. You are better off using one of the many javascript libraries. So, lets assume you decide you want to build a web-app, and want to use GWT to do so. To get started, stick to a single HTML page with a single GWT Module/Entry Point. Adding multiple "screens" is adding a new FlowPanel or Composite with your content. Or perhaps, you have all "screens" built into the original HTML page, and you just hide/unhide the divs based on user action. The above approach works well if you have a few (say less than 10) screens. If your application grows bigger and more complex, you would want to start following some established patterns. The MVP pattern has been touted as the "way to build web-apps". Just do a google search, there are a lot of articles on that subject. Also, catch Ray Ryan's talk on GWT Architecture and best practices<http://code.google.com/events/io/2009/sessions/GoogleWebToolkitBestPr...>. --Sri 2009/11/13 David C. Hicks <dhi...@i-hicks.org>Specifically, I'm curious about the use of GWT Modules in a project.Each time we have a new "screen" to create, we have been adding a new module to our project. �Of course, with each new module, there is an additional build cycle to generate the Javascript for that module. �What I'm wondering is if this is normal, or does it make more sense to try to build up whole applications in a single module and perhaps keep the build time down? �Each new module we add appears to increase our build time by about 1.5 minutes. �It won't be long and this will be way beyond painful.Any thoughts? Thanks, Dave--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+unsubscribe@googlegroups.com<google-web-toolkit%2Bunsubs cribe@googlegroups.com> . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=.-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home