Building a dynamically generated configuration UI using reflection on .NET Config Datatypes -
has got experience / attempted this?
we have reasonably complex xml config our .net application , thinking nice if use our config object hierarchy dynamically build ui, using reflection , attributes/meta-data properties on these objects present options user produce configuration.
it nice make quite generic, can provide .net xml config object (within reason) , reflect on , allow populated.
you need think config files in .net for. place defining differences between different deployments of application. when talk dynamically altering config based on coded logic, think might have wrong way round. code should taking direction settings injected via configuration.
it seems looking build kind of config editor? why when visual studio has 2 built in? edit window , various configuration editors, asp.net configuration editor, microsoft service configuration editor etc.
in experience, differences between web or app.config in dev environment vs test environment vs production environment typically differ few settings, such connection strings, appsettings, message queue addresses, service endpoints, log4net settings etc.
okay, quite few settings, in each block of config, there 1 or 2 attributes differ environment environment. exception ioc config, such spring.net, castlewinsor or unity. then, these same environment environment.
i encourage go away , think bit. think actual problem trying solve. perhaps in need of database driven workflow? don't know.
i know config should not driven runtime code. deployment , build-time thing.
having said that, there tools such configgen, makes generating environment-specific configuration breeze. check out when need.
Comments
Post a Comment