Effects of dependency injection on maintainability

Software maintenance consumes around 70% of the software life cycle. Improving software maintainability could save software developers significant time and money. This paper examines whether the pattern of dependency injection significantly reduces dependencies of modules in a piece of software, therefore making the software more maintainable. This hypothesis is tested with 20 sets of open source projects from sourceforge.net, where each set contains one project that uses the pattern of dependency injection and one similar project that does not use the pattern. The extent of the dependency injection use in each project is measured by a new Number of DIs metric created specifically for this analysis. Maintainability is measured using coupling and cohesion metrics on each project, then performing statistical analysis on the acquired results. After completing the analysis, no correlation was evident between the use of dependency injection and coupling and cohesion numbers. However, a trend towards lower coupling numbers in projects with a dependency injection count of 10% or more was observed.

[1]  Craig Walls,et al.  Spring in Action , 2004 .

[2]  Lionel C. Briand,et al.  A Unified Framework for Cohesion Measurement in Object-Oriented Systems , 1997, Proceedings Fourth International Software Metrics Symposium.

[3]  Jens H. Weber,et al.  Predicting maintainability with object-oriented metrics -an empirical comparison , 2003, 10th Working Conference on Reverse Engineering, 2003. WCRE 2003. Proceedings..

[4]  Michael R. Lyu,et al.  Reliability and maintainability related software coupling metrics in C++ programs , 1992, [1992] Proceedings Third International Symposium on Software Reliability Engineering.

[5]  Lionel C. Briand,et al.  A Unified Framework for Coupling Measurement in Object-Oriented Systems , 1999, IEEE Trans. Software Eng..

[6]  Rudolf K. Keller,et al.  Cohesion as changeability indicator in object-oriented systems , 2001, Proceedings Fifth European Conference on Software Maintenance and Reengineering.

[7]  Erik Arisholm Dynamic coupling measures for object-oriented software , 2002, Proceedings Eighth IEEE Symposium on Software Metrics.

[8]  Young Lee,et al.  Reusability and maintainability metrics for object-oriented software , 2000, ACM-SE 38.

[9]  K. K. Aggarwal,et al.  An integrated measure of software maintainability , 2002, Annual Reliability and Maintainability Symposium. 2002 Proceedings (Cat. No.02CH37318).

[10]  Chris F. Kemerer,et al.  A Metrics Suite for Object Oriented Design , 2015, IEEE Trans. Software Eng..

[11]  Heung Seok Chae,et al.  A cohesion measure for classes in object-oriented systems , 1998, Proceedings Fifth International Software Metrics Symposium. Metrics (Cat. No.98TB100262).

[12]  M. Mari,et al.  The impact of maintainability on component-based software systems , 2003, 2003 Proceedings 29th Euromicro Conference.

[13]  William M. K. Trochim,et al.  Research methods knowledge base , 2001 .

[14]  Praveen R. Rao,et al.  Program execution based module cohesion measurement , 2001, Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001).