Anh ơi , Java hay các ngôn ngữ đều chia 3 nhóm : creation, structure và behavior. Vậy mục đích việc chia nhóm này là gì ? Anh có thể chia sẻ giúp bọn em trong 1 dự án anh sẽ chọn nhóm design pattern nào và mục đích việc chọn được k ạ
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. Anh nghĩ là mục đích để cho lập trình viên dễ tiếp cận hơn và dễ lựa chọn hơn trong quá trình sự dụng
2. Thường thì 1 dự án sẽ có đầy đủ cả 3 nhóm, tuy nhiên không phải sử dụng tất cả. Thường hay sử dụng nhất là composite design pattern (Structural), builder (Creation), factory (Creation), Observer (Behavioral).
Nếu sử dụng các framework như Spring thì thường mình cũng không cần quan tâm quá nhiều đến design pattern, cứ code theo đúng layer là được em ạ.