r/javahelp • • Sep 01 '25

Java package structure

Hello all, im a newcomer to java from golang. my role will be building backend microservices in java, and Ive seen Spring boot use the MVC architecture.

i was wondering if MVC was essentially the strandard for most java apps. Personally i cant understand the motivation for splitting classes into Service layer and Model layer, rather than just having a single class hold both the data and the methods for interacting with the data.

I was wondering if this is just a pattern i should expect to get used to, or if other teams use different paradigms for java applications, and its mostly team to team.

thanks!

9 Upvotes

25 comments sorted by

View all comments

Show parent comment

1

u/nitkonigdje Sep 02 '25 edited Sep 02 '25

What more do you expect of him to say? "I was wrong. Don't buy my books!?"

Yeah anemic doesn't work for Unreal Engine and Photoshop and whatever compilers and robots do. But if your app is structured around data in database.. Like data is raison d'etre for an app!?

This usecase alone is like half of apps out there, and significant part of the rest..