Object Creational Patterns and Instantiation
page 3 of 10
by Brian Mains
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 14894/ 154

Creational Patterns

Armed with the above type-instantiation information, we can apply this to patterns and how they are used.  Especially in .NET applications, classes can make use of dynamic references, which are most often defined in the configuration file.  Within this file it is possible to specify a string containing the type name and assembly, similar to how you see it already in the .NET Framework.  Using the Type.GetType method, it is possible to obtain a reference to the type, if the framework can resolve it.  And from this, we have our basis for dynamically retrieving the object reference.

Now we begin to look at the creational patterns that are available.  If you are aware of the book "Design Patterns" by Gamma et. al, this book specifies five creational patterns that are most widely used when designing software.  We will look at some of those, and perhaps a few others.  Note, most patterns avoid directly instantiating an object through the constructor, and so the constructor is often declared private or internal.  It is up to you to determine whether you want to expose the constructor, or to instantiate through another means.  Let us begin by looking at the design patterns.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 8 and 2 and type the answer here:

User Comments

Title: bill   
Name: bob
Date: 12/8/2007 10:59:02 AM
Comment:
can you put more advertisemens on this page ! it is a piece of crap

Product Spotlight
Product Spotlight 






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2009 ASPAlliance.com  |  Page Processed at 11/21/2009 10:13:12 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search