I am currently evaluating my options for a rewrite of the projects I'm working on and I am a bit miffed by the stringly-typed nature of our app.config files.
I'd like to move to a more structured approach, so I have two options:
I'd like to get your opinions and horror stories on this, what are the pros and cons of using XAML for this?
Cheers, Florian
If we are talking about config files I would use the app.config? Why? That's what it's meant for. If we are talking about resources (pictures, messages) I would put them in a XAML resource directory.
There is a guideline available on the web on where to put what, but was still in draft last time I checked and doesn't mention app.config afaik.
But do what works best for you :)
In terms of development effort is 6 of one half a dozen of the other.
If you use Xaml you will need to create a set of classes instances of which the Xaml will create.
If you using Custom SectionHandlers you will still need to create classes instances of which these sections will represent. You also need to create the SectionHandlers as well.
1 - 0 to Xaml.
In the case of Xaml though you will need to provide your own infrastucture to load the xaml at startup and access the configuration throughout your app.
On the other hand using Section Handlers the existing .NET ConfigurationManager provides the infrastrucure to access these.
1 all
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With