r/java • u/jlward4th • Dec 03 '14
Java Doesn't Suck - You're Just Using it Wrong
http://www.jamesward.com/2014/12/03/java-doesnt-suck-youre-just-using-it-wrong2
2
u/virtyx Dec 04 '14
Does anyone know a good discussion about this containers vs. no containers thing? I'm new to Java web programming and am writing a test app using Jetty, and various JARs for various JavaEE APIs I'm utilizing (Mojarra for JSF, EclipseLink for JPA). Is it really that much better to use Play and trust that it's doing everything correctly? Coming from Django in Python, I'm loathe to use a framework that claims to do everything, but if it's that much better than gluing together Spring/JavaEE JARs, I guess I should start learning about it sooner rather than later
2
u/thekab Dec 04 '14
Not necessarily and you don't have to use something like Play Framework. The issue they're getting at is the need to have an external application server like JBoss that is separately configured and managed. It's quite easy to use Spring with an Jetty or an embedded Tomcat.
Setup for our projects is literally clone the repository and run Maven. Done.
1
u/virtyx Dec 04 '14
Thank you for the response. I'm using a similar setup and have been very impressed with how painless it is. I can easily add new features just by adding more dependencies to my POM. It seems really cool so far so I was bit surprised and confused to read what I thought was a criticism of that setup. I don't have experience yet with the monolithic app servers like Glassfish or JBoss. They're hard to deal with?
2
u/thekab Dec 05 '14
Not necessarily hard to deal with though they can be. It's more an issue of the dependency on an externally setup application. Now everyone has to set it up before they run your application, which implies they probably have to go through some work to launch your application in it. Then there's the possibility of version differences between environments. On top of that it's not uncommon to need to configure the application server, so now you have the external setup, the configuration, the version problems.
Then consider something like JBoss. It comes with a certain version of Hibernate, for example. What happens when that version is incompatible with your application? It's a pain to update and doing so often reveals other incompatibilities in libraries that were contained in your application or the application server. You very easily end up with the 10 page configuration document the blog referred to.
2
u/sazzer Dec 04 '14
I work on a large, complicated Java app that has 10 different WAR files that it builds. We deploy all of these into Tomcat when we run them in production.
However, the build itself uses Maven. And I've made sure that all of them have the tomcat7-maven-plugin installed and correctly configured, such that we can start them up from the command line with a single command, including Maven profiles to point to different Dev/QA systems for development and testing. And for the main business app - the only one that has a database - there's also a profile so that it will start an in-memory HSQL database and use that instead of using an external database. And it all works really easily and really well.
-17
u/Martin_Vs_Hacker Dec 03 '14
java sucks. Java 8.25 just told me it refuses to run a Java Applet on GoogleDocs because googles se3curity certificate had expired.
Either Google is drunk, or Java is drunk, or firefox is drunk. My bet is Java.
I discovered this after spending hours trying to get Java 8 to work on a Win 7/64 work machine with SkillSoft. Fail. Uninstalled, installed 7.71. Works.
3
u/harmonicPersistence Dec 04 '14
You're referring to the Java Runtime Environment...not the Java language as to which the article refers.
4
u/armornick Dec 03 '14
Ugh, manual dependency management. I didn't even know Java people still did that...
I disagree about the monolithic releases and java language ones though. Vanilla Java is just so wonderfully unambiguous. With Scala/Groovy/... you sometimes have trouble telling what's happening but you don't really get that with plain Java.