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

Uml Presentation
Uml PresentationUml Presentation
Uml Presentationmewaseem
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSAshita Agrawal
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design patternMindfire Solutions
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramNikhil Pandit
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General IntroductionAsma CHERIF
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologiesnaina-rani
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentRishabh Soni
 
Software Architecture and Design
Software Architecture and DesignSoftware Architecture and Design
Software Architecture and DesignRa'Fat Al-Msie'deen
 
Class diagram- UML diagram
Class diagram- UML diagramClass diagram- UML diagram
Class diagram- UML diagramRamakant Soni
 
Component and Deployment Diagram - Brief Overview
Component and Deployment Diagram - Brief OverviewComponent and Deployment Diagram - Brief Overview
Component and Deployment Diagram - Brief OverviewRajiv Kumar
 
The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern PresentationJAINIK PATEL
 
Unit 5- Architectural Design in software engineering
Unit 5- Architectural Design in software engineering Unit 5- Architectural Design in software engineering
Unit 5- Architectural Design in software engineering arvind pandey
 
Software architecture
Software architectureSoftware architecture
Software architecturenazn
 
Design Pattern in Software Engineering
Design Pattern in Software EngineeringDesign Pattern in Software Engineering
Design Pattern in Software EngineeringManish Kumar
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagramRahul Pola
 

What's hot (20)

Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMS
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Domain Modeling
Domain ModelingDomain Modeling
Domain Modeling
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design pattern
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence Diagram
 
Design pattern
Design patternDesign pattern
Design pattern
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Adapter pattern
Adapter patternAdapter pattern
Adapter pattern
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologies
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software Development
 
Software Architecture and Design
Software Architecture and DesignSoftware Architecture and Design
Software Architecture and Design
 
Class diagram- UML diagram
Class diagram- UML diagramClass diagram- UML diagram
Class diagram- UML diagram
 
Component and Deployment Diagram - Brief Overview
Component and Deployment Diagram - Brief OverviewComponent and Deployment Diagram - Brief Overview
Component and Deployment Diagram - Brief Overview
 
The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern Presentation
 
Unit 5- Architectural Design in software engineering
Unit 5- Architectural Design in software engineering Unit 5- Architectural Design in software engineering
Unit 5- Architectural Design in software engineering
 
Software architecture
Software architectureSoftware architecture
Software architecture
 
Design Pattern in Software Engineering
Design Pattern in Software EngineeringDesign Pattern in Software Engineering
Design Pattern in Software Engineering
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
 

Viewers also liked

Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questionsjinaldesailive
 
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 (18)

Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questions
 
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

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
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
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
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
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Recently uploaded (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
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
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
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!
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

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