Search KB Filter article types
Visual WebGui Extensions in Deployment
Categories: Controls Registration, Customization
Tags: Developers, Customization, Pre v6.3, v6.3, v6.4 and Later
Revision: 3
Posted: 29/Dec/2009
Updated: 15/May/2011
Status: Publish
Types: Article

This article will have a few sections added to it soon, based on the following article type skeleton: CodeSample
Overview

This article will describe to you how Visual WebGui extensions are used in deployment, and will provide you some necessary background on how this works, without files with the specific extensions being generated for any Form in the system.

Visual WebGui in fact does not create a WGX and SWGX file for any MainForm or other Form in the application.

The Web.config of the Visual WebGui applications tell IIS to load a Router class when the extensions registered in the httpHandlers section of the Web.config are used in the URL that reached IIS.
The Router class interprets that URL and 'knows' using the Applications section of the Web.config what Form or IFormFactory type class to load according to the code used together with the specific extension.
 

Details
  • Every "add" element inside the "httpHandlers" section is a registration of a specific extension, to the relevant Visual WebGui Router class.
  • There is a specific Router class for every presentation layer.
    The Gizmox.WebGUI.Server.Router is used for the DHTML presentation layer - the default.
    The Gizmox.WebGUI.Server.Silverlight.Router is used for the Microsoft Silverlight presentation layer.
  • The Visual WebGui framework is open to allow users to create their own presentation layers.
    Users that create a new presentation layter would need to create and register their own Router class for this use.
  • Every Application element inside the Applications is a MainForm.
  • A MainForm is a Visual WebGui Form that a Visual WebGui application is configured to be able to start with.
  • The "Code" attribute of the Application element is the string that will be used in the URL to get the Form that is registered in the Type attribute.For example "Form1.wgx".
  • The "Code" attribute does not have to be the same as the name of the Form it relates to.
    • Beginning with VWG v6.4 Preview3, you can add virtual paths to your code like: "US/CAL/LA". The "US/CAL" is a virtual path that does not have to correspond to VirtualDirectory directory structure. The "LA" in the example is the actual Code name of the Form.
    • Beginning with VWG v6.4 Preview3, you can register a "*" (star) as a wildcard in the Code. You would normally register this in the last Application element of the Applications section. Using the wildcard, all codes and virtual paths that will be used in the URL that have not been registered in previous Application elements, will be caught be this one.
  • The "Type" attribute of the Application element consists of two parts: 1) The Full name of the Form or IFormFactory class. 2) The name of the assembly in which the Form class is located.
  • An IFormFactory class can serve Forms dynamically - based on logic. This can be used when you need to decide in runtime what Form the specific user will get when requesting a specific Application Code. The descision could for example be based on the time of day, on the IP of the client machine, on the status of database data, etc.
ExamplesExample URL
http://Domain/VirtualDirectory/Form1.wgx

Example Web.config section Applications
<Applications>
   <Application Code="Form1" Type="WebGuiApplication1.Form1, 'WebGuiApplication1'"/>
</Applications>

Example Web.config section httpHandlers
<httpHandlers>
    <add verb="*" 
             path="*.wgx" 
             type="Gizmox.WebGUI.Server.Router,Gizmox.WebGUI.Server,Version=2.0.5701.0,Culture=neutral,PublicKeyToken=3de6eb684226c24d" />
        <add verb="*"
             path="*.swgx"
             type="Gizmox.WebGUI.Server.Silverlight.Router,Gizmox.WebGUI.Server.Silverlight, Version=2.0.5701.0, Culture=neutral, PublicKeyToken=ab72e83db5281dc3">
</httpHandlers>

Example use of an Application Code different than the Form name
<Application Code="LA" Type="WebGuiApplication1.Form1, 'WebGuiApplication1'"/>
 
http://Domain/VirtualDirectory/LA.wgx

Example use of an Application Code with a virtual path
<Application Code="US/CAL/LA" Type="WebGuiApplication1.Form1, 'WebGuiApplication1'"/>
 
http://Domain/VirtualDirectory/US/CAL/LA.wgx

Example use of an Application Code using a wildcard and an IFormFactory
<Application Code="*" Type="WebGuiApplication1.MyIPBasedFormFactory, 'WebGuiApplication1'"/>
 
http://Domain/VirtualDirectory/SomePage.wgx


RererencesForum discussionsArticles

About the author

Related Articles

Controls Registration  
Title Update Author
Tags: Architects, Developers, XML, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
23/June/2010    2010/06/23
Tags: Developers, Customization, Pre v6.3, v6.3, v6.4 and Later
23/June/2010    2010/06/23
Tags: Architects, Developers, 2. Intermediate, 3. Advanced, Customization, Pre v6.3, v6.3, v6.4 and Later
24/May/2010    2010/05/24
Tags: Architects, Developers, JavaScript, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
02/Nov/2010    2010/11/02
Tags: Architects, Developers, JavaScript, 1. Beginner, 2. Intermediate, 3. Advanced, jQuery, v6.4 and Later
24/May/2010    2010/05/24
Tags: Developers, Customization, Pre v6.3, v6.3, v6.4 and Later
23/June/2010    2010/06/23
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS