WebForms Core (WFC) is a web development technology owned and developed by Elanat. It provides a Commander / Executor architecture for building interactive web interfaces. The Commander can be used on the server as well as on the client, including environments based on JavaScript or WebAssembly. In a server-client development scenario, the WebForms Core architecture can be described as Server-Command / Client-Execution.
WebForms Core is therefore not limited to a server-client architecture. Its fundamental concept is the separation between command generation and command execution. A WebForms implementation can generate commands, while a compatible runtime can execute those commands.
In the common server-client model, the server determines what should happen, generates commands that describe the required operation, and sends those commands to the browser. The browser receives the commands and executes them through the WebFormsJS client runtime.
This architecture is based on two main components:
- WebForms class for generating WebForms Core commands
- WebFormsJS for executing WebForms Core commands in the browser
The WebForms class commonly acts as the Commander, while WebFormsJS commonly acts as the Executor.
Server-Command / Client-Execution is the primary WebForms Core model for server-driven interactive web applications.
In this model, the server uses the WebForms class to generate commands. The generated commands are returned to the browser, where WebFormsJS receives and executes them.
The server does not need to send an entire new HTML page whenever an interaction occurs. Instead, the server can generate a sequence of commands that describes the changes or actions that must be performed in the browser.
The general flow is:
For example, a server-side operation can generate commands to:
- change an element's HTML
- change an attribute
- change text
- add or remove an element
- change a class or style
- register or trigger an event
- send another request
- execute a sequence of operations
- manipulate browser state
- communicate with WebSocket or Server-Sent Events
- interact with browser APIs
The browser does not interpret these operations as application-specific server code. WebFormsJS interprets the generated commands and performs the corresponding operations in the browser.
The WebForms class is the programming interface for generating WebForms Core commands.
The WebForms class provides methods that describe operations to be performed by an Executor. Although it is commonly used on the server in a server-client application, it is not inherently restricted to the server.
The WebForms class can also be used on the client through JavaScript or in WebAssembly-based environments. Therefore, the location of the WebForms class does not by itself define the architecture.
For example, in a server-client application:
The WebForms class generates the corresponding WebForms Core commands rather than directly manipulating the browser DOM when it is running on the server.
This distinction is fundamental to WebForms Core:
The same command-generation model can be used in different programming environments. The WebForms implementation can therefore exist in different languages and execution environments while using the WebForms Core command model.
WebFormsJS is the JavaScript runtime of WebForms Core.
It runs in the browser and is responsible for receiving and executing WebForms Core commands.
WebFormsJS works directly with the browser environment and the HTML DOM. It can locate elements, modify them, register events, perform requests, maintain client-side state, and execute other operations represented by WebForms Core commands.
WebFormsJS is therefore primarily an Executor. Its role is to execute commands rather than to replace the server-side application logic or command-generation model.
The architecture of WebForms Core can be understood through two roles:
The Commander generates WebForms Core commands.
The WebForms class commonly performs this role. In a server-driven application, it runs on the server and determines which operations should be performed. Application logic, conditions, data processing, and command generation can be performed on the server.
However, the Commander is not required to run on a server. The WebForms class can also be used on the client through JavaScript or through WebAssembly.
The Executor receives and executes WebForms Core commands.
WebFormsJS is the primary Executor for browser-based WebForms Core applications.
The Commander and Executor can therefore exist in different execution environments. They can be separated by a server-client boundary, or they can operate within a more direct client-side execution model.
A generated operation in WebForms Core is represented through an Action Control.
Action Controls are executable commands that describe operations to be performed by the Executor. They contain the information required to identify an action, its target, and its associated value or parameters.
For example, the following is a WebForms Core Action Control response:
In this example, stDiv1 represents an operation that sets the text of Div1 to Hello World!.
The second command, saDiv1=data-statusGSGSactive, represents an operation that sets the data-status attribute of Div1 to active.
The GS sequence represents the WebForms Core control character separator used between values inside an Action Control. WebForms Core uses control characters as part of its command protocol to separate command components.
Conceptually, an Action Control can be viewed as:
The exact structure depends on the type of Action Control being generated.
Action Controls are therefore the practical representation of WebForms Core commands that can be transferred between a Commander and an Executor.
In the server-driven model, Action Controls are generated by the server-side WebForms class.
For example, the server can generate:
The browser receives this command output and WebFormsJS executes the corresponding operations.
The complete flow is:
The server can therefore remain the primary place where application logic and interface decisions are made, while the browser remains responsible for executing the resulting commands.
WebFormsJS provides the Client Runtime required to execute WebForms Core commands in the browser.
The runtime receives Action Controls, interprets their structure, identifies the requested operations and targets, and executes them through browser APIs.
It works with browser-native mechanisms such as:
- DOM APIs
- HTML events
- HTTP requests
- browser storage
- URL and history APIs
- WebSocket
- Server-Sent Events
- WebAssembly
- browser-specific APIs supported by WebForms Core
The Client Runtime is therefore the execution layer between WebForms Core commands and the browser.
In a typical server-driven WebForms Core application, communication between the server and browser follows a command-based model.
The server generates Action Controls and sends them as part of its response. WebFormsJS receives those commands and executes them.
This can be represented as:
The communication is not limited to a single type of browser operation. Depending on the command, WebForms Core can use the same architecture for DOM manipulation, requests, state operations, event handling, asynchronous execution, data operations, and other browser capabilities.
Although Server-Command / Client-Execution is a major WebForms Core development model, WebForms Core is not defined by the requirement that the Commander must be a server and the Executor must be a browser runtime.
The Commander can also operate on the client. For example, a client-side JavaScript implementation can use the WebForms class to generate WebForms Core commands without requiring those commands to originate from a remote server.
WebAssembly can also participate in the same model by using WebForms functionality to generate commands that can be executed in the browser environment.
This makes the following models possible:
The common element in these models is not the location of the Commander. It is the command-based relationship between a Commander and an Executor.
The central idea of WebForms Core is the separation of command generation from command execution.
WebForms generates commands; an Executor executes them.
In the most common server-driven model, this can be expressed more specifically as:
The server commands; the browser executes.
The WebForms class provides the command-generation layer, while WebFormsJS provides the browser-side execution layer.
Together they form the primary WebForms Core architecture:
However, the Server-Command / Client-Execution model is only one deployment model of WebForms Core. The broader architecture allows the Commander to operate on the server, client, or other supported environments such as WebAssembly.
WebForms Core can therefore be understood as a command-based technology for generating and executing web operations, with WebForms classes acting as Commanders and compatible runtimes, such as WebFormsJS, acting as Executors.