News for hackers. Stuff that matters.
Re:Love It or Hate It, Java Continues to Evolve by agumonkey on Monday June 17, 2019 @05:04AM (#20201124)
I may work with java soon, so I was reading about Spring and it was yet again a dive into insane amount of verbose over engineering that I ran away from years ago.

It's true that post 8 Java becomes palatable. And someone on reddit just showed me this piece of stats:

https://www.jetbrains.com/lp/devecosystem-2019/java/

83% on java 8, java 11 nicely going up

I pity those forced to work with old techniques

Re:Love It or Hate It, Java Continues to Evolve by maltalex on Monday June 17, 2019 @05:17AM (#20201174)
I write quite a lot of Java, and I have to admit I never “got” Spring.

I’d much rather have explicit boilerplate code (preferably in library form as much as possible) than complex, invisible magic.

The latter is “easy”, but the former is “simple”. In most cases, “simple” is more important.

Re:Love It or Hate It, Java Continues to Evolve by nurettin on Monday June 17, 2019 @05:58AM (#20201378)
I'd say there is no upside for the complex invisible magic. Half the time you have to run the application and pray that the configuration beans you've placed are working and if not, you are pretty much in trouble. Perhaps you missed a step in adding a configuration decorator in your application or configuration class, or used some deprecated method or used some incorrect class in the class hierarchy for the bean you want to return.
Re:Love It or Hate It, Java Continues to Evolve by agumonkey on Monday June 17, 2019 @07:12AM (#20201765)
it's not even magic, it's redundant over engineering at its peak

haskell has magic, but at least its concise..

Re:Love It or Hate It, Java Continues to Evolve by rhinoceraptor on Monday June 17, 2019 @05:46PM (#20207696)
It's like playing Where's Waldo, to find the actual code in an enterprise Java/C# application.

I think it's a fundamentally different mentality as far as the code. The codebase is so obfuscated that it might as well be binary data rather than plaintext files. You need an IDE to manipulate it efficiently.

Re:Love It or Hate It, Java Continues to Evolve by agumonkey on Monday June 17, 2019 @09:48PM (#20209145)
I feel like Enterprise is all about looking complex to justify the fees. The simpler it looks the harder it is to bill.

http://jeffacubed.com/the-boilermaker-story-or-knowing-where...

Re:Love It or Hate It, Java Continues to Evolve by unscaled on Monday June 17, 2019 @05:45AM (#20201313)
But Spring gives you the best of both worlds. A lot of verbose code (as annotations and class inflation instead of explicit boilerplate) and inscrutable magic.
Re:Love It or Hate It, Java Continues to Evolve by arethuza on Monday June 17, 2019 @05:50AM (#20201343)
If only we could all agree on what "simple" means - a lot of "enterprise" code I've seen would sweep vast amounts of complexity into hard to spot places to that you could have a small thing that people could point at and say how simple the one visible bit was, ignoring the vast amount of complexity lurking under the surface somewhere and invoked by more or less magical means.
Re:Love It or Hate It, Java Continues to Evolve by oweiler on Monday June 17, 2019 @09:18AM (#20202589)
I disagree. The "boilerplate" is the boring stuff I don't want to waste my time with.
Re:Love It or Hate It, Java Continues to Evolve by maltalex on Monday June 17, 2019 @03:40PM (#20206570)
In my opinion software development is less about what specific developers want to spend their time on, and more about producing solid software.

Does not spending time on boilerplate improve the quality of software you produce? I find that it doesn't.

Re:Love It or Hate It, Java Continues to Evolve by LoSboccacc on Monday June 17, 2019 @05:18AM (#20201182)
> I pity those forced to work with old techniques

java modules broke a lot of software that were using sun classes or did classloading magic.

I was on one of such application, it's not a lot of effort to migrate forward, but many of the issues are runtime only so unless you have a good test suite, a strong incentive and no closed source library that use some such classes you can't really move forward with it.

anyway, in java 7 was already possible to write "unbloated" code, especially with the servlet 3.0+ spec, but spring and osgi have a lot of inertia in the enterprise community, meaning most people were stuck programming in xml, one of the most unpleasant experience ever.

Re:Love It or Hate It, Java Continues to Evolve by agumonkey on Monday June 17, 2019 @07:13AM (#20201776)
I wonder how much salary increase it would take to make working with xml/spring worth someone's while.

ps: also how many shops are doing 'migration off of spring' ?

Re:Love It or Hate It, Java Continues to Evolve by mindcrime on Monday June 17, 2019 @12:58PM (#20204952)
I wonder how much salary increase it would take to make working with xml/spring worth someone's while.

Meh.. in my opinion a lot of this is just tropes. Spring is a fine environment to work in, although you really don't have to use any XML with modern Spring. But you can if you prefer to for some reason.

All the annotation driven "black magic" can be mildly annoying at times, especially before you understand what's going on under the hood... but considering the amount of boiler-plate crap it saves you from dealing with, I'll happily accept that tradeoff.

For my money, if I was starting a new backend service today, I'd absolutely reach for Spring Boot as my starting point. Of course, I may be biased given that I've been writing Java code for 20 years, and I remember what a breath of fresh air Spring was compared to the old EJB 2.x era "J2EE" stuff.

Re:Love It or Hate It, Java Continues to Evolve by LoSboccacc on Monday June 17, 2019 @02:12PM (#20205817)
> old EJB 2.x era "J2EE"

could have had worse you started just around the xdoclet, that was peak madness

Re:Love It or Hate It, Java Continues to Evolve by alasdair_ on Tuesday June 18, 2019 @02:16AM (#20210176)
Some of us worked at a shop that embraced Microsoft’s “embrace and extend” J++ with COM wrappers to go with Java. I still think THAT was peak insanity.
Re:Love It or Hate It, Java Continues to Evolve by mindcrime on Monday June 17, 2019 @02:35PM (#20206023)
I actually was around for the XDoclet era, although I managed to mostly avoid going down that particular rabbit-hole personally. I think I even have the Manning XDoclet in Action book still on a shelf somewhere around here. Never quite got around to reading it...
Re:Love It or Hate It, Java Continues to Evolve by agumonkey on Monday June 17, 2019 @04:52PM (#20207248)
java: provider of fine screen stand since 1995
Re:Love It or Hate It, Java Continues to Evolve by foxyv on Monday June 17, 2019 @05:35PM (#20207612)
I accept your pity. All my code has to be JRE5 compatible...
Re:Love It or Hate It, Java Continues to Evolve by agumonkey on Wednesday June 19, 2019 @01:46AM (#20221098)
Nice constraint..

is it allowed to produce libs in jars from non java languages ? Even though I don't think clojure/kotlin/else support jre5 out of the box anymore.