English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

can anybody tell me where,why and when i should use design patters in c# .net???

2006-12-14 22:25:46 · 2 answers · asked by raza_ami 2 in Computers & Internet Programming & Design

2 answers

Design patterns are not unique to .NET. They are a standard programmer's technique to bring in sound architectural patterns to your code as well as giving your application a healthy software lifecycle. ("Lifecycle" refers to a recurring set of the steps involved in the creation, testing, and deployment of an application through its origin and upgrades.)

Everything you'd ever want to know about the practical use of patterns and practices in a Microsoft development shop can be found here:

http://msdn.microsoft.com/practices/

2006-12-14 23:35:36 · answer #1 · answered by evolver 6 · 0 0

What Are Design Patterns?
"A pattern is a solution to a problem in a context"

"Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice."

Christopher Alexander - A Pattern Language

Patterns are not new, talking about them is.

Read excerpts from our book: Design Patterns Explained: A New Perspective on Object-Oriented Design that describes what design patterns are (click here).



Why study patterns?
There are three main reasons to study design patterns:

Learn already existing quality solutions.
During the lifecycle of a project, many of the problems faced will be fairly common problems. By being able to recognize these patterns you can take advantage of solutions that have been used by other software developers. Because many patterns are very well described now, you can take advantage of what other developers have already faced, including knowledge of consequences that may not be immediately apparent.


Learn existing terminology
Specialized terminology is all around us -- except perhaps in the area of design. If you are a basketball fan, you know what it means when someone says 'give and go'. For sailors, 'prepare to jibe' indicates a whole series of actions is about to take place. If you overhear carpenters talking about 'dove-tail joints' or 'tongue-and-groove' joints, you may not know what it means but you know it means something to them. The point is, terminology, or jargon, if you will, has the advantage being able to describe a solution or a situation with very few words -- but only if both people know what those words mean.


Learn to think in patterns
Patterns aren't intended just to be used individually. Patterns are really meant to be combined together. A pattern language , consisting of several patterns, describes how the patterns work together. Once one learns enough patterns, it is possible to raise one's conceptual view of her problem from working with classes and objects to working with the patterns into which these fall. This allows one to perform design from a different view. To paraphrase Christopher Alexander:
patterns are used as operators which differentiates space: creating distinctions where no distinction was before.

In other words, they allow us to begin our design at a conceptual view and work down. The patterns we use define the architecture and relationship of the classes involved for us.

2006-12-15 00:18:54 · answer #2 · answered by mohanasundaram s 1 · 0 0

fedest.com, questions and answers