Search code examples
modulelibrariesartifacts

Modules vs. Libraries vs. Artifacts: Whats the difference?


I'm going to make a client server gui chat. I wanted to know what the difference between Module, Libraries and Artifacts are. They're new terms, and it be nice to have a condensed explanation of it.


Solution

  • In short:

    • Module - an application can have multiple composing parts. Imagine a car composed of engine, seats, tires, etc. Each such part is a module. Take a look at this maven multi-module app intro for an example

    • Libraries - the list of things (other jars, dlls, etc) your application depends on to be built. Other pieces of software you use in your application to avoid reinventing the wheel and make your life easier by reusing what's already been done by other people (or perhaps you). Imagine your car dealer's factory depends on an external partner which will deliver the multimedia system, which in this case can be consider a library

    • Artifacts - the output of your build process, whatever will be released to the customer, a jar, war, RPM package, you name it. In our example, the final product or artifact is the car itself. At the same time, all of the composing modules will have an artifact of their own: engine, tires, etc