Nethgui Client Framework¶
On the server-side, the programmer creates controls through the Widget interface, specifying the view key (see also #350):
- one o more UI controls are associated to a view key (N-1 relationship)
- a view key corresponds to a set of basic UI controls, thus having the same view value
On the client-side:
- each control has a
classattribute value that identifies its view key.
- when a response is received, all controls sharing the same view key are notified with an event containing the view value
for HTML form controls (INPUT, SELECT, ...) the.
nameattribute has the same meaning of the class value: it identifies the view key
Client Request Format¶
Server JSON Response Format¶
Instead of the actual nested structure the server should send an array of couples:
R = [ [<viewKey1>, <viewValue1>], ... [<viewKey2>, <viewValue2>] ];
<viewKeyN> is a string and
<viewValueN> can be any type.