News for hackers. Stuff that matters.
Re:New Year’s Resolutions for the Java Developer by exabrial on Thursday January 03, 2013 @12:13PM (#5003323)
I'm a Java advocate. Here's a few more:

Learn YAGNI. Tattoo it on your friggen foreheads. Run lean... No, you DONT need to build a framework to complete your project!

Stop abstracting god dang everything. Interfaces and composition are GOOD, use them. Inheritance and generalization use SPARINGLY, or not at all! Before you create an abstraction, are you CERTAIN sometime in the future you will swap the impl out or are you more likely to throw away the code? Think about that.

Instead of Spring, consider CDI on TomEE. Dependency injection is GOOD, but you don't need to friggen inject everything in the mothafriggen world. Since CDI has a smaller feature set than Spring, you will be forced to not be as stupid. -Said a recovering spring-a-holic

Here's a slight disagreement with the article:

JPA is fine, but Hibernate is bad, slow, and it's made by Gavin King, the man who has a terminal case of 'wasn't invented here' syndrom. Use EclipseLink and stick JPA2, and pull in Redis/Mongo where appropriate.

Re:New Year’s Resolutions for the Java Developer by mbell on Thursday January 03, 2013 @02:03PM (#5003948)
My personal advice:

Writing a service? Use dropwizard[0]

Avoid EE6's version of CDI (WELD/OWB) and EE6 all together. Its slow and causes more problems than its worth. If you really want CDI, use gluice.

Guava is your friend.

Avoid JPA, specifically the parts regarding session management. Never liked it myself and Ebean[1] is a far cleaner ORM which reuses the JPA annotations for mapping classes.

Writing a user facing website? I don't have a good answer here honestly. JSF/EE6 is terrible, GWT - yuck, Wicket - yuck, in my opinion they all suck. For related options Grails seems ok, Play! seems ok, Rails on JRuby seems ok but I haven't used any of them enough to have any real opinion of them. We're currently using angular.js and Jersey for the API on the backend.

Groovy 2 is pretty awesome when performance isn't critical, use it.

[0] http://dropwizard.codahale.com/

[1] http://www.avaje.org/

Re:New Year’s Resolutions for the Java Developer by exabrial on Friday January 04, 2013 @12:25AM (#5006392)
Yah I should have mentioned Guice, I just did my first project with it. It still enables a boat load of stupidity, but at least it doesn't have the cruft that comes with EE6.
Re:New Year’s Resolutions for the Java Developer by PascalW on Thursday January 03, 2013 @03:00PM (#5004300)
Don't forget Joda Time (http://joda-time.sourceforge.net/), at least until Java 8 is out.
Re:New Year’s Resolutions for the Java Developer by mbell on Thursday January 03, 2013 @03:22PM (#5004429)
Yes, Joda-Time is awesome and a default include is pretty much all of my POMs. I'd also add that if your dealing with monetary fields / calculations, Joda-Money is also a great way to avoid common pitfalls.
Re:New Year’s Resolutions for the Java Developer by PascalW on Thursday January 03, 2013 @04:34PM (#5004808)
Tanks for pointing out Joda Money, didn?t know that one yet.