Search code examples
javaeclipseworkspace

Why should we use multiple Eclipse "Java Project" for multiple layer architecture within single workspace


I've some confusion about what should be the structure/design of eclipse workspace/codebase for multiple layer architecture.

Generally we are putting code in different packages for different layer within single eclipse "Java Project". Eg. view, dao, facade, service etc.. And instead we can also use different "Java Project" for different layer within single eclipse workspace.

Can any explain me which approach is better?
Either "Java Project" or "package" for each layer of the project.

Thanks in advance.


Solution

    • Well creating different java project has certainly got an advantage, for example if you want to expose your service layer as API to the universe you can build up the jar and publish it

    • It will enable modularization fully

    • I would have done it with multi moduled maven project