We are now discussing two ways to structure our project.
Expand the project into modules, and each module contains the model, exception, controller that it needs. Thus, a user module can contain a user model, all possible cases of user exclusion for a user, and a REST endpoint for working with User
It performs the traditional approach when we have top-level models, services, controllers, exceptions. Then there will be subpackages in services and similarly in Exceptions.
Structure 1:
app/ /serviceA /models Foo.scala /controllers /exceptions serviceA.scala /serviceB /models Bar.scala /controllers /exceptions serviceB.scala
Structure 2:
app/ /controllers /models Foo.scala Bar.scala /exceptions /serviceA /serviceB /services /serviceA /serviceB
Is there a recommended project structure in which there are exceptions, services, models?
James Cowhen
source share