design - Controller want to know if list's View is empty -
admit have 2 class : view
, controller
, knows each other.
view
has object list named list
, controller
want know if list
empty or not.
what best way ?
if that's interaction between list , controller, implement boolean islistempty() method in view class in define logic determine whether list empty. way, don't have expose type of list controller , keep program flow in controller simple if view.islistempty() something
.
Comments
Post a Comment