Skip to content

App Connect and Server Connect

Concept · Beginner · Core concepts

Decide whether a piece of a feature belongs in the browser, the server action or the database.

Decide whether a piece of a feature belongs in the browser, the server action or the database.

App Connect runs on the page in the browser. It stores page state, responds to events, calls endpoints and binds returned values to elements. For example, a product table repeats records already available to the page.

A Server Connect action runs on your server. It can validate inputs, check the logged-in user, query a database or call another service. A browser can call an endpoint directly, so hiding a button on the page does not protect the action.

Suppose an action outputs a query named products. The page’s Server Connect component sc_products exposes the response under sc_products.data. Bind the repeat to sc_products.data.products and each row’s name field to its own cell.

Changing an App Connect value updates browser state. It does not write a database record by itself. A save form must call a server action that validates the input and performs the write, then handle success and error results.

Check Network first: was the endpoint called and what did it return? If the response is wrong, inspect the action and query. If the response is correct, inspect the component and repeat scope in the page. The next concept explains where initial page rendering takes place.

You can trace a page request and put validation and access checks on the server.