Book Image

ASP.NET 3.5 Social Networking

By : Andrew Siemer
Book Image

ASP.NET 3.5 Social Networking

By: Andrew Siemer

Overview of this book

Table of Contents (19 chapters)

Factory pattern using StructureMap


We discussed the factory pattern (under the Factories section) to help us in our efforts for loosely coupled objects of our application. We have also said that we plan to use a Test- Driven Development process. In order to achieve both of these easily, we will be using a framework called StructureMap. Get more information on http://structuremap.sourceforge.net/Default.htm. StructureMap is a dependency injection framework. Its primary goal is to help us to reduce the mechanical costs of good object-oriented design. It also helps us to have a more flexible application for testing purposes.

StructureMap is very easy to use. I have mostly covered how to get it set up in Appendix A at the end of the book. But if you don't want to read that now, I will give you a down and dirty here. Once you have downloaded the StructureMap files, add them to your bin directory. Then add a reference to the StructureMap in your projects. Add an XML file to your solution and share...