[vc_row][vc_column]Software AgilityCode Readability[vc_empty_space height=”12px”][vc_row_inner][vc_column_inner width=”1/2″][vc_column_text pl=”0″ pr=”0″ pt=”0″ pb=”0″]
Why you should care
[/vc_column_text][vc_column_text pl=”0″ pr=”0″ pt=”0″ pb=”0″]A package is a schema object that groups logically related PL/SQL types, variables, and subprograms. They usually have a specification (spec) and a body. The spec is the package’s interface which declares the types, variables, constants, exceptions, cursors, and subprograms which are referenced from outside the package. Although the body tends to be unnecessary it defines queries for the cursors and code for the subprograms. Their advantages lie in Modularity, Easier application design, Information hiding, Added functionality, and better performance.
Avoid several packages in the same file because it requires Oracle to recompile every stored program that references the packages. As a result, multiple packages are referenced causing agility issues and possible bug entry.[/vc_column_text][vc_empty_space height=”6px”][/vc_column_inner][vc_column_inner width=”1/2″][vc_column_text pl=”0″ pr=”0″ pt=”0″ pb=”0″]
Business Impacts
Adding several packages in the same file can be seen as efficient but is actually a costly endevour that can hamper the code’s agility.[/vc_column_text][vc_empty_space height=”32px”]Cost[/vc_column_inner][/vc_row_inner][vc_empty_space height=”12px”][vc_empty_space height=”32px”][vc_single_image image=”5362″ img_link_large=”” img_link_target=”_self” img_size=”full” alignment=”none”][vc_row_inner][vc_column_inner width=”1/2″][vc_column_text pl=”0″ pr=”0″ pt=”0″ pb=”0″]
CAST Recommendations
[/vc_column_text][/vc_column_inner][vc_column_inner width=”1/2″][vc_column_text pl=”0″ pr=”0″ pt=”0″ pb=”0″ color=”#dd3333″]
References
https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/packages.htm[/vc_column_text]Style Guide[/vc_column_inner][/vc_row_inner][vc_separator color=”grey” align=”align_center” style=”” border_width=”” el_width=””][vc_column_text pl=”0″ pr=”0″ pt=”0″ pb=”0″]
How we detect
[/vc_column_text][vc_column_text pl=”0″ pr=”0″ pt=”0″ pb=”0″]
This code insights shows that several packages should be avoided in the same file.
[/vc_column_text][vc_row_inner][vc_column_inner width=”1/1″][vc_single_image image=”5362″ img_link_large=”” img_link_target=”_self” img_size=”full” alignment=”none”][vc_column_text pl=”0″ pr=”0″ pt=”0″ pb=”0″]
About CAST and Highlight’s Code Insights
Over the last 25 years, CAST has leveraged unique knowledge on software quality measurement by analyzing thousands of applications and billions of lines of code. Based on this experience and community standards on programming best practices, Highlight implements hundreds of code insights across 15+ technologies to calculate health factors of a software.
[/vc_column_text][vc_empty_space height=”16px”]See featuresHow it works[/vc_column_inner][/vc_row_inner][/vc_column][/vc_row]