Play! framework uses a of statics

后端 未结 14 1880
太阳男子
太阳男子 2020-12-07 15:29

Waaah, the Play! framework has so many static methods. Where I go to school, we were told never ever to use any statics, yet Play! uses it like there\'s no tomorrow

14条回答
  •  一整个雨季
    2020-12-07 15:52

    The main problem is that static methods only have access to other static methods and fields, which results in 'static cling' whereby the static methods have to rendezvous with the rest of the application (which contains its collaborators) via common static field(s), which leads to inflexibility.

    Disclaimer: I don't know much about 'play!'

提交回复
热议问题