On this page:
Target audience:
Users of the extension providing HTML5/JavaScript support for Web applications.
Summary: This document provides basic information about the extension providing HTML5/JavaScript support for Web applications.
What's new:
- This new version optimizes memory consumption.
Description
This extension provides support for HTML5/JavaScript.
In what situation should you install this extension?
The analyzer could be used if your application is a Web Application, has HTML/Javascript/CSS files and/or contains HTML/Javascript fragments.
Files analyzed
- *.html
- *.js
- *.css
The analyzer will be used to handle HTML files:
- creates one "HTML5 Source Code" object that is the caller of html to js links and a transaction entry point
- broadcasts tags and attributes/values to other CAST extensions such as AngularJS. Other extensions will not need to analyze the files themselves.
The analyzer will be used to handle Javascript files:
- creates "functions"
- local call links between function calls and functions inside each JavaScript file.
The analyzer will also find SQL queries run by ExecuteSQL Javascript annotation NEW
The analyzer also provide the following features:
- Automated Function Point counting.
- Checksum, number of code lines, number of comment lines, comments are present.
- Local and global resolution is done when function is called directly through its name (inference engine resolution is not available).
- For global resolution, caller is searched in all .js files. If only one callee is found, a link is created. If several callees are found, the analyzer watches inclusions in html files to see if it can filter the callee. It nothing is found in html files to filter, links are created to all possible callees.
- Files whose names end with .min.js and Spec.js (tests) are ignored.
Transaction configuration
HTML5 source code: it represents the whole HTML file content.
Supported Languages
Technology (version) | Supported |
---|---|
HTML (1 to 5) | |
JavaScript (1 to 1.8.1) | |
JavaScript ECMA 6 | |
CSS (1 to 3) |
- Function Points (transactions): a green tick indicates that OMG Function Point counting and Transaction Risk Index are supported
- Quality and Sizing: a green tick indicates that CAST can measure size and that a minimum set of Quality Rules exist
Function Points (transactions) | Quality and Sizing |
---|---|
Comparison with existing support for JavaScript in CAST AIP
CAST AIP has provided support for analyzing JavaScript via its J2EE and .NET analyzers (provided out of box in CAST AIP) for some time now. The HTML5/JavaScript extension also provides support for JavaScript but with a focus on web applications. CAST highly recommends that you use this extension if your Application contains JavaScript and more specifically if you want to analyze a web application, however you should take note of the following:
- You should ensure that you configure the extension to NOT analyze the back end web client part of a .NET or J2EE application.
- You should ensure that you configure the extension to ONLY analyze the front end web application built with the HTML5/JavaScript that communicates with the back end web client part of a .NET or J2EE application.
- If the back end web client part of a .NET or J2EE application is analyzed with the HTML5/JavaScript extension and with the native .NET/J2EE analyzers, then your results will reflect this - there will be duplicate objects and links (i.e. from the analyzer and from the extension) therefore impacting results and creating erroneous Function Point data.
CAST AIP release | Supported |
---|---|
8.2.x | |
8.1.x | |
8.0.x | |
7.3.4 and all higher 7.3.x releases |
Supported DBMS servers
This extension is compatible with the following DBMS servers:
CAST AIP release | CSS2 | Oracle | Microsoft |
---|---|---|---|
All supported releases |
Prerequisites
An installation of any compatible release of CAST AIP (see table above) |
Download and installation instructions
Please see:
- http://doc.castsoftware.com/display/EXTEND/Download+an+extension
- http://doc.castsoftware.com/display/EXTEND/Install+an+extension
The latest release status of this extension can be seen when downloading it from the CAST Extend server.
Packaging, delivering and analyzing your source code
Please see: HTML5 and JavaScript - Packaging, delivering and analyzing your source code
What results can you expect?
Once the analysis/snapshot generation has completed, you can view the results in the normal manner:
CAST Enlighten
CAST Management Studio analysis content
Objects
The following objects are displayed in CAST Enlighten:
Icon | Description |
---|---|
JavaScript file | |
HTML5 Source Code | |
HTML5 CSS Source Code | |
HTML5 CSS Source Code Fragment | |
HTML5 JavaScript Function | |
HTML5 JavaScript Source Code | |
HTML5 JavaScript Source Code Fragment | |
HTML5 Web Socket Service | |
HTML5 Get XMLHttpRequest Service | |
HTML5 Update XMLHttpRequest Service | |
HTML5 Post XMLHttpRequest Service | |
HTML5 Delete XMLHttpRequest Service |
Rules
The list of rules is available here: