A Visual WebGui project is basically an ASP.NET flavored project type which behaves exactly the same as ASP.NET in terms of coding language and compilation products.
The compilation product is an assembly accompanied by a web.config configuration file, and the runtime result is based on the ASP.NET essential infrastructure:
Session object
In a Visual WebGui application, the Session object plays a very important part. It contains a new container unit defined by Visual WebGui and known as the Context. The Context is the highest object in the hierarchy represented by a Visual WebGui application and is functioning as semi-global scope of one instance of the application.
One of the channels through which Visual WebGui application can communicate with its ASP.NET environment is the Session object.
Application object
Functions exactly the same as in ASP.NET which means it is the global scope of the application and can be used to consolidate global application data if necessary (although static members can function just as well for this specific cause).
Server object
Server object is accessible from Visual WebGui applications and provides the same services as in standard ASP.NET applications.
Response/Request
Response/request are normally overridden by Visual WebGui providing a standard and single pipeline to the server, however, Visual WebGui provides the Gateway mechanism (which is explored more deeply further in this document) to take control of those objects and use them according to the custom needs of the application (for example: retrieving images from database, creating resources on the fly etc).
Mapping Request Handler
Mapping requests to objects is done by Visual WebGui Router object which is defined within the httpHandlers section in the web.config file:
<system.web>
<httpHandlers>
<add verb="*"path="*.wgx"type="Gizmox.WebGUI.Server.Router,Gizmox.WebGUI.Server,
Version=2.0.5701.0,Culture=neutral,PublicKeyToken=3de6eb684226c24d" />…
Mapping Application's Entry Point
Unlike ASP.NET and due to the fact that Visual WebGui uses live state objects on the server, there isn’t any actual file which defines a Form object; Forms are object which inherit from Gizmox.WebGUI.Forms.Form object and is mapped by this Visual WebGui Router object to be handled by an instance of an object of the suitable type.
Entry point forms which are called “Applications” are defined within the web.config file and define the set of forms which are browse-able directly:
<WebGUI>
<Applications>
<ApplicationCode="MainForm" Type="MySample.MainForm, MySample"/>
<ApplicationCode="Form2" Type="MySample.Form2, MySample"/>
</Applications>…
Visual WebGui Context Initialization Scenario
- The client approaches the server for the first time.
- The IIS server infrastructure discovers that no Session exists for this client and creates an IIS Session.
- ASP.NET native ISAPI filter takes over the request and creates the basic ASP.NET infrastructure on the server.
- ASP.NET Visual WebGui HttpHandler definition causes ASP.NET ISAPI filter to hand over the request to Visual WebGui a new Router object.
- The router detects a “Preload” request and sends back the initial HTML and the kernel resources which are responsible for further communication with the server and UI rendering.
Visual WebGui utilizes the IIS and ASP.NET infrastructure and depart from ASP.NET only on the pipeline. The Context object is an application instance global scope and it is a Session resistance further dividing it to a specified scope.
Next >>