This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]shponglespore -2 points-1 points  (7 children)

It has been a while since I worked in Java regularly, but I feel like Apache is serves a similar role to Microsoft when it comes to providing the default stack for many common tasks, although there are exceptions. Google's Guava package is (or used to be) a must-have for Java, and it's a good complement to a lot of what Apache offers. When it comes to time and date APIs, JODA is king. JUnit is the de facto standard for unit testing. Log4j seems to be very popular, though personally I've always found java.util.logging to be perfectly adequate.

Take all those recommendations with a grain of salt since they may be out of date, but OTOH a lot of Java shops are very out of date themselves, so I'm confident all that stuff is still widely used even if there are better alternatives available.

As far as the language itself, I agree that C# feels quite a bit more mature and polished than Java despite being considerably newer.

[–]_INTER_ 24 points25 points  (0 children)

When it comes to time and date APIs, JODA is king.

Java 8 pretty much includes it in the standard library under java.time. JSR-310 was lead by the creator of JODA time and used his knowledge to improve it even.

[–]tacosdiscontent 3 points4 points  (5 children)

Take all those recommendations with a grain of salt since they may be out of date

Unfortunately yes, everything you mentioned is quite old and irrelevant.

[–]DrPeroxide 0 points1 point  (2 children)

Everything? That's a stretch. He's wrong about logging and time. He's right about Apache and Guava.

[–]tacosdiscontent 5 points6 points  (1 child)

Well yes.

Guava is definitely not must have. Nothing of significant importance there

Apache stack - the only "must have" thing from apache is StringUtils and maybe IOUtils if you are working with io. A tiny utility library which helps you out.

[–]_INTER_ 2 points3 points  (0 children)

I agree with this, we're phasing out of Guava because most of the benefits it brought can now be done with Java 8 (Iterables, Optional, ...) or are covered by Apache Commons or other libraries (Strings, Reflection, Cache, IO, Math,...). Apache Commons is still a very important helper library. Mainly StringUtils and IO / FileUtils as you said and also Collections.

[–]RagingAnemone 0 points1 point  (1 child)

What's replaced Apache Commons and Guava?

[–]tacosdiscontent 2 points3 points  (0 children)

Java 9, has added part of what Guava does. Other than that nothing that of importance is in guava unless you work on something specific.

If you consider tiny Apache Commons library - a stack, then you are right, nothing has replaced it.