Action Artifacts should not directly use database objects | CAST Appmarq

Action Artifacts should not directly use database objects

CRITICAL

Rule Definition
Action artifacts should not directly use database objects. All the database access code should be encapsulated behind the business API classes, so Struts doesn't know what persistent layer you are using. This lets you use the same business API classes in other environments, and also to run unit tests against your business API outside of Struts or a HTTP environment.

Remediation
Use a Business Delegate to perform any business specific operations.

Reference
http://javaboutique.internet.com/tutorials/strictly_struts/index.html

Related Technologies
JEE

Health Factor

  Total Quality Index


Technical Criterion
Architecture - Multi-Layers and Data Access

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.65%

Total Violations
1,659
Total Opportunities
38,155
Average Violations / App.
6.61
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

Financial Services

94.05%

Telecommunications

92.99%

Software ISV

87.98%