MVC
MVC (Model-View-Control) is a design pattern designed to separate the model, view and controller. It is strongly suggested to apply MVC pattern to your application, no only because the separation of UI from the code, but also easy-to-use and high performance.
In this section we will discuss how to apply this pattern in a ZUML document.
View
The view is UI. As described in the UI Composing section, UI can be implemented by a ZUML document or in Java. For sake for description, ZUML is used to illustrate the concept and features.
Controller
The controller is a Java class that is used to glue UI (view) and Data (model) together.
For a simple UI, there is no need of controller. For example, the data of a Listbox could be abstracted by implementing ListModel.
For typical database access, the glue logic (i.e., control) can be handled by a generic feature called Data Binding. In other words, the read and write operations can be handled automatically by a generic Data Binding, and you don't need to write the glue logic at all.
Model