NewWork mode: your Claude Code or Codex on work calls, answering from your project's codeSkip to content
Middle1 view

Where does code run in a managed application? On the client and on the server. What must not be done on the client?

Practice

AI answer

In a managed application, the execution location is determined by the execution context and compilation directives, such as &AtClient, &AtServer, and &AtServerNoContext. UI handlers usually run on the client; data access and server-side business logic are generally handled on the server. A client call to a server method must match its directive and context availability.

Operations that require server access to the database should not be performed on the client—for example, directly executing queries against the information base or accessing server objects. Trusted business logic and permission checks should not be placed on the client either: client-side logic can be modified or bypassed. Keep UI and user-input handling on the client, and perform critical checks and data operations on the server.