The mobile user can interact with devices in the environment using either the devices themselves or a device she carries with her. This requires an adaption of the user interface to the used device. Declarative markup languages are considered to be a solution for single authoring user interfaces for dierent devices and modalities. This is a challenging task, since each device has its own characteristics. We present in this paper a novel architecture to support the creation of user interfaces based on a declarative markup language and a UI independent task model. This architecture is based on the model-view-controller pattern (MVC) to generate user interfaces from declarative markup languages. We introduce a clear border between a modality independent task model and UI design. We also show how the development of smart environments can benet from the workow engine underlying our architecture.