Microsoft Enterprise Library
-
Hi, I really think that this lib is a good base for an app framework. The only problem I personally see is that you have to provide exception policiy and logging category names by string literals. One maybe tend to use string constants, better than nothing. But .net offers reflection, so there should be a way to get all those defined policiy and logging category names at the end of the day out of an assembly, right? This makes it type safe for coding and easy to config for admins as well. Possible scenario could be to generate app.config file with each policiy and loggin category name included for a default config. Did somebody write some attribute based code to use the Microsoft Enterprise Library features?
myMsg.BehindDaKeys = "Chris Richner";
-
Hi, I really think that this lib is a good base for an app framework. The only problem I personally see is that you have to provide exception policiy and logging category names by string literals. One maybe tend to use string constants, better than nothing. But .net offers reflection, so there should be a way to get all those defined policiy and logging category names at the end of the day out of an assembly, right? This makes it type safe for coding and easy to config for admins as well. Possible scenario could be to generate app.config file with each policiy and loggin category name included for a default config. Did somebody write some attribute based code to use the Microsoft Enterprise Library features?
myMsg.BehindDaKeys = "Chris Richner";
I'm sorry I don't see where the problem is, perhaps you could give some examples of what you mean. ExceptionPolicy.HandleException("MyPolicy", ex) vs. ExceptionPolicy.HandleException(MyClass.GetExcpetionPolicy(), ex) :confused::confused::confused::confused: The EntLib comes with the configuration editor. I personally consider it easier to configure an application this way then having to code it.
only two letters away from being an asset
-
I'm sorry I don't see where the problem is, perhaps you could give some examples of what you mean. ExceptionPolicy.HandleException("MyPolicy", ex) vs. ExceptionPolicy.HandleException(MyClass.GetExcpetionPolicy(), ex) :confused::confused::confused::confused: The EntLib comes with the configuration editor. I personally consider it easier to configure an application this way then having to code it.
only two letters away from being an asset
Hi Mark, The goal should be to retrieve all those defined names from a compiled assembly. Nobody can remember all defined names after the assembly is released, right? Imagine the defined config file get lost. In this case one have to watch in the code (MyClass.Getxx()) to make sure all defined names are configured well again. Not really handy if one is out there by a customer trying to setup the whole thing again. That's the reason way I like this attribute based solution, one could write a small tool that uses reflection to fetch all names out of the assemblies. To generate a config file containing all defined names is just a nice to have thing, of course. Thanks for your answer.
myMsg.BehindDaKeys = "Chris Richner";
-
Hi Mark, The goal should be to retrieve all those defined names from a compiled assembly. Nobody can remember all defined names after the assembly is released, right? Imagine the defined config file get lost. In this case one have to watch in the code (MyClass.Getxx()) to make sure all defined names are configured well again. Not really handy if one is out there by a customer trying to setup the whole thing again. That's the reason way I like this attribute based solution, one could write a small tool that uses reflection to fetch all names out of the assemblies. To generate a config file containing all defined names is just a nice to have thing, of course. Thanks for your answer.
myMsg.BehindDaKeys = "Chris Richner";
Chris Richner wrote:
Imagine the defined config file get lost.
Source Control :confused::confused:
Chris Richner wrote:
Not really handy if one is out there by a customer trying to setup the whole thing again.
Sorry but I wouldn't show up at the client site without all the tools and code necessary to recreat/redeploy the application
only two letters away from being an asset
-
Chris Richner wrote:
Imagine the defined config file get lost.
Source Control :confused::confused:
Chris Richner wrote:
Not really handy if one is out there by a customer trying to setup the whole thing again.
Sorry but I wouldn't show up at the client site without all the tools and code necessary to recreat/redeploy the application
only two letters away from being an asset
of course ;) it should just serve as an example... any way.. would be a handy thing to be able to get all cat names out of the compiled assembly... forget about the customer scenario :)
myMsg.BehindDaKeys = "Chris Richner";