Difference between project and module

I am an old netbeans user, so I am struggling to understand the difference between a project and a module.
Is there an example somewhere with one project and two modules so that I can understand the differences?
Thank you.

3 comments
Comment actions Permalink

A project can contain one or more modules. Each module is a separate library, web app, etc. So, for example, if you have a web app and a separate server-side application, you might develop them in concert, one module for each application but the same project. Each module is for a single "type" of packaged code, e.g., a jar file, war file, etc. Modules aren't just Java either, so you could have one module for a Java application and another module for a Ruby on Rails application. In general a project will contain related modules, applications, libraries, etc. that are interdependent and are developed in concert.

2
Comment actions Permalink

We use our code base for multiple "projects" (= different Java-only
products). Each project consists of multiple modules, a couple of
product-independent shared-code modules and one product-specific module.
This allows to enforce dependencies. For example, code in the
product-independent shared-code modules must not depend on product-specific
code.

Tom

1
Comment actions Permalink

Adding to what Charles said, a classic example of a two module project is a client (or ui) module and and a server module. To break it down further, the server side might be broken out into a couple of modules such as 'web service' and 'servlets' & 'rest-api' used by the 'web-service' module. And you might have four client modules: 'desktop-gui', 'mobile-gui' and 'command-line', all of which depend on a 'client-common' module.

Here's a screenshot of the Logback open source project. It has 6 modules (including the parent module):

screenshot.png

1

Please sign in to leave a comment.