Detailed technology support
|JScript 1.0 - 5.6|
|Up to VBScript 5.5|
|HTML 2.0 - 4.0.1|
Note that there is no dedicated "Web technologies" analyzer. Instead the technologies listed above are analyzed with the ASP, J2EE .NET analyzers where appropriate.
Required third-party software
To successfully deliver and analyze Web technologies, the following third-party software is required:
Install on workstation running the DMT (for extraction)
Install on workstation running CMS (for analysis)
Note that the CAST Delivery Manager Tool simply requires the location of the Web files for extraction and packaging.
Web technologies objects and links
Collection Item, Instance, Property, Variable
Com Objects Folder
Folder, URL Folder, URL Group Folder
External URL Application Folder
Property Get, Property Let, Property Put, Property Set
Method Group, Other Group
Global Variables Folder
Client side files
The following client side files types where present in a project will be displayed using the standard icon used in Windows:
- Image files (.gif, .jpg etc.)
- ASP files (.asp, .asa etc.)
- HTML files (.htm, .html, .htc etc.)
- Script files (.js, .vbs etc.)
|Link type||When is this link type created?|
|ActiveX through a variable|
Use link between f and A.B
|Dynamic data source|
Use link between id_a and id_obj
|MENTION||Indicates the area in which the ActiveX is mentioned|
Mention link between f and A.B
|Indicates the area in which the class name is mentioned|
Mention link between f and g
|INCLUDE||Indicates the inclusion of a file|
|CALL||Indicates a call to a file|
|Indicates a function call|
Call link between g and f
|ACCESS||Indicates a access type link enters a property of an HTC component together with the associated PUT or GET function.|
ACCESS link betwee xmlData and the getxmlData and putxmlData functions.
|Read only access to a file|
|Read only access to a variable|
Read only access between f and x
|Read and write access to a variable|
Read and write access between f and y
|ACCESS and PAGE_FORWARD||Indicates a redirection. Only available for analyzed IIS applications.||-|
|REFER||Indicates that a variable refers to another variable|
Refer link between Application("y") and x
|RELY ON and INSTANCE OF||Indicates that a variable is an instance of a class|
INSTANCE_OF link between x and A.B
|GO THROUGH||Indicates the error file(s) used. Only available for analyzed IIS applications.||-|
Technology support notes
This section provides more detail about the support for specific Web technologies and the way in which CAST handles the
Jscript 3.0 - 5.6
- Precompilation is not supported.
- Jscript classes are represented as Jscript methods and there are no calling links between Jscript class members.
- Unexpected syntax error: unescaped script content.
- Object Literals are not supported.
- jsp1.jsp includes jsp2.jsp and myscript.js
- jsp2.jsp calls functions defined in myscript.js
- CAST cannot detect Call links from jsp2.jsp to the js functions
Files contained within the <SCRIPT> tag without the "runat = server" attribute will be considered as containing client code only. This can cause syntax errors during the analysis if you have an ASP file contained within the <SCRIPT> tag. One possible solution is to ignore this type of coding by replacing the expression <SCRIPT src="XXX/XXX.asp" > with <SCRIPT> via the Text Replacement feature.
Source code and comment line counts
The number of lines of code (LOC) of a Web file is calculated according to the formula:
- #LOC in file = #lines in file - #empty lines - #comment lines
- When a scripting files is included for both the server side (using the tag <script runat=server> in one page) and the client side (using the tag <script> in another page), file level comments are counted twice. This affects also the #LOC of that file as it is calculated using the formula given in 1. However, the count for the class's sub-objects is correct.
- VBScript classes are not handled by the ASP Analyzer and therefore comments inside these classes are not seen. This affects the line count for code and comments in these files as it is calculated using the formula given in 1.
- Variable declarations are not handled by the ASP Analyzer. Therefore there are no comments associated with them.
If a file contains two distinct comment blocks on the same line and if there is part of a statement between the two blocks, ASP Analyzer counts two comment lines instead of one. In the following example, two lines are counted:
Implicit declaration of events
Implicit declaration of events is not supported. Thus such events are not displayed and no link to the procedure is found.
The following section lists technical and functional aspects with regard to analysis of Web technology source code:
- and the URI-like string does not match a file name.
Following warning is displayed during analysis:
Local variables having the same name as script language methods or functions
The following function will create a recursive link between the function falseLink and itself:
The following two functions will create a link between the the function ""a and the function "falseLink":
Interdependencies between client-side code and server-side code
Because of the way in which web analyzers handle server-side code (i.e. code running on the web server) and client-side code (i.e. code executed in the web browser), an analysis may fail if the web file contains both types of code. Web analyzers function as follows:
- A page is first analyzed as server-side file and what is not recognized as server code is collected (preserving line and column numbers) in a buffer.
- The collected code is then considered and analyzed as client-side code.
This is syntactically incorrect. The error occurs on "Val2" and the analysis of the object containing the code fails. This limitation also applies even if server-side and client-side code appear on different lines in the same web file.
Syntax error on attribute value without opening double-quote
Web analyzers produce a syntax error when encountering an HTML attribute inside a tag where the attribute value is closed by a double-quote but has no opening double-quote like in the following example:
Please note that:
- there is no double-quote before the 0
- this is incorrect syntax, however, it is tolerated by Internet Explorer
Restrictions on text length when using Text Replacements
When specifying regular expressions in the Text Replacement feature in the .NET, J2EE or ASP Analyzer, you must ensure that the new text has the same length as the replaced text. Otherwise, an analysis may fail. Note that the issue will occur with during the Metrics Assistant phase of the analysis, although Text Replacement is configured in the relevant .NET, J2EE or ASP Analysis Unit or at Application or Technology level.
Methods with the same name
If a web file includes directly or indirectly two js files and if several js or vbs script methods with the same name exist, a link will be drawn to all of the methods, when the methods are referenced in the code.