Suggestion for setting web application parameters

Posted by user40730 on Programmers See other posts from Programmers or by user40730
Published on 2011-11-14T15:35:49Z Indexed on 2011/11/14 18:11 UTC
Read the original article Hit count: 206

Filed under:
|
|

I'm creating a web application on GWT. I'm using MVP pattern with activities and places. I have a xml config file containing some parameters to be used by the application. Content of this xml file is sent to the client using HttpRequest; I'm using a singleton class to hold the information from the xml file.

Right now, the application is getting the data when the user starts the application in the home page, that is working well. Now, since I'm using activities and places, a user can bookmark a page and starts the application in any other page (Place). And here comes the problem: Since I'm using some of the information from the xml file to set some ui widgets, I have to check if the xml config file was read and the application already has the parameters (I do this by checking the singleton class). But the xml file is read by using an HttpRequest, so I got errors 'cause the application needs some parameters to initialize some ui widgets, but these parameters aren't ready on time.

I was thinking on using an synchronous request to fix the problem, but it seems complicated and not recommendable to do that. So, I'd like to hear some other suggestions.

Thanks.

© Programmers or respective owner

Related posts about configuration

Related posts about gwt