Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see Why Migrate to InterSystems IRIS?

Creating the Model Class

The first step in creating our Zen MVC data entry form is to create the model class. The model can consolidate data from a variety of different sources. For example, the model can include data from all or part of several different Caché tables. In our case we use the data from a single data table — MVFILE.PERSON.

  1. On the Studio Menu Bar click File–>New to launch the New dialog. Click the General tab.

    generated description: newmodelclass1 20142

  2. Enter the following on the first screen of the New Class wizard:

    1. Enter a package name: MVFILE

    2. Enter a class name: PersonModel

    generated description: newmodelclass2 20142

    Click Next

  3. On the Class Type screen, click the Extends button and then either select or enter %ZEN.DataModel.ObjectDataModel.

    generated description: newmodelclass3 20142

    Click Finish.

  4. Finally, we set the default language of the class to MVBasic. Do this by adding [Language = mvbasic] to the class declaration.

    generated description: newmodelclass4 20142