Grasp Controller, Does it really need a UI to exist?
- by dbones
I have a Domain model which can be in multiple states, and if these states go out of a given range it the domain should automatically react.
For example I have a Car which is made of multiple things which have measurements
the Engine - Rev counter and Temperature
the Fuel Tank - capacity
Is is plaseable to have a CarStateController, which observses the engine and the tank, and if these states go out of range IE the engine temperature goes above range, turn the engine fan on??
There is no UI, (you could argue it would show a light on the dash board, but for this case it does not) is this a valid use of a GRASP controller pattern? if not what is this CarStateController Called?
Or have I completely missed the point and this should be the State Pattern?