Summary: This document provides basic information about the extension providing Node.js support for Web applications.
- This new version optimizes memory consumption.
In what situation should you install this extension?
Regarding Front-End to Back-End connections, we do support the following cross-technology stacks:
|iOS Front-End connected to Node.js/PostgreSQL Back-end||iOS Front-End connected to Node.js/MSSQL Back-end||AngularJS Front-End connected to Node.js/MongoDB Back-end|
If your Web application contains Node.js source code and you want to view these object types and their links with other objects, then you should install this extension:
- creates Node.js operations which represent entry-points of web services
- creates Mongoose connections and models which represent access to MongoDB database.
- This declaration will create a Mongoose connection:
- This declaration will create a Mongoose model:
These declarations will create a Node.js Get Operation:
- and this one will create a Node.js Service Operation:
Node.js operations are called from client applications, using jQuery Ajax for example. Supported client frameworks are:
Supported Node.js versions
|v0.x||No longer supported|
- 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
|Quality and Sizing|
- You should ensure that you configure the extension to NOT analyze 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 Node.js 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
|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|
|An installation of any compatible release of CAST AIP (see table above)|
Dependencies with other extensions
Some CAST extensions require the presence of other CAST extensions in order to function correctly. The Node.js extension requires that the following other CAST extensions are also installed:
- Web services linker service (internal technical extension)
Download and installation instructions
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
What results can you expect?
Once the analysis/snapshot generation has completed, you can view the results in the normal manner (for example via CAST Enlighten). Click to enlarge:
The following specific objects are displayed in CAST Enlighten:
|Node.js Delete Operation Service|
|Node.js Get Operation Service|
|Node.js Post Operation Service|
|Node.js Put Operation Service|
|Node.js Mongoose Connection|
|Node.js Mongoose Model|
|Node.js Unknown Database|
|Node.js Express Use|
|Node.js Get Http Request Service|
|Node.js Post Http Request Service|
|Node.js Put Http Request Service|
|Node.js Delete Http Request Service|
List of rules available here:
External link behaviour
Behaviour is different depending on the version of CAST AIP you are using the extension with:
- From 7.3.6, SQL queries are sent to the external links exactly like standard CAST AIP analyzers.
- From 7.3.4 and before 7.3.6, a degraded mode takes place: The Node.js extension analyzes the FROM clause to retrieve table names, then sends the table names only to external links.
- For all versions, if no links are found via external links, unresolved objects are created (with type CAST_NodeJS_Unknown_Database_Table).
- Oracle: "oracledb"
- Microsoft SQL Server: "node-sqlserver"
- Microsoft SQL Server: "mssql"
- Postgres: "pg"
- Mysql: 'my_connection'
In this section we list the most significant functional limitations that may affect the analysis of applications using Node.js:
- Only Express framework for operations declaration is supported.
- With regard to external links degraded mode, only statements with a FROM clause are correctly handled.