Nethgui Client Framework

Basic rules

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 class attribute 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 name attribute has the same meaning of the class value: it identifies the view key.

Client Request Format

See HTML 4.01 Form content types

Server JSON Response Format

Instead of the actual nested structure the server should send an array of couples:

R = [
   [<viewKey1>, <viewValue1>],
   [<viewKey2>, <viewValue2>]

..where <viewKeyN> is a string and <viewValueN> can be any type.