?
Solved

Have you used Design Pattern (C#) in your project?

Posted on 2012-08-30
8
Medium Priority
?
1,210 Views
Last Modified: 2012-08-31
One of my interview questions was 'Have you used Design Pattern (C#) in your project?'. Though I've used only singleton pattern so far in my project I was managed to explain that alone. I've read more articles to explain other patterns theoretically. But he wanted to explain the scenarios and patterns with code.

If you have used design pattern in your projects please do explain the scenario you used and please do provide your code. So that I could get better idea.

Thanks.
0
Comment
Question by:Easwaran Paramasivam
  • 3
  • 3
  • 2
8 Comments
 
LVL 4

Expert Comment

by:TI2Heaven
ID: 38350013
Please check this nice guide.
0
 
LVL 4

Expert Comment

by:TI2Heaven
ID: 38350891
I do not recommend this link but I am sending to you because I know for other questions you asked that you are interested in an example of Entity Framework with other design patterns.
0
 
LVL 16

Author Comment

by:Easwaran Paramasivam
ID: 38353082
Experts,

 I'm looking for practical usages of Design pattern in your project. So that I could know better.
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 2000 total points
ID: 38353105
Well, there are many situations where you implicitly use patterns:
- For example, most GUI libraries are based on some specific patterns, like MVC and MVVM.
- WCF may enforce you to use some specific patterns, as described in the article pointed by TI2Heaven.
- Also there are lots of Factory pattern usages in the .net library.
- If you have implemented your own interface you are already using a pattern

So, it is almost impossible not to use a pattern. Just review a pattern list like Gang-of-Four's and try to relate them with your own experience.
0
 
LVL 16

Author Comment

by:Easwaran Paramasivam
ID: 38353126
Thanks. Your points make sense. What I'm looking for is that where we do explicitly create/use design pattern. In which situation we use which pattern? In any of your projects if you implemented explicitly please do explain in detail. If sample code there, then that would be great.
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 2000 total points
ID: 38353143
Well, in that case, if somebody ask you in an interview: have you used design patterns? then you should answer honestly: No, I haven't.
What's the point of asking for other's experience?
Regarding examples, that's very easy to google:
http://www.google.com/search?q=DESIGN+PATTERN+EXAMPLES
0
 
LVL 16

Author Closing Comment

by:Easwaran Paramasivam
ID: 38353295
Thanks.
0
 
LVL 4

Expert Comment

by:TI2Heaven
ID: 38353718
They are great answers Jaime, both of them!.
I would like to add some of my thinking about this topic.
You are not a greater programmer if you just follow these patterns, and ask you which one fits better in each particular case. I have readied I few books about software architecture (Gang-of-Four's is in my must read queue) and I don’t see this patterns as the perfect guide to make good programs a see this patterns as a way to question your programming style and a way to question the need of your favorite language structures (c#). So, Yes to study all design patterns but No to follow them as the bible.
Knowing about other language environment is also profitable because you will see different options taken in language design (C++, Java, Net Language, SQL language, JavaScript, SVG, …).
Design Patterns assume that a good general purpose language is enough to program anything. I am not agree with the previous sentence, to program the sprinkles of your back yard, general purpose language is not the language best suited in doing it.
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question