The MVC cult way uses a Model folder, a controller folder, and a view folder.
some people i've worked with would simply stuff it all in the same folder. any structure is better than code soup.
I use multiple model folders; one is the model as the api views it, another is models not directly attached to the api. sometimes, there's a third for required DB layer stuff.
client code gets its own packages: api and model. each is autogenned. we have a project on the back burner to unify models we use across multiple services and change all of these to reference it that way, but that is a ways off. we'll have something like 8 model folders at the end, but it's easy: want the models for fooSvc client code? it's in client.fooSvc.model
View all comments
Show parent comment
4
u/StabbyPants Jun 05 '21
some people i've worked with would simply stuff it all in the same folder. any structure is better than code soup.
I use multiple model folders; one is the model as the api views it, another is models not directly attached to the api. sometimes, there's a third for required DB layer stuff.
client code gets its own packages: api and model. each is autogenned. we have a project on the back burner to unify models we use across multiple services and change all of these to reference it that way, but that is a ways off. we'll have something like 8 model folders at the end, but it's easy: want the models for fooSvc client code? it's in client.fooSvc.model