Re: Separate modules for separate views?
On Sep 3, 2:33 am, Riley rileyl...@gmail.com wrote: Naturally, though I'd been looking for these answers for an hour before I posted here, I discovered that if I used the google plugin to create a new HTML page, it automatically configured whatever it needs to configure to support two separate HTML pages with different modules different entry points. It seems to be working. My only remaining question, then, is whether I'm right about how the compiler works. To rephrase: I have two modules, side by side in the same directory. They both have the client and shared directories as source. If module B hardly references any of the code in these folders, will the final module B compiled JS omit the unused code? Yes (just like it won't output code for, say, TabLayoutPanel, if you don't use it, but still use other widgets in the same package). I would however, for clearer/cleaner separation, make a Shared module and have A and B both inherit Shared, and put A's EntryPoint (and some or all other A-specific code) in a separate package from B's EntryPoint (which would live in a separator package than the Shared code). -- 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-tool...@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: Separate modules for separate views?
Instead of using multiple modules you can also used a single module. For your views you create an implementation for each role that your application requires. For example: CatalogView CatalogViewAdminImpl CatalogViewEnduserImpl The you use deferred binding to pick the right implementation. This will have the added benefit that the module will be split by the compiler. Each permutation will only contain the controls that are used by its implementations. So, if you have alot of extra control for the Admin role they won't bleed into the Enduser role. Downside is that the compile time scales linear with each role that you add. With 2 roles you will already compile 10 permutations with the standard settings. I guess, it's the same for multiple modules though. You also have to make sure, to recheck the user's roles on the server since it's rather trivial to trick the UI to display the admin role. On Sep 3, 11:52 am, Thomas Broyer t.bro...@gmail.com wrote: On Sep 3, 2:33 am, Riley rileyl...@gmail.com wrote: Naturally, though I'd been looking for these answers for an hour before I posted here, I discovered that if I used the google plugin to create a new HTML page, it automatically configured whatever it needs to configure to support two separate HTML pages with different modules different entry points. It seems to be working. My only remaining question, then, is whether I'm right about how the compiler works. To rephrase: I have two modules, side by side in the same directory. They both have the client and shared directories as source. If module B hardly references any of the code in these folders, will the final module B compiled JS omit the unused code? Yes (just like it won't output code for, say, TabLayoutPanel, if you don't use it, but still use other widgets in the same package). I would however, for clearer/cleaner separation, make a Shared module and have A and B both inherit Shared, and put A's EntryPoint (and some or all other A-specific code) in a separate package from B's EntryPoint (which would live in a separator package than the Shared code). -- 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-tool...@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.
Separate modules for separate views?
I'm making an application that will have two types of users, type A and type B. Type A users need MUCH MORE functionality than type B users - in fact, type B users will only be able to see a single screen, while type A will see more than ten. I don't want all of the stuff for type A users to be downloaded by type B users. However, I would like to reuse the code that type B *does* need for type A users, since they will also need it. Essentially, the B functionality is (very nearly) a subset of the A functionality. So it would make sense to me to make a module for type A and a module for type B, right? And then, have an A.html host page and a separate B.html host page. I want them to be in a single project because I'm using appengine and need them both to deploy simultaneously - otherwise, maybe I would just make them totally separate apps. Question 1: Does this separation make sense? Question 2: How do I achieve this separation? How do I make a separate module that also compiles to js? I started out with the B app pretty complete in an Eclipse project. Then, I added a module, A.gwt.xml, and included all of the same source paths, etc, as I saw in B.gwt.xml, but with a different EntryPoint. I am assuming that module B will not compile all of the additional A code, even though the A code is in the same directories, because the A code will never be called from the B entry point. Then I created A.html, and went to link to A.nocache.js... but I realized that no such file was being generated. How do I tell eclipse, or the gwt, or whomever, to please compile A.gwt.xml into a separate, runnable js file? Thanks for any help. I realize this might be a big question. Riley -- 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-tool...@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: Separate modules for separate views?
Naturally, though I'd been looking for these answers for an hour before I posted here, I discovered that if I used the google plugin to create a new HTML page, it automatically configured whatever it needs to configure to support two separate HTML pages with different modules different entry points. It seems to be working. My only remaining question, then, is whether I'm right about how the compiler works. To rephrase: I have two modules, side by side in the same directory. They both have the client and shared directories as source. If module B hardly references any of the code in these folders, will the final module B compiled JS omit the unused code? Or, since module B uses the entire client folder as a source folder, will all of that unused code for module A also get compiled into B? Thanks again, Riley On Sep 2, 7:07 pm, Riley rileyl...@gmail.com wrote: I'm making an application that will have two types of users, type A and type B. Type A users need MUCH MORE functionality than type B users - in fact, type B users will only be able to see a single screen, while type A will see more than ten. I don't want all of the stuff for type A users to be downloaded by type B users. However, I would like to reuse the code that type B *does* need for type A users, since they will also need it. Essentially, the B functionality is (very nearly) a subset of the A functionality. So it would make sense to me to make a module for type A and a module for type B, right? And then, have an A.html host page and a separate B.html host page. I want them to be in a single project because I'm using appengine and need them both to deploy simultaneously - otherwise, maybe I would just make them totally separate apps. Question 1: Does this separation make sense? Question 2: How do I achieve this separation? How do I make a separate module that also compiles to js? I started out with the B app pretty complete in an Eclipse project. Then, I added a module, A.gwt.xml, and included all of the same source paths, etc, as I saw in B.gwt.xml, but with a different EntryPoint. I am assuming that module B will not compile all of the additional A code, even though the A code is in the same directories, because the A code will never be called from the B entry point. Then I created A.html, and went to link to A.nocache.js... but I realized that no such file was being generated. How do I tell eclipse, or the gwt, or whomever, to please compile A.gwt.xml into a separate, runnable js file? Thanks for any help. I realize this might be a big question. Riley -- 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-tool...@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: Separate modules for separate views?
No, but GWT recommended us to merge trivial modules into one TOP module to make sure the loaded sequence. Undoubtedly, your way is correct as well. I have a project with the same logic, and for it, I created several Layouts and swiched them on TOP module via commands from server-side code that responsible to access right -- 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-tool...@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.