The first step in creating a Magic application is to define the database. Magic lets you create new data types by customizing existing ones. After you've defined your data types, tables, fields, keys, and variables, you define application logic by modifying Magic's implicit execution loop, which is the basis for control flow within all Magic applications. Specifying operations before and after the inner and outer loops determines what tasks take place before and after each field or record is processed. Magic categorizes such tasks as either online or batch.
Online tasks require user input and are typically used for browsing, selecting, and editing records.
Batch tasks run in the background without user intervention, and are used for reporting and complex queries. Magic uses 13 operations for manipulating data within tasks. The Select, Link, and End Link operations specify the data set the outer loop cycles through. Evaluate Expression executes built-in functions that are part of an expression. Update Variable turns an expression result into a variable, and Browse invokes a browser or editor on some data.