In software architecture parlance, what is meant by “Patterns that guide composition”? Is it components?
Thanks
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.
Composition is when you combine two or more classes into a new one, in contrast to inheritance when you extend functionality for an existing class.
You should always favor composition over inheritance since it’s easier to create small well defined objects (following the SOLID principles) with composition than when using inheritance (large inheritance hierarchies tend to move towards GOD classes thus violating at least Single Responsibility Principle).