Currently we use the default class Bindings to modify global functions on the go. This is a cheap way to do dependency injection but has the following downsides:
You don't know which function will be called
It unclear and unmodular.
I suggest we turn the Bindings class unto an abstract class and create a DefaultBindings and GewisBindings which implement this class. These define how the function show work in their own scope.
Once defined we can simply modify the constructor of the services / controllers to take a instance of the abstract Bindings class as parameter. This would also make testing both implementations easier.
Currently we use the default class
Bindings
to modify global functions on the go. This is a cheap way to do dependency injection but has the following downsides:I suggest we turn the
Bindings
class unto an abstract class and create aDefaultBindings
andGewisBindings
which implement this class. These define how the function show work in their own scope.Once defined we can simply modify the constructor of the services / controllers to take a instance of the abstract
Bindings
class as parameter. This would also make testing both implementations easier.