Over a million developers have joined DZone.
Platinum Partner

Tools and Software Infrastructure for Systematic Reuse

· Java Zone

The Java Zone is brought to you in partnership with JetBrains.  Learn more about Kotlin, a new programming language designed by JetBrains to solve problems that software developers face every day.

A lot of readers have asked me to provide details on what tools and software infrastructure is needed to enable systematic reuse. That is a very good question and it is a critical enabler for building on early wins with reuse.  At a minimum you need to setup the following as your asset base grows:

Module Structure: how are the reusable components organized in your codebase? For starters, setup a separate multi-module build for segregating resuable components from application (or consumer) code. The reusable components should be versioned, managed, and governed separately using a proper release cycle outside of the application code. Each component will also need a comprehensive set of automated tests.

Dependency Management: Use ant/ivy or maven if you are using java for building reusable assets. Each module should have the absolute minimum list of internal and 3rd party library dependencies. Each module should make sure that dependency scope is marked appropriately – take care to mark dependencies in test, runtime, and provided scope as required. Finally, ensure the build is using a clean set of dependencies – remove conflicting/redundant dependencies, and remove dependencies that will conflict with consumer code if possible as well.

Code Quality: Reusable components have robust code quality tooling in place. Use checkstyle, FindBugs, and clover/cobertura etc. with the build script. If you are using maven, you can declare these as plugins and generate code quality reports alongside your build. If you want an integrated code quality dashboard and web based reporting, setup Sonar!

Continuous Integration: Automated tests and continuous integration are extremely critical to continuously refactor, enhance, and deploy resuable components. Setup a continuous integration server that kicks of automated builds on commits as well as when dependencies get updated. Setup a CI server such as Hudson to run unit, integration, and regression tests

Asset Repository: Once you build components, there needs to be a binary repository to host them and integrate them into other builds. Artifactory repo (provides open source and commerical versions) and can be used to house your reusable components (in fact any component really). Once the web GUI is setup, you can browse and search for artifacts as well as refer to them from internal build configurations.

Issue Tracking: Setup bugzilla or your favorite bug and issue tracking software so teams within your organization can submit bug fixes and enhancement requests. You will also need to publish and manage a release calendar to provide transparency into which reusable components are getting released when and how are they getting delivered in the context of real business deliverables.

What additional tools and practices do your teams follow?

The Java Zone is brought to you in partnership with JetBrains.  Discover how powerful static code analysis and ergonomic design make development not only productive but also an enjoyable experience.

Topics:

Published at DZone with permission of Vijay Narayanan , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}