[Arp] Application configuration
nils.millahn at deltabravo.com
Wed May 4 04:10:52 PDT 2005
I was wondering about that too. What if the Application triggers the
loading of the config file and then waits until it has loaded before
doing something else?
settingsInstance:AppSettings = AppSettings.getInstance();
Application's AppSetingsLoaded event handler:
... continue initialisation...
That probably makes more sense. The only thing is that if any child
views also need config information (which is likely), they will also
have to wait before they initialisation themselves. They could listen
for that 'AppSettingsLoaded' event or simply be kicked into action by
the Application form...
If we make sure that the XML has loaded before using the AppSettings
class, then we wouldn't need to use callbacks when requestion specific
ALSO: Is there an existing design pattern for such a class? would be
nice to follow that instead of reinventing...
Christophe Herreman wrote:
> The ideal situation would be to have the config loaded before the
> Application's onLoad() fires. Would there be any way to achieve this?
> Making a singleton of it is probably a good idea.
> I might work something out in the coming days. As soon as I have
> something I'll post it.
> ----- Original Message ----- From: "Nils Millahn"
> <nils.millahn at deltabravo.com>
> To: "General List for Ariaware RIA Platform users and developers"
> <Arp at ariaware.com>
> Sent: Wednesday, May 04, 2005 12:49 PM
> Subject: Re: [Arp] Application configuration
>> I've also used config files extensively and think they are extremely
>> useful. Even if it's not included in ARP itself, we could figure out
>> a best-practice implementation while we're at it :)
>> As far as I can see the AppSettings class just needs to load an XML
>> file and then make the properties in that file easily available to
>> whoever wants them. The fact that the XML file needs to be loaded
>> makes life a bit more difficult because you can't guarantee that
>> properties are available when you need them. It might therefore make
>> sense to use callback functions, very similarly to how the Command
>> stuff works at the moment. In my mind, if we get that part right, the
>> rest will be very easy.
>> What about using a singleton AppSettings class that can be imported
>> and used wherever access to the config file is needed?
>> Just thinking aloud to get the ball rolling but I think it's worth
>> creating a specific implementation that we can share...
>> - Nils.
>> Christophe Herreman wrote:
>>> Hi guys,
>>> has anyone thought of or come up with a uniform way to do
>>> configuration settings for an ARP application? I was thinking to
>>> implement some of .NET's behavior with the app.config and the
>>> AppSettingsReader class.
>>> Any ideas?
>>> Arp mailing list
>>> Arp at ariaware.com
>> Arp mailing list
>> Arp at ariaware.com
> Arp mailing list
> Arp at ariaware.com
More information about the Arp