Grasp Controller, Does it really need a UI to exist?
Posted
by dbones
on Stack Overflow
See other posts from Stack Overflow
or by dbones
Published on 2010-03-29T19:55:04Z
Indexed on
2010/03/29
20:13 UTC
Read the original article
Hit count: 274
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?
© Stack Overflow or respective owner