A lot of times I see people splitting up a Project into 2 separate projects, like in this screenshot:
What is the point of seperating Ingot and IngotAPI instead of putting them both in the same project because they get compiled together anyways?
Several cases.
Need or desire to have API decoupled from (one of) its implementation. With the Java SPI (Service Provider Interface) you provide just an interface, against which client application program. Then the java SPI provides a lookup to use one of the possible implementations. Used for the XML parser. Similar for JDBC. Decoupling an API means that a client need not be recompiled if the API remains unchanged, but the implementation was changed.
In general having several projects allows to consider every project a module, a unit that imports a specified list of other modules, and forms a layered hierarchy. This can give a software system much higher quality, no back and forth imports. Next generation java will get modules.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With