Skip to main content
AppML - Controller

AppML - Controller

Handle AppML controller callbacks for initialization, display, input, and errors.

AppML - Controller illustration

How it works

A controller function receives the AppML application object and can respond to messages or interact with application data. Use it for behavior that belongs to the view, while keeping business rules and authorization on the server. Validate user input before sending it to a backend and display failures clearly.

Good practice

  • Use matching versions of the AppML client, model format, and examples.
  • Keep secrets and permission checks out of browser-delivered HTML, JavaScript, and model files.
  • Validate input and authorize every read or write on the server.
  • Handle loading, empty, and error states, and check generated content for accessibility.

Further reading: Tutorialspoint: AppML - Controller · AppML library reference.