I often use a framework that allow you to inherit from a certain class, and override a method there, and it will be invoked.
from the framework point of view, how is it done ? what pattern is this ?
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.
Sounds like you are using a programming language / platform which provides metadata for the code. The metadata is used by the framework to find any classes which implement the certain class.
It’s not a specific design pattern (not one that I know of in any way) but a technique which can be applied in most modern languages. For instance, ASP.NET uses this for it’s
global.asaxfile (and I use it in a .NET framework of mine).It’s typically used for application entry points to control the lifetime of the object.