Re: Has anyone used design patterns in his/her C#.NET project?
- From: "Gregory A. Beamer" <NoSpamMgbworld@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 17 Aug 2009 15:22:38 -0700
Curious <fir5tsight@xxxxxxxxx> wrote in news:9190855b-b317-41c1-8f25-
fa90e95a6a89@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
yes, I use patterns rather religiously.
A business associate asked me what design patterns ("Gang of Four") I
used in designing my software system.
Although I read the entire book about Design Pattern, I never
explicitly used any pattern in my design. For instance, when I design
my trading system, I have many instances of "Order" and "Execution". I
simply "new" each to create a new instance without labeling this as
"Factory" pattern.
And you might only have one type of order and execution throughout your
entire process and not currently need the flexibility of a factory.
Where I routinely use factories is on communication type libraries.
Examples:
Short Url Library uses a factory to determine which short url site API
to use. Configured in the config file.
Data Access library has a factory for database type.
Even trickier, generic LINQ to SQL library (meaning uses generics) has a
factory to retrieve DataContext.
Another pattern I use often is a singleton. Almost every application has
some information that is only applicable once for all users. The
Singleton allows you to spin it up once and reuse.
I asked around my developer friends, no one explicitly has used any
design pattern in their work. Do I miss anything here? Shall I think
of using design patterns next time when I develop a new system?
Possibly, but when you first get started you will be tempted to over
design pattern things, which can be just as bad. A better approach is
building in refactoring time and refactor to patterns (which is a great
book, btw).
Peace and Grace,
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com
*******************************************
| Think outside the box! |
*******************************************
.
- Follow-Ups:
- Re: Has anyone used design patterns in his/her C#.NET project?
- From: Hillbilly
- Re: Has anyone used design patterns in his/her C#.NET project?
- References:
- Prev by Date: Re: Logging exceptions from an external process
- Next by Date: Re: Has anyone used design patterns in his/her C#.NET project?
- Previous by thread: Re: Has anyone used design patterns in his/her C#.NET project?
- Next by thread: Re: Has anyone used design patterns in his/her C#.NET project?
- Index(es):
Relevant Pages
|