Blog Archives

What is the use of Interceptor design pattern?

Interceptor design pattern is used for intercepting a request. Primary use of this pattern is in Security policy implementation. We can use this pattern to intercept the requests by a client to a resource. At the interception we can check

Posted in Design Pattern, Design Pattern Interview Questions

What are the Architectural patterns that you have used?

Architectural patterns are used to define the architecture of a Software system. Some of the patterns are as follows: MVC: Model View Controller. This pattern is extensively used in the architecture of Spring framework. Publish-subscribe: This pattern is the basis

Posted in Design Pattern, Design Pattern Interview Questions

What are the popular uses of Façade design pattern?

Some of the popular uses of Façade design pattern are as follows: <li>A Façade provides convenient methods for common tasks that are used more often.</li> <li>A Façade can make the software library more readable.</li> <li>A Façade can reduce the external

Posted in Design Pattern, Design Pattern Interview Questions

What is the difference between Builder design pattern and Factory design pattern?

Both Factory and Builder patterns are creational design patterns. They are similar in nature but Factory pattern is a simplified generic version of Builder pattern. We use Factory pattern to create different concrete subtypes of an Object. The client of

Posted in Design Pattern, Design Pattern Interview Questions

What is Memento design pattern?

Memento design pattern is used to implement rollback feature in an object. In a Memento pattern there are three objects: Originator: This is the object that has an internal state. Caretaker: This is the object that can change the state

Posted in Design Pattern, Design Pattern Interview Questions

What is an AntiPattern?

An AntiPattern is opposite of a Design Pattern. It is a common practice in an organization that is used to deal with a recurring problem but it has more bad consequences than good ones. AntiPattern can be found in an

Posted in Design Pattern, Design Pattern Interview Questions

What is a Data Access Object (DAO) design pattern?

DAO design pattern is used in the data persistent layer of a Java application. It mainly uses OOPS principle of Encapsulation. By using DAO pattern it makes the application loosely coupled and less dependent on actual database. We can even

Posted in Design Pattern, Design Pattern Interview Questions

Which is the design pattern used in Android applications?

Android applications predominantly use Model View Presenter design pattern. <li><strong>Model</strong>: This is the domain model of the Android application. It contains the business logic and business rules. </li> <li> View: These are the UI components in your application. These are

Posted in Design Pattern, Design Pattern Interview Questions

How can we prevent users from creating more than one instance of singleton object by using clone() method?

First we should not implement the Cloneable interface by the object that is a Singleton. Second, if we have to implement Cloneable interface then we can throw exception in clone() method. This will ensure that no one can use clone()

Posted in Design Pattern, Design Pattern Interview Questions

What is Builder design pattern?

Builder design pattern is a creational design pattern. We can use Builder pattern to create complex objects with multiple options. E.g. when we have to create a Meal in a restaurant we can use Builder pattern. We can keep adding

Posted in Design Pattern, Design Pattern Interview Questions