“Handler” pattern?

前端 未结 6 1751
臣服心动
臣服心动 2020-12-31 07:11

I\'ve come across a design pattern that\'s been referred to as a \"Handler Pattern,\" but I can\'t find any real references to this pattern anywhere. It\'s basically just a

6条回答
  •  一整个雨季
    2020-12-31 07:43

    I use it under the name of "SingletonRegistry"

    See this thread

    I've use it a couple of times. Specially when the actions to take are unknown upfront ( in the first phases of the design ) or the app should support extreme flexibility.

    I load the dictionary either from a file or a database, and create a single instance of the class that will handle the request under certain "key".

    I've found this class also searching the web for that name.

    Looks like the same isn't?

提交回复
热议问题