Amit Khanna
Why we use Design Patterns?
Posted by Amit Khanna in Design & Architecture on Nov 25, 2012
  • 0
  • 2
  • 1396
Do you know the answer for this question? Post it below.
Posted by Munesh Sharma on Apr 16, 2014
  • 0

In some cases, for practicality. When you see a common recurring problem, you find a common, general solution to solve it. It happens in architecture, mechanics, usability, and human behavior, and programming makes no exception.

In some other cases, the pattern is also a way to deal with "inefficiencies" of the language, where "inefficiency" is very broad in its meaning, and not always in a bad term. For example, some patterns typically used in java are less important in a language where functions are first class objects. Some design patterns are meaningful only in some languages, and impossible in others: Crockford describes Javascript patterns that are kind of unique to this language to deal with the potential minefield-like nature of the language (which, I must point out, is a really cool language, once you understand it).

Posted by Vidya Vrat Agarwal on Dec 11, 2012
  • 0

Design patterns offer the best possible and time tested slution for a known problem which software programmers usually try to solve.

Think of a common problem, only one instance must exist, and so Singleton pattern comes for best possible solution.

2014© C# Corner. All contents are copyright of their authors.