About object-oriented design patterns
I do program design time is not short, recently went to several companies interview, which was asked the object-oriented design model, I think this topic is too big, I do not know how to answer, I would like to ask you this experience PHP design pattern interview
------Solution--------------------
The so-called object-oriented design of the model, is the predecessors thought of some methods, posterity is learning is good, of course, if you have this ability, you can also develop some design patterns,
The current common are:
Single-Case mode
Singleton mode, abstract Factory mode, builder mode, Factory mode.
Adapter mode, combination mode, appearance mode, visitor mode, observer mode.
------Solution--------------------
In fact, learn a few often used on the line, interview basic can be, such as a singleton mode, Factory mode
------Solution--------------------
Say big, say small not small
Know a little fur to meet the interview can also, of course, the premise is that the interview is also easy to ask
Design Patterns A short summary is how to put different classes/objects/methods in series.
Like learning martial arts, a set of sword from beginning to end so that no problem, and then consider how to split the combination into a "sword man"
I first approached the design pattern just to invoke another class part from within a class, but didn't want to rewrite the whole class or load it all.
In this thought-driven study of design patterns, the introduction is not difficult
But I still don't know if it's good or bad.
Google search "PHP design mode" There are a lot of good articles and books