Advantages and disadvantages of using Enterprise Library

前端 未结 4 1018
遇见更好的自我
遇见更好的自我 2021-02-01 18:11

Im just starting a project and since this project is personal I was wondering what are the advantages of using Enterprise Library? We use the version 2 for several projects in t

4条回答
  •  误落风尘
    2021-02-01 18:53

    My team did an evaluation of the Microsoft Patterns and Practices Enterprise Library about 2 years ago as part of a re-engineering of our product line. The only part we ended up using was the database block. We even wrapped that in some classes that we could instantiate so we could mock out the DAL for unit testing; the Microsoft code block used static calls for database work. I am not sure if Microsoft has integrated any of the LINQtoSQL or Entity Framework stuff into the db block. I would be hesitant to use the db block now if it did not leverage one of those.

    As far as logging goes, we found Log4Net to be a much more robust and flexible solution that the Microsoft logging. We went with that for our logging needs.

    For exception handling, we rolled our own. The Microsoft code did not handle the remoting cases we wanted to handle, and since we were using a 3rd party logging framework it made more sense to write our own exception library and integrate with that. I have found that some level of integration of the logging framework into the exception framework can be very useful. We wrote some lightweight wrapper classes around Log4Net and called those from our exception logging so we didn't introduce dependencies on Log4Net.

提交回复
热议问题