Approaches to Software Reuse


Introduction to Software Reuse

Software reuse is the process of creating software from antecedent and extant components.

There are a range of approaches that can be taken when following a reuse pattern, these can usually be grouped into one of the following abstractions:

  • Class Libraries
  • Reusable Components
  • Application Frameworks
  • Patterns / Service Oriented Architecture (SOA)

There are many benefits in taking up software reuse (SelectBS, n.d.). These include increased software productivity, shorter development times, improved interoperability, recuded costs and usually higher output quality to name a few.

A summary of Class Libraries

While each of the above are great ways to share and reuse code within a software project, there are times where a full blown Application Framework is not desirable, feasibly for bloat avoidance on smaller footprint applications or where the framework is simply overkill for the minimal tasks that could benefit from it’s inclusion (Bazilchuk, Mohagheghi, 2005).

In these instances, Class Libraries tend to be of greater use and I will therefore elaborate on them in more detail as a selected approach to software reuse.

Class Libraries are snippets of reusable code that have been packaged and are ready for use by a wider subset of applications that include them.

For example, in the Java programming language, Java classes are organized into packages, which serve a similar function to a file folder on a computer (Cadenhead, 2017).

This allows any application to simply import a reusable grouping of code, instantiate it and assign it to a local application variable to take advantage of it’s internals without having to rewrite or re-engineer the same patterns again.

(Fig1. An example of a Class Library’s usage in Java)

The impact that systematic use of Class Libraries has in the workplace

Software reuse has been vital in all of the organisations that I have worked for and on all projects I have been involved in regardless of programming language choice or usage.

As illustrated above in Fig1, being able to import libraries and pieces of code is extremely simple and takes very little effort for all the benefits down the line.

Whether Class Libraries are provided by a third party through a repository such as Nexus, or are internally written reusable components that more than one project can reuse, it is exceptionally important to make use of the concept of software reuse wherever possible (Amar, Coffey, 2005).

Many organisations I’ve worked in tend to have an internally hosted Nexus, Pip or Npm that allows you to inherit Class Libraries simply and easily when needed.

While Java makes extensive use of Nexus, other languages have their preferred package managers, such as:

Programming LanguagePackage Manager/Repository
JavaNexus
NodeNpm
PythonPip
PHPComposer
.NETNuget
RubyBundler
RustCargo

****

**** In Summary

Software Reuse is an invaluable pattern that all projects should take advantage of to gain much higher developer productivity without the costs usually associated to such advantages.

References

SelectBS (n.d.) Software Reuse [Online] SelectBS.com, Available from: http://www.selectbs.com/software-asset-management/software-reuse (Accessed on 13th May 2018)

Bazilchuk, N., Mohagheghi, P. (2005) The Advantages of Reused Software Components [Online] Ercim.eu, Available from: https://www.ercim.eu/publication/Ercim_News/enw60/mohagheghi.html (Accessed on 13th May 2018)

Cadenhead, R. (2017) Understanding How Java Programs Work [Online] Informit.com, Available from: http://www.informit.com/articles/article.aspx?p=2832404&seqNum=4 (Accessed on 13th May 2018)

Amar, L., Coffey, J. (2005) Measuring the Benefits of Software Reuse [Online] DrDobbs.com, Available from: http://www.drdobbs.com/measuring-the-benefits-of-software-reuse/184406111 (Accessed on 13th May 2018)