A lightweight framework for implementing model-view-controller semantics