SlideShare a Scribd company logo
1 of 5
Download to read offline
1. Difference between Factory Pattern and Abstract Factory Pattern

 S.No    Factory Pattern                            Abstract Factory Pattern
 1       Create object through inheritance          Create object through composition
 2       Produce only one product                   Produce families of products
 3       Implements code in the abstract creator    Concrete factories implements factory
         that make use of the concrete type that    method to create product
         sub class produces

2.Difference between Abstract Factory Pattern And Builder Pattern

 S.No    Builder Pattern                            Abstract Factory Pattern
 1       In Builder Pattern, there will be one      Abstract Factory Pattern will return the
         Director class which will instruct Builder instance directly.
         class to build the different
         parts/properties of our object and finally
         retrieve the object.
 2       It will have reference to the created      It does not keep the track of it's created
         object.                                    object.

3.Difference between Builder Pattern And Composite Pattern

 S.No    Builder Pattern                            Composite Pattern
 1       It is used to create group of objects of   It creates Parent - Child relations between
         predefined types.                          our objects.

4.Difference between MVC and MVP


 S.No    MVP                                        MVC
 1       MVP is a bit more complex to               MVC is easier to implement than MVP.
         implement than MVC .Also, it has
         additional layer for view interfaces.
 2       The request is always received by the      The request is received by the controller
         View and delegated to the presenter        which in turn gets the required data and
         which in turn gets the data does the       loads up the appropriate view
         processing
 3       The presentation and view logic an be      The controller logic can be unit tested.
         unit tested as the view is loosely         Note: We can unit test view if we are using
         coupled.                                   Razor view engine. ASPX viewengine are
                                                    not that easily unit testable
 4       MVP is best suitable for Windows           MVC is best suitable for Web Programming.
         Programming as the flow naturally tend
         towards this pattern.
5.Difference between Proxy Pattern and Observer Pattern

 S.No     Proxy Pattern                                 Observer Pattern
 1        The Proxy Pattern is used for wrapping a The Observer Pattern is used by a publisher
          kind of special object with 1 or more    object to notify subscriber objects with
          other objects.                           information.
 2        Either because we don't always have the       The publisher object does not know the
          wrapped object or because it needs to be      subscribing objects - except that the
          managed in a certain way that can be          conform to a certain subscriber interface.
          simplified via the proxy object(s). This is   This is a very flexible pattern for
          kind of a way to exchange the API of an       distributing events, since those that wants to
          existing class with a proxy class. We are     listen on certain object has the power to do
          not just talking events here, but whatever    so without changing the code of the
          kind of functionality to define via the       publishing object.
          proxy object instead of the real object.

6. Difference between Singleton Pattern and a static class

 S.No     Singleton Pattern                             static class
 1        Singleton pattern maintains single            We cannot create instance for static class.
          instance.
 2        A singleton can extend classes and            A static class cannot .
          implement interfaces.                         Note: It can extend classes, but it does not
                                                        inherit their instance members.
 3        A singleton can be initialized lazily or      A static class is generally initialized when it
          asynchronously.                               is first loaded, leading to potential class
                                                        loader issues.
 4        Singletons can be handled                     static class cannot be handled
          polymorphically without forcing their         polymorphically.
          users to assume that there is only one
          instance.
 5        Singleton Class can have value when      Static are always just shared and have no
          Class object instantiated between server instance but multiple references.
          and client, such a way if three client
          want to have a shared data between them
          Singleton can be used.Thats why
          singleton class can be used for state
          mangement in stateless scenarios like
          shopping cart scenario.
 6        We can pass singleton object as               We cannot pass parameter in static class
          parameter
 7        Singleton provides flexibility and also       Static classes once defined could not
          provides sort of a mechanism to control       accomodate any future design changes as by
          object creation based on various              design static classes are rigid and cannot be
          requirements. They can be extended as         extended.
          well if need arises. In other words we
          are not always tied to a particular
          implementation. With Singleton we
have the flexibility to make changes as
         when situation demands.

7.Difference between Strategy and Inversion of Control (IOC)


 S.No    Strategy Pattern                          Inversion of Control (IOC) Pattern
 1       The strategy pattern is useful when we    Inversion of Control/Dependency Injection
         want classes to depend on the interface   (IoC/DI) comes into play when we want the
         rather than the implementation.And we     concrete strategy implementation injected
         can easily swap out behavior depending    into a class. For example, we could use the
         on which concrete implementation we       DI Framework Ninject and configure it so
         provide.                                  that it will know which concrete strategy
                                                   implementation to inject into a class in
                                                   specific scenarios.

                                                   Note: Strategy is just one of the ways that
                                                   IOC is implemented

8.DIfference between IDictionary and Dictionary


 S.No    IDictionary                               Dictionary
 1       IDictionary is just a contract, abstraction Dictionary is concrete implementation.
 2       It is recommended for example to expect Argument or Property is not required for
         as argument an IDictionary rather than   Dictionary.
         concrete Dictionary, or to expose
         property of IDictionary rather than
         Dictionary, because this promotes loose
         coupling. Than we are able to change
         underlying objects in the future without
         affecting those who use your object.

9.Difference between Factory Pattern and Dependency Injection


 S.No    Factory Pattern                           Dependency Injection(DI)
 1        Factory is used to create objects        DI is used to move the responsibility of
                                                   creating an object outside the main code.
 2                                                 Some of the well known framework
                                                   available for DI are

                                                   1.   Unity Application Block (Microsoft)
                                                   2.   Ninject
                                                   3.   StructureMap
                                                   4.   Castle Windsor
                                                   5.   Munq/Funq
                                                   6.   Autofac
10.Difference between String.Clone() and String.Copy() method

 S.No    String.Clone()                                String.Copy()
 1       Returns a reference to this instance of       Creates a new instance of String with the
         String.                                       same value as a specified String.

         i.e., it gives pointer value(ie Current       i.e., it creates an instance in Heap Memory
         memory Reference)                             and gives pointer value(ie New Memory
                                                       Reference)

11.Difference between Strategy Pattern and Factory Pattern

 S.No    Strategy Pattern                              Factory Pattern
 1       Strategy's sole intent to is to provide a Factory's sole purpose is to create objects .
         mechanism to select different algorithm.

 2       We cannot use "strategy" to create            We can use "factory" to create objects of
         objects of "factory".                         "strategy".

12.Difference between Proxy and Adaptor

 S.No    Proxy Pattern                                 Adaptor Pattern
 1       Proxy on the other hand represents a          Adapter is used to adapt to incompatible
         standin object for the real object. This is   interfaces. It's more directed from the client
         required when the real object is complex      (those who consume the object) perspective.
         to create, is not available, or for           A client expects an interface to be of
         authentication purpose. For e.g. web          particular type and adapter plays a role in
         service proxy, proxy authentication           filling that gap.
         server etc.
                                                       It's more from making it easier for the client
         Proxy can be categorized into                 to adapt to other third party libraries within
                                                       there own by adapting to it.
         Virtual Proxy
         Remote Proxy
         Protection Proxy

13.Difference between Decorator and Visitor

 S.No    Decorator Pattern                             Visitor Pattern
 1       Decorator may have just a single object       Visitor has a tree of objects to be worked
         to customize.                                 upon.
 2       Decorator does not require a traverser        Visitor requires a traverser for successful
         for successful implementation.                implementation.
 3       Decorator pattern is a structural pattern     Visitor pattern is Behavioral pattern that
         that help us to add new function to an        seperate the data structure from the
         object in the run time , note that in the     operation (functionality ) that work on it ,
         run time not design time .                    this mean we can add different operation on
                                                       the same data structure
Design patterns   difference between interview questions

More Related Content

What's hot

Unit 2(advanced class modeling & state diagram)
Unit  2(advanced class modeling & state diagram)Unit  2(advanced class modeling & state diagram)
Unit 2(advanced class modeling & state diagram)Manoj Reddy
 
Java Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | EdurekaJava Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | EdurekaEdureka!
 
Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan GoleChetan Gole
 
Component Diagram Example Templates
Component Diagram Example TemplatesComponent Diagram Example Templates
Component Diagram Example TemplatesCreately
 
Introduction to design patterns
Introduction to design patternsIntroduction to design patterns
Introduction to design patternsAmit Kabra
 
Java Course 11: Design Patterns
Java Course 11: Design PatternsJava Course 11: Design Patterns
Java Course 11: Design PatternsAnton Keks
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1Shahzad
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design PatternSanae BEKKAR
 
The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern PresentationJAINIK PATEL
 
Presentation facade design pattern
Presentation facade design patternPresentation facade design pattern
Presentation facade design patternBayu Firmawan Paoh
 
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling LanguageShahzad
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General IntroductionAsma CHERIF
 

What's hot (20)

Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Unit 2(advanced class modeling & state diagram)
Unit  2(advanced class modeling & state diagram)Unit  2(advanced class modeling & state diagram)
Unit 2(advanced class modeling & state diagram)
 
Java Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | EdurekaJava Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | Edureka
 
Facade pattern
Facade patternFacade pattern
Facade pattern
 
Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan Gole
 
Facade Design Pattern
Facade Design PatternFacade Design Pattern
Facade Design Pattern
 
Component Diagram Example Templates
Component Diagram Example TemplatesComponent Diagram Example Templates
Component Diagram Example Templates
 
Composite Design Pattern
Composite Design PatternComposite Design Pattern
Composite Design Pattern
 
Introduction to design patterns
Introduction to design patternsIntroduction to design patterns
Introduction to design patterns
 
Java Course 11: Design Patterns
Java Course 11: Design PatternsJava Course 11: Design Patterns
Java Course 11: Design Patterns
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design Pattern
 
The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern Presentation
 
Presentation facade design pattern
Presentation facade design patternPresentation facade design pattern
Presentation facade design pattern
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling Language
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Composite design pattern
Composite design patternComposite design pattern
Composite design pattern
 

Viewers also liked

Java Design Pattern Interview Questions
Java Design Pattern Interview QuestionsJava Design Pattern Interview Questions
Java Design Pattern Interview Questionsjbashask
 
Design Patterns Via C# 3.0
Design Patterns Via C# 3.0Design Patterns Via C# 3.0
Design Patterns Via C# 3.0Mohamed Meligy
 
Top 9 design pattern interview questions answers
Top 9 design pattern interview questions answersTop 9 design pattern interview questions answers
Top 9 design pattern interview questions answershudsons168
 
software engineering
software engineeringsoftware engineering
software engineeringTayfun Çelik
 
Java Design Patterns: The State Pattern
Java Design Patterns: The State PatternJava Design Patterns: The State Pattern
Java Design Patterns: The State PatternAntony Quinn
 
JAVA design patterns and Basic OOp concepts
JAVA design patterns and Basic OOp conceptsJAVA design patterns and Basic OOp concepts
JAVA design patterns and Basic OOp conceptsRahul Malhotra
 
01 software test engineering (manual testing)
01 software test engineering (manual testing)01 software test engineering (manual testing)
01 software test engineering (manual testing)Siddireddy Balu
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - CoreDzmitry Naskou
 
29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview QuestionsArc & Codementor
 
Manual Testing
Manual TestingManual Testing
Manual TestingG.C Reddy
 
Software Development Trends 2017 at IMC
Software Development Trends 2017 at IMCSoftware Development Trends 2017 at IMC
Software Development Trends 2017 at IMCSomkiat Puisungnoen
 
Software engineering lecture notes
Software engineering lecture notesSoftware engineering lecture notes
Software engineering lecture notesSiva Ayyakutti
 
Manual testing interview question by INFOTECH
Manual testing interview question by INFOTECHManual testing interview question by INFOTECH
Manual testing interview question by INFOTECHPravinsinh
 
Uml Interview Questions
Uml Interview QuestionsUml Interview Questions
Uml Interview QuestionsRaj Chanchal
 

Viewers also liked (17)

Java Design Pattern Interview Questions
Java Design Pattern Interview QuestionsJava Design Pattern Interview Questions
Java Design Pattern Interview Questions
 
Design Patterns Via C# 3.0
Design Patterns Via C# 3.0Design Patterns Via C# 3.0
Design Patterns Via C# 3.0
 
Top 9 design pattern interview questions answers
Top 9 design pattern interview questions answersTop 9 design pattern interview questions answers
Top 9 design pattern interview questions answers
 
Uml tutorial
Uml tutorialUml tutorial
Uml tutorial
 
software engineering
software engineeringsoftware engineering
software engineering
 
Uml tutorial
Uml tutorialUml tutorial
Uml tutorial
 
Java Design Patterns: The State Pattern
Java Design Patterns: The State PatternJava Design Patterns: The State Pattern
Java Design Patterns: The State Pattern
 
JAVA design patterns and Basic OOp concepts
JAVA design patterns and Basic OOp conceptsJAVA design patterns and Basic OOp concepts
JAVA design patterns and Basic OOp concepts
 
01 software test engineering (manual testing)
01 software test engineering (manual testing)01 software test engineering (manual testing)
01 software test engineering (manual testing)
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions
 
Manual Testing
Manual TestingManual Testing
Manual Testing
 
Design pattern with Java 8
Design pattern with Java 8Design pattern with Java 8
Design pattern with Java 8
 
Software Development Trends 2017 at IMC
Software Development Trends 2017 at IMCSoftware Development Trends 2017 at IMC
Software Development Trends 2017 at IMC
 
Software engineering lecture notes
Software engineering lecture notesSoftware engineering lecture notes
Software engineering lecture notes
 
Manual testing interview question by INFOTECH
Manual testing interview question by INFOTECHManual testing interview question by INFOTECH
Manual testing interview question by INFOTECH
 
Uml Interview Questions
Uml Interview QuestionsUml Interview Questions
Uml Interview Questions
 

Similar to Design patterns difference between interview questions

OOPs difference faqs- 2
OOPs difference faqs- 2OOPs difference faqs- 2
OOPs difference faqs- 2Umar Ali
 
Mac/iOS Design Patterns
Mac/iOS Design PatternsMac/iOS Design Patterns
Mac/iOS Design PatternsRobert Brown
 
ASP.NET Difference FAQs
ASP.NET Difference FAQsASP.NET Difference FAQs
ASP.NET Difference FAQsUmar Ali
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignIrwansyah Irwansyah
 
Introduction to dependency injection in Scala (Play)
Introduction to dependency injection in Scala (Play)Introduction to dependency injection in Scala (Play)
Introduction to dependency injection in Scala (Play)Knoldus Inc.
 
Jump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design PatternJump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design PatternNishith Shukla
 
Jump Start To Ooad And Design Patterns
Jump Start To Ooad And Design PatternsJump Start To Ooad And Design Patterns
Jump Start To Ooad And Design PatternsLalit Kale
 
Dependency Inversion in large-scale TypeScript applications with InversifyJS
Dependency Inversion in large-scale TypeScript applications with InversifyJSDependency Inversion in large-scale TypeScript applications with InversifyJS
Dependency Inversion in large-scale TypeScript applications with InversifyJSRemo Jansen
 
Dotnet difference questions & answers Compiled-1
Dotnet difference questions & answers Compiled-1Dotnet difference questions & answers Compiled-1
Dotnet difference questions & answers Compiled-1Umar Ali
 
Oleksandr Valetskyy - Become a .NET dependency injection ninja with Ninject
Oleksandr Valetskyy - Become a .NET dependency injection ninja with NinjectOleksandr Valetskyy - Become a .NET dependency injection ninja with Ninject
Oleksandr Valetskyy - Become a .NET dependency injection ninja with NinjectOleksandr Valetskyy
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkASG
 
The 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryThe 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryguestebd714
 
The 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryThe 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryachraf_ing
 
Silverlight difference faqs- 2
Silverlight difference faqs- 2Silverlight difference faqs- 2
Silverlight difference faqs- 2Umar Ali
 
Design Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityDesign Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityShubham Narkhede
 

Similar to Design patterns difference between interview questions (20)

OOPs difference faqs- 2
OOPs difference faqs- 2OOPs difference faqs- 2
OOPs difference faqs- 2
 
Mac/iOS Design Patterns
Mac/iOS Design PatternsMac/iOS Design Patterns
Mac/iOS Design Patterns
 
ASP.NET Difference FAQs
ASP.NET Difference FAQsASP.NET Difference FAQs
ASP.NET Difference FAQs
 
Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven Design
 
Introduction to dependency injection in Scala (Play)
Introduction to dependency injection in Scala (Play)Introduction to dependency injection in Scala (Play)
Introduction to dependency injection in Scala (Play)
 
Jump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design PatternJump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design Pattern
 
Jump Start To Ooad And Design Patterns
Jump Start To Ooad And Design PatternsJump Start To Ooad And Design Patterns
Jump Start To Ooad And Design Patterns
 
Sda 8
Sda   8Sda   8
Sda 8
 
Dependency Inversion in large-scale TypeScript applications with InversifyJS
Dependency Inversion in large-scale TypeScript applications with InversifyJSDependency Inversion in large-scale TypeScript applications with InversifyJS
Dependency Inversion in large-scale TypeScript applications with InversifyJS
 
Dotnet difference questions & answers Compiled-1
Dotnet difference questions & answers Compiled-1Dotnet difference questions & answers Compiled-1
Dotnet difference questions & answers Compiled-1
 
Oleksandr Valetskyy - Become a .NET dependency injection ninja with Ninject
Oleksandr Valetskyy - Become a .NET dependency injection ninja with NinjectOleksandr Valetskyy - Become a .NET dependency injection ninja with Ninject
Oleksandr Valetskyy - Become a .NET dependency injection ninja with Ninject
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
What is design pattern
What is design patternWhat is design pattern
What is design pattern
 
The 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryThe 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summary
 
The 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryThe 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summary
 
Silverlight difference faqs- 2
Silverlight difference faqs- 2Silverlight difference faqs- 2
Silverlight difference faqs- 2
 
Java unit 7
Java unit 7Java unit 7
Java unit 7
 
Spring 2
Spring 2Spring 2
Spring 2
 
Design Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityDesign Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur University
 

More from Umar Ali

Difference between wcf and asp.net web api
Difference between wcf and asp.net web apiDifference between wcf and asp.net web api
Difference between wcf and asp.net web apiUmar Ali
 
Difference between ActionResult() and ViewResult()
Difference between ActionResult() and ViewResult()Difference between ActionResult() and ViewResult()
Difference between ActionResult() and ViewResult()Umar Ali
 
Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4Umar Ali
 
Difference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvcDifference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvcUmar Ali
 
Difference between asp.net web forms and asp.net mvc
Difference between asp.net web forms and asp.net mvcDifference between asp.net web forms and asp.net mvc
Difference between asp.net web forms and asp.net mvcUmar Ali
 
ASP.NET MVC difference between questions list 1
ASP.NET MVC difference between questions list 1ASP.NET MVC difference between questions list 1
ASP.NET MVC difference between questions list 1Umar Ali
 
Link checkers 1
Link checkers 1Link checkers 1
Link checkers 1Umar Ali
 
Affiliate Networks Sites-1
Affiliate Networks Sites-1Affiliate Networks Sites-1
Affiliate Networks Sites-1Umar Ali
 
Technical Video Training Sites- 1
Technical Video Training Sites- 1Technical Video Training Sites- 1
Technical Video Training Sites- 1Umar Ali
 
US News Sites- 1
US News Sites- 1 US News Sites- 1
US News Sites- 1 Umar Ali
 
How to create user friendly file hosting link sites
How to create user friendly file hosting link sitesHow to create user friendly file hosting link sites
How to create user friendly file hosting link sitesUmar Ali
 
Weak hadiths in tamil
Weak hadiths in tamilWeak hadiths in tamil
Weak hadiths in tamilUmar Ali
 
Bulughul Maram in tamil
Bulughul Maram in tamilBulughul Maram in tamil
Bulughul Maram in tamilUmar Ali
 
Asp.net website usage and job trends
Asp.net website usage and job trendsAsp.net website usage and job trends
Asp.net website usage and job trendsUmar Ali
 
Indian news sites- 1
Indian news sites- 1 Indian news sites- 1
Indian news sites- 1 Umar Ali
 
Photo sharing sites- 1
Photo sharing sites- 1 Photo sharing sites- 1
Photo sharing sites- 1 Umar Ali
 
File hosting search engines
File hosting search enginesFile hosting search engines
File hosting search enginesUmar Ali
 
Ajax difference faqs compiled- 1
Ajax difference  faqs compiled- 1Ajax difference  faqs compiled- 1
Ajax difference faqs compiled- 1Umar Ali
 
ADO.NET difference faqs compiled- 1
ADO.NET difference  faqs compiled- 1ADO.NET difference  faqs compiled- 1
ADO.NET difference faqs compiled- 1Umar Ali
 
Dotnet differences compiled -1
Dotnet differences compiled -1Dotnet differences compiled -1
Dotnet differences compiled -1Umar Ali
 

More from Umar Ali (20)

Difference between wcf and asp.net web api
Difference between wcf and asp.net web apiDifference between wcf and asp.net web api
Difference between wcf and asp.net web api
 
Difference between ActionResult() and ViewResult()
Difference between ActionResult() and ViewResult()Difference between ActionResult() and ViewResult()
Difference between ActionResult() and ViewResult()
 
Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4
 
Difference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvcDifference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvc
 
Difference between asp.net web forms and asp.net mvc
Difference between asp.net web forms and asp.net mvcDifference between asp.net web forms and asp.net mvc
Difference between asp.net web forms and asp.net mvc
 
ASP.NET MVC difference between questions list 1
ASP.NET MVC difference between questions list 1ASP.NET MVC difference between questions list 1
ASP.NET MVC difference between questions list 1
 
Link checkers 1
Link checkers 1Link checkers 1
Link checkers 1
 
Affiliate Networks Sites-1
Affiliate Networks Sites-1Affiliate Networks Sites-1
Affiliate Networks Sites-1
 
Technical Video Training Sites- 1
Technical Video Training Sites- 1Technical Video Training Sites- 1
Technical Video Training Sites- 1
 
US News Sites- 1
US News Sites- 1 US News Sites- 1
US News Sites- 1
 
How to create user friendly file hosting link sites
How to create user friendly file hosting link sitesHow to create user friendly file hosting link sites
How to create user friendly file hosting link sites
 
Weak hadiths in tamil
Weak hadiths in tamilWeak hadiths in tamil
Weak hadiths in tamil
 
Bulughul Maram in tamil
Bulughul Maram in tamilBulughul Maram in tamil
Bulughul Maram in tamil
 
Asp.net website usage and job trends
Asp.net website usage and job trendsAsp.net website usage and job trends
Asp.net website usage and job trends
 
Indian news sites- 1
Indian news sites- 1 Indian news sites- 1
Indian news sites- 1
 
Photo sharing sites- 1
Photo sharing sites- 1 Photo sharing sites- 1
Photo sharing sites- 1
 
File hosting search engines
File hosting search enginesFile hosting search engines
File hosting search engines
 
Ajax difference faqs compiled- 1
Ajax difference  faqs compiled- 1Ajax difference  faqs compiled- 1
Ajax difference faqs compiled- 1
 
ADO.NET difference faqs compiled- 1
ADO.NET difference  faqs compiled- 1ADO.NET difference  faqs compiled- 1
ADO.NET difference faqs compiled- 1
 
Dotnet differences compiled -1
Dotnet differences compiled -1Dotnet differences compiled -1
Dotnet differences compiled -1
 

Recently uploaded

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Recently uploaded (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Design patterns difference between interview questions

  • 1. 1. Difference between Factory Pattern and Abstract Factory Pattern S.No Factory Pattern Abstract Factory Pattern 1 Create object through inheritance Create object through composition 2 Produce only one product Produce families of products 3 Implements code in the abstract creator Concrete factories implements factory that make use of the concrete type that method to create product sub class produces 2.Difference between Abstract Factory Pattern And Builder Pattern S.No Builder Pattern Abstract Factory Pattern 1 In Builder Pattern, there will be one Abstract Factory Pattern will return the Director class which will instruct Builder instance directly. class to build the different parts/properties of our object and finally retrieve the object. 2 It will have reference to the created It does not keep the track of it's created object. object. 3.Difference between Builder Pattern And Composite Pattern S.No Builder Pattern Composite Pattern 1 It is used to create group of objects of It creates Parent - Child relations between predefined types. our objects. 4.Difference between MVC and MVP S.No MVP MVC 1 MVP is a bit more complex to MVC is easier to implement than MVP. implement than MVC .Also, it has additional layer for view interfaces. 2 The request is always received by the The request is received by the controller View and delegated to the presenter which in turn gets the required data and which in turn gets the data does the loads up the appropriate view processing 3 The presentation and view logic an be The controller logic can be unit tested. unit tested as the view is loosely Note: We can unit test view if we are using coupled. Razor view engine. ASPX viewengine are not that easily unit testable 4 MVP is best suitable for Windows MVC is best suitable for Web Programming. Programming as the flow naturally tend towards this pattern.
  • 2. 5.Difference between Proxy Pattern and Observer Pattern S.No Proxy Pattern Observer Pattern 1 The Proxy Pattern is used for wrapping a The Observer Pattern is used by a publisher kind of special object with 1 or more object to notify subscriber objects with other objects. information. 2 Either because we don't always have the The publisher object does not know the wrapped object or because it needs to be subscribing objects - except that the managed in a certain way that can be conform to a certain subscriber interface. simplified via the proxy object(s). This is This is a very flexible pattern for kind of a way to exchange the API of an distributing events, since those that wants to existing class with a proxy class. We are listen on certain object has the power to do not just talking events here, but whatever so without changing the code of the kind of functionality to define via the publishing object. proxy object instead of the real object. 6. Difference between Singleton Pattern and a static class S.No Singleton Pattern static class 1 Singleton pattern maintains single We cannot create instance for static class. instance. 2 A singleton can extend classes and A static class cannot . implement interfaces. Note: It can extend classes, but it does not inherit their instance members. 3 A singleton can be initialized lazily or A static class is generally initialized when it asynchronously. is first loaded, leading to potential class loader issues. 4 Singletons can be handled static class cannot be handled polymorphically without forcing their polymorphically. users to assume that there is only one instance. 5 Singleton Class can have value when Static are always just shared and have no Class object instantiated between server instance but multiple references. and client, such a way if three client want to have a shared data between them Singleton can be used.Thats why singleton class can be used for state mangement in stateless scenarios like shopping cart scenario. 6 We can pass singleton object as We cannot pass parameter in static class parameter 7 Singleton provides flexibility and also Static classes once defined could not provides sort of a mechanism to control accomodate any future design changes as by object creation based on various design static classes are rigid and cannot be requirements. They can be extended as extended. well if need arises. In other words we are not always tied to a particular implementation. With Singleton we
  • 3. have the flexibility to make changes as when situation demands. 7.Difference between Strategy and Inversion of Control (IOC) S.No Strategy Pattern Inversion of Control (IOC) Pattern 1 The strategy pattern is useful when we Inversion of Control/Dependency Injection want classes to depend on the interface (IoC/DI) comes into play when we want the rather than the implementation.And we concrete strategy implementation injected can easily swap out behavior depending into a class. For example, we could use the on which concrete implementation we DI Framework Ninject and configure it so provide. that it will know which concrete strategy implementation to inject into a class in specific scenarios. Note: Strategy is just one of the ways that IOC is implemented 8.DIfference between IDictionary and Dictionary S.No IDictionary Dictionary 1 IDictionary is just a contract, abstraction Dictionary is concrete implementation. 2 It is recommended for example to expect Argument or Property is not required for as argument an IDictionary rather than Dictionary. concrete Dictionary, or to expose property of IDictionary rather than Dictionary, because this promotes loose coupling. Than we are able to change underlying objects in the future without affecting those who use your object. 9.Difference between Factory Pattern and Dependency Injection S.No Factory Pattern Dependency Injection(DI) 1 Factory is used to create objects DI is used to move the responsibility of creating an object outside the main code. 2 Some of the well known framework available for DI are 1. Unity Application Block (Microsoft) 2. Ninject 3. StructureMap 4. Castle Windsor 5. Munq/Funq 6. Autofac
  • 4. 10.Difference between String.Clone() and String.Copy() method S.No String.Clone() String.Copy() 1 Returns a reference to this instance of Creates a new instance of String with the String. same value as a specified String. i.e., it gives pointer value(ie Current i.e., it creates an instance in Heap Memory memory Reference) and gives pointer value(ie New Memory Reference) 11.Difference between Strategy Pattern and Factory Pattern S.No Strategy Pattern Factory Pattern 1 Strategy's sole intent to is to provide a Factory's sole purpose is to create objects . mechanism to select different algorithm. 2 We cannot use "strategy" to create We can use "factory" to create objects of objects of "factory". "strategy". 12.Difference between Proxy and Adaptor S.No Proxy Pattern Adaptor Pattern 1 Proxy on the other hand represents a Adapter is used to adapt to incompatible standin object for the real object. This is interfaces. It's more directed from the client required when the real object is complex (those who consume the object) perspective. to create, is not available, or for A client expects an interface to be of authentication purpose. For e.g. web particular type and adapter plays a role in service proxy, proxy authentication filling that gap. server etc. It's more from making it easier for the client Proxy can be categorized into to adapt to other third party libraries within there own by adapting to it. Virtual Proxy Remote Proxy Protection Proxy 13.Difference between Decorator and Visitor S.No Decorator Pattern Visitor Pattern 1 Decorator may have just a single object Visitor has a tree of objects to be worked to customize. upon. 2 Decorator does not require a traverser Visitor requires a traverser for successful for successful implementation. implementation. 3 Decorator pattern is a structural pattern Visitor pattern is Behavioral pattern that that help us to add new function to an seperate the data structure from the object in the run time , note that in the operation (functionality ) that work on it , run time not design time . this mean we can add different operation on the same data structure