How to solve the object-oriented design pattern

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.