adspace


Do you know design patterns. List few?

Answer Posted / Pradeep Parashar

Yes, here are some common design patterns:
1. Singleton: Ensures a class has only one instance and provides a global point of access to it.
2. Factory: Defines an interface for creating objects without specifying their concrete classes.
3. Observer: Defines a one-to-many dependency between objects, so that when one object changes state, all its dependents are notified and updated automatically.
4. Strategy: Defines a family of algorithms and encapsulates each one as an individual object, making it easy to switch between them at runtime.
5. Decorator: Attaches additional responsibilities to an existing object dynamically without modifying its structure.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between static and final in php?

1114


how to detect a mobile device using php

1177


How to calculate the difference between two dates using php?

1151


How to create a web form?

1116


What is the current stable version of php? What advance thing in php7?

1100


What is trait in php?

1072


What is the difference between htmlentities() and htmlspecialchars()?

1100


Explain me is it possible to destroy a cookie?

1035


What does $_files means?

1170


Write a program using while loop?

1128


What sized websites have you worked on in the past?

1092


Which variable declarations within a class is invalid in php?

1052


List some features of php that are deprecated in php7?

1026


How can we extract string "pcds.co.in" from a string "https://info@pcds.co.in" using regular expression of php? More on reg can you explain

1082


Name and explain five of the PHP error constants?

1043