Click below for Step by Step and Interview Q & A (dotnetinter) wrote,
Click below for Step by Step and Interview Q & A
dotnetinter

Design pattern interview questions with answers

What is Design Pattern?
They are reusable solutions for commonly occurring software development (programming).

Why we need them?


  • Reusability increase the productivity.

  • It brings up the common vocabulary across problems and solutions.

Example – Let’s say a developer stuck with something and he expects a solution from another developer.

Developer 2’s reply – Create a class, create a constructor inside it, make it private, and create a static method inside it…. (Many more steps).

Do you really feel this is the best of giving solution?

Let me ask you a question. What do you call your best friend? A guy with black hair, fairy skin, tall….Or you just call him by his name. People’s name really make our life easy.
In the same way if every solution is named and documented somewhere it will also make our software development life easy.
For instance above solution suggested by developer 2 we call as Singleton design pattern. Next time when someone asks the same question he reply “please implement singleton pattern”.
Easier and better way than talking in terms of classes, methods…etc

How many design patterns there?
There are around 23 design patterns brought up by GOF(Gang of four) categorized into three groups. Creational, Structural and Behavioral. But with time industry, technology everything evolved. Many new patterns introduced like repository pattern. Many got deprecated like iterator pattern.

Is it must to implement design patterns? I mean to say, it is true that for a particular problem we should always implement design pattern?

No, Design pattern should not be used forcefully. It should be altered depending on the problem statement and context we are.

You can also watch the below video on Design pattern’s



Please subscribe to our videos on www.questpond.com

For live trainings on Design patterns visit www.Sukesh-Marla.com
Tags: csharp interview questions, design pattern interview questions, factory pattern interview questions, it interview questions with answers, programming interview questions
Subscribe

  • How to create an OLAP Cube?

    This article will have no theory rather than it will have only be demonstrating practical step by step in detail included to create SSAS OLAP Cube:…

  • Instrumentation is SSIS using Data Taps

    In this short article we will hover around some important questions related to Instrumentation done in SSIS using Data Taps. We will only discuss…

  • Create job using SQL Server Agent step by step.

    In MSBI while working on SSIS projects we have to run repetitive task which has to carried out daily like running package or to take weekly backup…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments