Last post Sep 17, 2010 05:40 PM by gabriel.lozano-moran
Sep 17, 2010 04:24 PM|CsharpAsp.net|LINK
I wanted to know which all design pattern have you used in your application. Just wanted to see a general idea of most commonly used, popular design patterns. I was going through this site"
and it has tons of design patters, I have heard about singleton and factory but not others.
So guyz which all popular efficient patterns are there and how would you determine which one suits your app. Can we make a app without a design pattern.
And lastly which one are the most simplest ones out there which are easier to implement.
Thanks for your time.
Sep 17, 2010 05:33 PM|HeartattacK|LINK
You don't design an app to match patterns - you find patterns that match your scenario and use whichever one seems appropriate. A lot of the times, you may need to be flexible in the implementations of those patterns so that they better server your needs.
Your needs don't serve patterns - the patterns serve you. As such, there's no pattern suited for all scenarios. WebForms is geared to Smart UI, MVC is used in ASP.NET MVC to separate concerns, MVVM is used in XAML based apps, MVP is used to make some codebehind
in WebForms or other Smart UI based presentation engines more testable, the Repository can help in simplifying data access, Specification may help in querying, Stategy and Visitor in simplifying complex business logic, Singletons can be used in thread safety
scenarios, Adapter, Bridge and Facade can be used to connect mismatching sections of a project or to the outside world, Infinite Data can make pagination seem instant, Unit of Work can help in change tracking and transaction management - the list goes on and
Sep 17, 2010 05:40 PM|gabriel.lozano-moran|LINK
There are all kinds of patterns that developers use on daily basis but honestly you should try to avoid to think in patterns otherwise you will meet the Golden Hammer:
Anyway there are many different categories of patterns and you have probably used many patterns without knowing it:
There are even anti-patterns.
A couple of often used patterns:
Data Transfer Object
Template Method Pattern
Like I mentioned earlier, it is impossible to know all patterns and if you start thinking in patterns it will drive you mad...