简体   繁体   中英

Multiple entry-points in GWT Application: How does bootstrapping, History-Token and Place-Management work?

I have now splitted up my application into two major modules:

  1. Admin area
    Anything that is related to the administration area for some certain users.
  2. Landing page area
    The landing page for public users.

The reason why I have done this is because maybe one day it will be just easier to develop in two separate projects where each of them should be able to run as a standalone. Therefore both modules do have their own EntryPoint .

The things I am not sure about is how to handle eg the history and places of both of them. I am definitely going to have at least two ActivityManager to handle the different places of both modules but how can I eg separate the PlaceHistoryMapper into both modules?

Another thing I am not sure about is how I could bootstrap this application as such that each module is still able to run without the other.

And talking about bootstrapping: Can somebody tell my in which order onModuleLoad() is getting called? How can I make sure eh that running "main" EntryPoint gets executed first in order to initialize everything correctly before the others are getting called?

Short answer: don't do that (that just won't work, at least not without a considerable amount of error-prone work).

If you want to make it easier to split the project in two in the future, just make it modular. That's exactly what Activities are about.

Your PlaceHistoryMapper and ActivityMapper s are specific to one application, they're about how you tie everything together.
You can modularize them by making them delegate to other PlaceHistoryMapper s and ActivityMapper s.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM