- Extension ID
- What's new?
- Description
- In what situation should you install this extension?
- Supported Node.js versions
- Node.js Ecosystem
- Function Point, Quality and Sizing support
- Comparison with existing support for JavaScript
- AIP Core compatibility
- Supported DBMS servers
- Prerequisites
- Dependencies with other extensions
- Download and installation instructions
- Packaging, delivering and analyzing your source code
- What results can you expect?
- Known Limitations
Summary: This document provides basic information about the extension Node.js + Express support for Web applications.
Extension ID
com.castsoftware.nodejs
What's new?
Please see Node.js - 2.9 - Release Notes for more information.
Description
This extension provides support for Node.js. Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.
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 a Node.js application object when an instance has been found
- creates Node.js operations which represent entry-points of web services
Node.js operations are called from client applications, using jQuery Ajax for example. Supported client frameworks are:
Supported Node.js versions
Version | Support | Comment |
---|---|---|
v0.x | No longer supported | |
v4.x | LTS | |
v5.x | Based on Javascript ES6 | |
v6.x | Based on Javascript ES6 | |
v7.x | Based on Javascript ES6 | |
v8.x | ||
v9.x | ||
v10.x | ||
v11.x | ||
v12.x | ||
v13.x | ||
v14.x | ||
v15.x | ||
v16.x | ||
v17.x | ||
v18.x |
Node.js Ecosystem
Node.js comes with numerous libraries and frameworks bringing data access, web services calls, microservices architectures. This list contains all supported libraries:
Library | Comment | Data Access | Web Service | Messaging | Cloud code execution |
---|---|---|---|---|---|
AWS.DynamoDB | Amazon database access | ||||
AWS.S3 | Amazon storage service | ||||
AWS.SQS | Amazon messaging service | ||||
AWS Lambda | Cloud code execution | ||||
Azure blobs | Azure storage service | ||||
Azure Service Bus | Azure Queue Service | ||||
Azure Event Hubs | Azure Queue Service | ||||
Azure Function | Cloud code execution | ||||
Cosmos DB | Microsoft Azure NoSQL Database solution | ||||
Couchdb | Couchdb access | ||||
Couchdb-nano | Couchdb access | ||||
elasticsearch | Open-source search engine | ||||
Express | Node.js application framework | ||||
GCP Bigtable | GCP database access | ||||
GCP Cloud Storage | GCP storage service | ||||
GCP Pub/Sub | GCP messaging service | ||||
Hapi | Node.js application framework | ||||
Knex | Node.js SQL query builder | ||||
Koa | Node.js application framework | ||||
Loopback | Node.js application framework | ||||
Marklogic | Marklogic access | ||||
Memcached | Storage framework | ||||
Mode-mongodb-native | MongoDB access | ||||
Mongo-client | MongoDB access | ||||
Mongoose | MongoDB access | ||||
MQTT | Messaging library | ||||
mssql | SQL server | ||||
my_connection | MySQL access | ||||
myssql | Nodejs module to manipulate MySQL database | ||||
Node-couchdb | Couchdb access | ||||
node-sqlserver | SQL server | ||||
oracledb | Oracle Database access | ||||
pg | PostgreSQL access | ||||
redis | Redis access | ||||
Sails | Node.js application framework | ||||
Seneca | Microservice toolkit |
Function Point, Quality and Sizing support
- 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
CAST AIP has provided support for analyzing JavaScript via its JEE and .NET analyzers (provided out of box in CAST AIP) for some time now. The HTML5/JavaScript extension (on which the Node.js extension depends) 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 JEE 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 JEE application.
- If the back end web client part of a .NET or JEE application is analyzed with the Node.js extension and with the native .NET/JEE 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.
In CAST AIP ≥ 8.3.x support for analyzing JavaScript has been withdrawn from the JEE and .NET analyzers.
AIP Core release | Supported |
---|---|
8.3.x |
Supported DBMS servers
DBMS | Supported? |
---|---|
CSS / PostgreSQL |
Prerequisites
An installation of any compatible release of AIP Core (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:
- HTML5/JavaScript
- Web services linker service (internal technical extension)
Download and installation instructions
The extension will be automatically downloaded and installed in CAST Console. You can manage the extension using the Application - Extensions interface:
Packaging, delivering and analyzing your source code
Once the extension is downloaded and installed, you can now package your source code and run an analysis. The process of packaging, delivering and analyzing your source code is described below:
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):
Node.js application with MongoDB data storage exposing web services
Detailed analysis results per framework
See below for more details about how the extension handles each supported framework:
Objects
The following specific objects are displayed in CAST Enlighten:
Icon | Description |
---|---|
Node.js Application | |
Node.js Port | |
Node.js Delete Operation Service | |
Node.js Get Operation Service | |
Node.js Post Operation Service | |
Node.js Put Operation Service | |
Node.js Service | |
Node.js Express Use | |
Node.js Express Controller | |
Node.js Get Http Request Service | |
Node.js Post Http Request Service | |
Node.js Put Http Request Service | |
Node.js Delete Http Request Service | |
Node.js Unknown Database | |
Node.js Collection | |
Node.js Memcached Connection | |
Node.js Memcached Value | |
Node.js Call to Java Program | |
Node.js Call to Generic Program | |
Node.js Restify Get Operation | |
Node.js Restify Post Operation | |
Node.js Restify Put Operation | |
Node.js Restify Delete Operation | |
Node.js AWS SQS Publisher | |
Node.js AWS SQS Receiver | |
Node.js AWS SQS Unknown Publisher | |
NodeJS AWS SQS Unknown Receiver NodeJS AWS SNS Unknown Subscriber NodeJS Azure Unknown Service Bus Receiver NodeJS Azure Unknown Event Hub Receiver NodeJS GCP Unknown Pub/Sub Receiver | |
NodeJS GCP Pub/Sub Subscription | |
NodeJS Azure Function | |
NodeJS Call to Azure Function | |
NodeJS Call to Unknown Azure Function | |
NodeJS AWS call to Lambda Function | |
NodeJS AWS call to unknown Lambda Function | |
NodeJS SignalR Hub Method | |
NodeJS SignalR Call to Hub Method | |
NodeJS SignalR Call to Unknown Hub Method | |
NodeJS S3 Bucket | |
NodeJS S3 Unknown Bucket | |
NodeJS CosmosDB Collection | |
NodeJS CosmosDB Unknown Collection NodeJS Elasticsearch Unknown Index NodeJS GCP Unknown Bigtable table | |
NodeJS Unknown Database Table |
External link behavior
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).
Structural Rules
The following structural rules are provided:
Known Limitations
In this section we list the most significant functional limitations that may affect the analysis of applications using Node.js:
- With regard to external links degraded mode, only statements with a FROM clause are correctly handled.
- NodeJS objects are only supported for ES5 standard.
- Analysis of AWS Lambda function needs have access to the serverless.yml file mapping routes and handlers together
- Technology specific known limitations are listed in the dedicated framework page: