JavaScript Coding Standards in Visual WebGui
Explains the basic coding standards for JavaScript coding in Visual WebGui custom client development
Categories: Custom Controls, Skinnable and Inherited Controls
|
Tags: Developers, JavaScript, 2. Intermediate, 3. Advanced, Customization, DHTML, v6.4 and Later
Revision:
1
Posted:
27/July/2011
Updated:
27/July/2011
Status:
Publish
Types: Reference
|
OverviewImportant: This article only discusses JavaScript code that is added via a skinnable or custom Visual WebGui control.
The Visual WebGui resource collectors, the scoping angine and the obscuring engine, require developers to develop JavaScript according to standards described later in this article.
Notice: The previously mentioned engines of the Visual WebGui framework, require perfect coding according to normal JavaScript standards. Coding mistakes, like missing semicolons will not pass through those engines and will not allow the application to run over the browser. Details- Function name must be prefixed by the name of the skinnable/custom control "_".
For example if your control's name is "CustomLabel", your function names in script resources of this control must begin with: "CustomLabel_". Like: "function CustomLabel_DoSomething()". - Function scoped variables of object type must be prefixed with "obj". For example: "var objElement;".
Function scoped variables of string type must be prefixed with "str". For example: "var strName;". Function scoped variables of array type must be prefixed with "arr". For example: "var arrValues;". Function scoped variables of boolean type must be prefixed with "bln". For example: "var blnValid;". - Application scoped variables must be prefixed with "m". For example: "var mobjElement;".
Built in JavaScript Visual WebGui LibrariesVisual WebGui client core contains a very large number of JavaScript service functions. Those service functions where created to server the native Visual WebGui control but also controls built by users. The functions were built to allow for code commonly used to only be written once and in the best way possible with cross browser support built-in to it. Apart from providing you with an easy way to achieve JavaScript tasks, those libraries provide you with access to the basic Visual WebGui client facilities and infrastructures in the correct way they are supposed to be accessed.
Those libraries are all located inside the Gizmox.WebGUI.Forms project root directory and all their names begin with "CommonSkin.Common.". For those of you with installations that include our sources, you can go directly to see the actual files (be careful not to change them though). For those of you that do not have the sources and would still like to see the libraries, you would need to download and install an SVN (source control) client such as TortoiseSVN. With this tool you can download the Gizmox.WebGUI.Forms project sources using this URI: "http://72.55.165.182/svn/Public/Core/trunk/Gizmox.WebGUI.Forms" The libraries useful to you are the following: - CommonSkin.Common.Aux.js
- CommonSkin.Common.Data.js
- CommonSkin.Common.Events.js
- CommonSkin.Common.Web.js
Those libraries normally are split into three: a generic file, a file for Internet Explorer and a file for Mozilla (which is frequently used also for WebKit). Related Articles
About the author
Related Articles
|
Custom Controls
|
|
|
I played a bit around with the new 6.4 ListView control, its quite amazing what you can do with it. It opens a lot of new ways to present data in a better and more userfriendly way.
Tags:
Architects, Developers, Data Binding, C#, 2. Intermediate, 3. Advanced, Customization, Data Binding, v6.4 and Later
|
|
|
In this How to we are going to learn the basic usage of Visual WebGui RIA Platform Theme & Control designer.
Tags:
Developers, Graphic Designers, Theme, 1. Beginner, 2. Intermediate, Customization, v6.4 and Later, 3. Advanced
|
|
|
Tags:
Developers, Events, JavaScript, 1. Beginner, 2. Intermediate, Integration, Pre v6.3, v6.3, 3. Advanced
|
|
|
Tags:
Developers, Events, JavaScript, 2. Intermediate, 3. Advanced, Integration, Pre v6.3, v6.3
|
|
|
Tags:
Developers, Graphic Designers, Theme, 1. Beginner, 2. Intermediate, Customization, v6.4 and Later, 3. Advanced
|
|
|
Tags:
Developers, Events, JavaScript, 3. Advanced, Customization, v6.3
|
|
|
|