Avoid direct use of Database objects (JSP/ASP) | CAST Appmarq

Avoid direct use of Database objects (JSP/ASP)


Rule Definition
Direct access to database Table does not respect the multi-layer architecture principles. Pages must communicate with the business layer which in turn will communicate to the data layer through a data access layer. Furthermore, accessing Tables prevents the control at the database level of accesses. E.g.: use of non-optimized query against the database, use query that don't follow the data logic and that create inconsistency.

Remediation
Use business layer and data layer instead

Related Technologies
ASP JEE

Health Factor

  Total Quality Index


Technical Criterion
CWE-1054 - Invocation of a Control Element at an Unnecessarily Deep Horizontal Layer

About CAST Appmarq

CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.

Benchmark Statistics

Global Compliance

95.86%

Total Violations
10,354
Total Opportunities
249,814
Average Violations / App.
17.55
The compliance score represents 1 minus the ratio between the number of times a rule has been violated compared to the number of opportunities in a set of applications that the rule could have been violated.

Industry Insights

Software ISV

91.22%

Media

88.49%

IT & Business Consulting

94.42%