Anatomy of Software Project

By | 2019-01-19

Scope of Discussion

Here we talk primarily about JavaScript projects but include Java as well. The major tools at our disposal here are Git for source control, Maven and Npm for dependency/task management of Java and JavaScript respectively. Java is compiled and packaged by JDK while in JavaScript world these tasks are performed by WebPack and Babel.
There are alternatives but these will will not be discussed here, due to author’s limitations.

Project Hierarchy

All tools listed above operate on files in a directory tree and most have their configuration defined by a file placed at a root of the tree. The root-level configuration is often supplemented by a global setup file in user’s home or system environment variable. Any project development except the most trivial ones consists of multiple inter-related sub-modules, some local and some external, each designed for a specific functionality. In Maven, the dependencies are managed outside the project directory structure and there is no difference between an external and local dependency. On the other hand, Npm manages the dependencies within the project’s structure (./node_modules)

And here comes a major difference between Npm and Maven. In Maven, the physical location of a project sub-module does not matter. The mvn install command registers the sub-module in the local cache and allows it to be referenced by any other sub-module, in the very same way we reference any 3rd party library.

Leave a Reply

Your email address will not be published. Required fields are marked *