I hear a lot that the Java landscape has changed a lot in recent years, especially the language itself and the JVM. But is the culture of encouraging overengineering still there or its been relegated to the past?
There are a lot of tools and frameworks that work on simple Java classes, you can write one with a few fields, then write another class that has a method tagged with some annotations like @πΏπΎππ, @πΆπ΄π and @πΏπ°ππ·.
A web server like Jetty will automatically generate the code to serialize JSON and other objects so you can write API endpoints in a style very much like Sinatra with a minimum of boilerplate code.
Dependency inversion frameworks like Spring and Guava (particularly big these days) manage to break the π΅ππππππ’π΅ππππππ’π΅ππππππ’π΅ππππππ’ recursion by creating one super factory that initializes your application based on a map of which part goes where.
People are learning that Java is a great language for DSLs. Sometimes type erasure gets in the way but it is possible to implement very complex APIs with pretty good type checking, see
This feature is a huge amount of fun
although it is still in preview. They are making small changes in each revision which is annoying on some level but it means they are tweaking it to work really well, together with
you can do a lot of what you'd do with destructuring assignments in languages like Python and Javascript.
Or you work for In cases like that, you can end up with code even uglier than N-Tier (where N > 4) Enterprise Java projects from the 2000s. So if you see a company with bloated culture, which incidentally uses Java, then you will find over engineered Java code. But if it's a company that cares more about solving problems than having a lot of meetings on what standards to follow, their Java code will be unlike anything from the 2000s.
Having said that, I just did a sting at a Java company with a 20 year old codebase and deleted over 100 useless classes like this in the first 6 months. My favorite was a class that was called βAbstractAbstractionβ, I kid you not. It was at the end of a particularly ridiculous string of gratuitously added classes.
I donβt think some people realize that when you are at the top of the stack, writing apps, not frameworks, itβs a mistake to spend too much time engineering too much flexibility into the design.
The key factor is always people, not syntax or nuts and bolts of your tech stack.
And people tend to stick to what theyβre familiar with.
Like they tend to stick to their social network -
just as facebook is slowly getting older and will eventually die,
java with its original overengineering and solve-all-problems mentality will be a thing until the majority of supporters retire.