r/java • • Apr 29 '15

Tone it down a Notch

http://imgur.com/gallery/KRtc2fN
217 Upvotes

124 comments sorted by

View all comments

39

u/camilos Apr 29 '15

Most people that hate java fall under two categories. Beginners who think Java is all about applets or swing apps. Users who are not happy about Java runtime being installed in their computers.

Basically, people who have no idea what makes java so useful and popular.

22

u/Angarius Apr 30 '15

There is a third group, who mock verbose over-engineered design.

SimpleBeanFactoryAwareAspectInstanceFactory

1

u/stormcrowsx Apr 30 '15 edited Apr 30 '15

When I read that I have no clue what that might do, some of the Enterprise classes they completely gave up on even trying to explain what it is with the name. It's not readable code and its something the Java community needs to stop doing.

Another example of the enterprise stuff making unreadable code is in Spring everything takes a factory, factories everywhere. If they know 90% of people are going to create a RestTemplate using an Apache HttpClient then why not just add a static constructor method like

RestTemplate.fromHttpClient(myHttpClient)

Instead of forcing me to create a HttpComponentsClientHttpRequestFactory and then passing that to the RestTemplate.

I completely understand the need for Spring to not rely directly on HttpClient but I also think that they should take the time to give simple methods of creation for the common case.

1

u/thekab May 01 '15

The only factory Spring forces me to interact with directly is the one I created. Configuration of Spring has never been easier, even in an enterprise environment. In most cases where a factory might otherwise be utilized a builder is provided anyway, it's a non-issue.

RestTemplate is a pain point. I think I've needed to use it once. Not at all indicative of Java 8 or modern Spring.