Skip to content

The language

The language (its name is Mamba) is what you use to write the logic of a zAppDev application. It is typed, object-oriented and looks like C#, and it works directly on the Intended Design: its business objects, forms, services and settings.

You describe the structure of an application in the editors. The language is for the part that a diagram cannot say: what happens when a button is clicked, how a price is calculated, which records a screen shows, what a scheduled job does at night.

function bool ApplyDiscount(decimal percent)
{
    if percent <= 0 || percent > 50
    {
        throw BusinessException.Create("A discount must be between 0 and 50 percent.");
    }

    this.Price = this.Price - this.Price * percent / 100;
    this.Save();
    return true;
}

This is an operation of a class named Product. this is the product, Save() stores it, and the rule is written once, in the model.

Where Mamba is used

Mamba code lives in the model, next to the thing it belongs to.

Where What it does
Class operations Behaviour of a business object, such as calculations, rules and queries.
Form controller actions What a form does when it opens, when a button is clicked, or when data is saved.
Service operations The logic behind an operation that you expose as REST or MCP.
Automation flow steps Work that runs on a schedule or on an event.
Unit tests Tests of the application, run in Studio.
Expressions Calculated values and conditional formatting on forms.

What makes it different from C

  • It knows your model. Domain.Product is a class you drew. Studio checks every name, type and association in your code against the model, so renaming a class or deleting an attribute shows you what breaks before you build. See Validation.
  • Data access is built in. Every persisted class already has Create, Find, GetAll, GetByKey, Save and Delete. There is no data layer to write. See Working with data.
  • One language for server and client. You do not choose between languages for the browser and the server. The engine decides where each piece of code runs.
  • Libraries for common work. Sending e-mail, reading Excel files, signing in a user, caching, logging and many other tasks are one call each. See Libraries.
  • Forgiving by design. Missing values are handled quietly instead of crashing the page. This is convenient, and it has consequences you should know. See Behaviour to know.

From Mamba to running code

Mamba is not interpreted. The engine checks the whole Intended Design, including your Mamba code, and hands it to a target. For the full-stack target (.NET and Angular), logic that touches data becomes C# on the server, and expressions that must run in the browser become TypeScript in the Angular client.

The generated code is ordinary source code. A code map links each generated method back to the Mamba operation it came from, so a stack trace leads you to the model.

Generated files are overwritten

Never edit generated code. A change made there is lost on the next build. Make the change in the model or in Mamba.

In this section

Where to start

  1. Read A tour of the language to see its shape in one page.
  2. Learn how data is handled in Working with data.
  3. Read Behaviour to know before you write much, so the surprises do not cost you time.
  4. Look things up in the libraries and the syntax reference.
  • Editors: where Mamba code lives, next to the model it belongs to.
  • Glossary: one term per concept.