I have been doing program design for the object-oriented design model for a short time. I recently went to several companies for an interview and was asked about the object-oriented design model. I think this topic is too big, I don't know how to answer this question. I 'd like to ask you about this experience. solution ------------------ the so-called object-oriented design model is some of the methods that previous people think of. it would be better for future generations to learn, of course, if you have this ability, you can also develop some design patterns. Currently, common examples include:
I did not have a short time to design the program. I recently went to several companies for interviews. I was asked about the object-oriented design model. I think this topic is too big. I don't know how to answer this question, I would like to ask you about this experience.
------ Solution --------------------
The so-called object-oriented design model is some of the methods that previous people think of. it is good for future generations to learn. of course, if you have this ability, you can also develop some design models,
Currently, the following are common examples:
Singleton mode
Singleton mode, abstract Factory mode, builder mode, and factory mode.
Adapter mode, combination mode, appearance mode, Visitor mode, and observer mode.
------ Solution --------------------
In fact, you can only learn a few frequently used ones. The interview is basically successful, such as the Singleton mode and the factory mode.
------ Solution --------------------
Not big, not small
You can understand what you need to do for an interview. The premise is that the interview is simple.
A general expression of the design pattern is how to concatenate different classes, objects, and methods.
Just like learning martial arts, a set of Jianfa is no problem from start to end, and then consider how to combine tactics into a "Swordsman"
I first came into contact with the design pattern and wanted to call methods of several other classes from one class, but didn't want to rewrite the whole class or load all of them.
I learned the design model driven by this idea. it is not difficult to get started.
But it still cannot be a bitch. I don't know whether it is a good thing or a bad thing.
Google searches for "php design patterns" with many good articles and books