adspace
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
What is difference between static and final in php?
how to detect a mobile device using php
How to calculate the difference between two dates using php?
How to create a web form?
What is the current stable version of php? What advance thing in php7?
What is trait in php?
What is the difference between htmlentities() and htmlspecialchars()?
Explain me is it possible to destroy a cookie?
What does $_files means?
Write a program using while loop?
What sized websites have you worked on in the past?
Which variable declarations within a class is invalid in php?
List some features of php that are deprecated in php7?
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
Name and explain five of the PHP error constants?