Re: MVC + Command Pattern + Code Splitting?
Check out GWTP: http://code.google.com/p/gwt-platform/ On Aug 1, 5:28 pm, gktcs tdotstew...@gmail.com wrote: Has anyone been able to get complete code splitting working with gwt- dispatch or similar command pattern implementation? We've got a rather large MVC-based application, and our code splitting is done at the Controller level. The code splitting works great-- neither the Controller nor the View will be loaded unless the associated module has been explicitly requested. We use gwt-dispatch (with SecureDispatchAsync) to provide our communication with the server. Everything works great with gwt-dispatch, except that *all* of our Request (Action) and Result objects are compiled into the initial download, instead of being included in the split point which contains the associated Controller and View. We're using SecureDispatchAsync in the startup module to load some basic startup information, but all of the other Request/Result pairs are isolated to their corresponding Controller. The GWT SOYC report shows that all of the Request and Result objects are being included in the initial download. Given the large-ish number of Action/Result objects we have, this is adding significant bulk to our initial application download size. I've read around and asked on the gwt-dispatch group and it seems like no one has had to use code splitting and the command pattern; so far, the only answers I've been able to find were (a) had to get rid of gwt- dispatch/command pattern, (b) just accept the increased size, or (c) it could be related to this issue:http://code.google.com/p/google-web-toolkit/issues/detail?id=2374. Just curious as to what others are doing, or if someone has found a way around this problem Thanks -- 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.
Aw: MVC + Command Pattern + Code Splitting?
I can't really remember gwt-dispatch as I use a custom command pattern and no framework..but in general the only thing you can do is to provide multiple dispatch services, e.g. one per application module. Each dispatch service would then use a different command base interface. So if you have two app modules mod1, mod2 then you would have - Mod1DispatchService(Mod1Command command, ...) - Mod2DispatchServce(Mod2Command command, ...) Inside mod1 you will always use Mod1DispatchService and commands that extend Mod1Command and in mod2 the mod2 counter parts. No cross references! So instead of one global generic dispatch service you will have several more specific ones. If you can't do that with gwt-dispatch then well..you have to live with the code size or get rid of gwt-dispatch. Also make sure you do not use List or any generic interfaces inside your commands unless you really need to. This will also increase your code size as GWT will generate serializer classes for all implementations of List. BTW these generated serializer classes are the problem why you cant code split like you want to. The generated dispatch service contains a map with all types (all implementations of your base command interface) used in your service methods and their corresponding serializer classes. And because of that map every command will be in the initial download. -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/_SZEn2OdXPEJ. 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.
Re: MVC + Command Pattern + Code Splitting?
same problem here +1 I have been thinking a lot about this and I don't think there is a simple solution. A custom rpc generator with node detection that load all the node's dependencies inside a GWT.runAsync is the only thing I could think of, but I didn't try to implement it yet. In the gwt-dispatch case(or any rpc-command implementation), every action is a node, so the first time we execute each action we load and register the action and response dependencies. On Tue, Aug 2, 2011 at 9:52 AM, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: +1 2011/8/1 gktcs tdotstew...@gmail.com Has anyone been able to get complete code splitting working with gwt- dispatch or similar command pattern implementation? We've got a rather large MVC-based application, and our code splitting is done at the Controller level.The code splitting works great-- neither the Controller nor the View will be loaded unless the associated module has been explicitly requested. We use gwt-dispatch (with SecureDispatchAsync) to provide our communication with the server. Everything works great with gwt-dispatch, except that *all* of our Request (Action) and Result objects are compiled into the initial download, instead of being included in the split point which contains the associated Controller and View. We're using SecureDispatchAsync in the startup module to load some basic startup information, but all of the other Request/Result pairs are isolated to their corresponding Controller. The GWT SOYC report shows that all of the Request and Result objects are being included in the initial download. Given the large-ish number of Action/Result objects we have, this is adding significant bulk to our initial application download size. I've read around and asked on the gwt-dispatch group and it seems like no one has had to use code splitting and the command pattern; so far, the only answers I've been able to find were (a) had to get rid of gwt- dispatch/command pattern, (b) just accept the increased size, or (c) it could be related to this issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=2374. Just curious as to what others are doing, or if someone has found a way around this problem Thanks -- 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. -- 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. -- Guit: Elegant, beautiful, modular and *production ready* gwt applications. http://code.google.com/p/guit/ -- 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.
MVC + Command Pattern + Code Splitting?
Has anyone been able to get complete code splitting working with gwt- dispatch or similar command pattern implementation? We've got a rather large MVC-based application, and our code splitting is done at the Controller level.The code splitting works great-- neither the Controller nor the View will be loaded unless the associated module has been explicitly requested. We use gwt-dispatch (with SecureDispatchAsync) to provide our communication with the server. Everything works great with gwt-dispatch, except that *all* of our Request (Action) and Result objects are compiled into the initial download, instead of being included in the split point which contains the associated Controller and View. We're using SecureDispatchAsync in the startup module to load some basic startup information, but all of the other Request/Result pairs are isolated to their corresponding Controller. The GWT SOYC report shows that all of the Request and Result objects are being included in the initial download. Given the large-ish number of Action/Result objects we have, this is adding significant bulk to our initial application download size. I've read around and asked on the gwt-dispatch group and it seems like no one has had to use code splitting and the command pattern; so far, the only answers I've been able to find were (a) had to get rid of gwt- dispatch/command pattern, (b) just accept the increased size, or (c) it could be related to this issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=2374. Just curious as to what others are doing, or if someone has found a way around this problem Thanks -- 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.