Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Microsoft's Application Blocks

I haven't done a lot of .NET programming, but I've examined a few of the application blocks published by Microsoft's Patterns and Practices group. I was wondering how these are typically used:

  • Linked directly into applications
  • Source added into applications and built with them, perhaps with some customization's
  • Sample code used as reference while writing application-specific code

I'm sure all three of these usages are common, but what are the most typical usage patterns?

Are there a few particular application blocks that are used by "everyone?"

Note: This question is related to, but not the same as Enterprise Library Application Blocks OR Home Grown Framework?.

like image 947
Kristopher Johnson Avatar asked Dec 30 '22 11:12

Kristopher Johnson


2 Answers

I have used Microsoft's Enterprise Library extensively. They generally should never be included within your project if possible. The added cost of compiling can be heavy. Additionally, there's no reason to have the source code in your project to use the classes. You will still get intellisence during coding as long as you add a reference to the DLL's in your projects. It is also advisable to avoid having multiple codebases floating around your developer environment. If you need to customize the classes, open them up in their own solution and keep one version active. Of course I always strongly suggest using version control (VSS or Subversion) in case you need to roll back changes.

There are also open source alternatives to the Microsoft classes that are usually better coded (i.e. Log4Net, nUnit, etc.). Microsoft code tends to be bloated and inefficient.

like image 150
Eric Avatar answered Jan 05 '23 16:01

Eric


I usually put the source into my project, and then I can get better intellisense (and a better understanding of them). I don't tend to customize them at all though. I like to have them stock so I can just distribute the stock binaries anytime I need them.

like image 44
GEOCHET Avatar answered Jan 05 '23 15:01

GEOCHET