Skip to content

Write Once, Run Anywhere

One of the most significant architectural advantages of the Simple Platform is its dual execution model. Because Actions are compiled to a portable WebAssembly format, the exact same code can be executed in two distinct environments: in the user's browser and on the backend server.

This solves a classic and pervasive problem in web development: the need to write business logic twice.

The Problem: Logic Duplication

In a traditional application, you write validation logic in JavaScript to give the user instant feedback in the browser. Then, you must write the exact same validation logic again on the server to ensure data integrity, as you can never trust the client. This duplication is a primary source of bugs, inconsistencies, and wasted development effort.

The Simple Solution: Dual Execution

The Logic Runtime eliminates this problem. When you deploy an Action (e.g., a Record Behavior), the platform makes it available to both the client and server environments.

  • Client-Side Execution: When a user interacts with a form, the platform can execute your WASM Action directly in the browser. This provides instantaneous feedback — hiding or showing fields, calculating totals, or displaying validation errors — without a network roundtrip.

  • Server-Side Execution: When the form is submitted (or a record is created via API), the exact same WASM module is executed again on the server. This serves as the final, authoritative validation step, guaranteeing that no invalid data can ever be saved, regardless of what happens on the client.

Benefit: Guaranteed Consistency

With the dual execution model, it is architecturally impossible for your client-side validation rules to diverge from your server-side rules. You write your logic once, and the platform guarantees it is enforced everywhere, eliminating bugs and ensuring perfect data integrity.

Next Step

Learn about the developer tools that make writing Actions simple and intuitive.

Developer SDKs (Go & TypeScript)