4 ms·
Java is dead for front-end heavy web apps, but it's (along with other JVM languages) a good option for other parts of a product. Much of the site is frequently
by strlen 16y ago
Java is dead for front-end heavy web apps, but it's (along with other JVM languages) a good option for other parts of a product.
Much of the site is frequently focused on web development. Keep in mind, however, that the web is just a UI layer. What is the UI _for_? It really irks me to see Ruby mentioned _only_ with Rails next to it, as if it wasn't an a very interesting language even without it (the combination of ideas from Perl and Smalltalk).
Statically typed languages feel awkward for web development (but then again, I haven't done much web development, so perhaps I am missing some of the better options e.g., Lift), but there's all sorts of interesting libraries for Java/JVM when it comes to:
* Middleware/services (Jersey/JAX-RS, Grizzly)
* Socket communications (Netty, Mina, Grizzly)
* Distributed coordination and communication (JGroups, ZooKeeper)
* Search and data processing (several "NoSQL" systems, Hadoop, Lucene and Katta for search)
* Threading and concurrency: actor libraries like Killim and Jetlang, java.util.concurrent and jsr166y/fork-join framework.
It should be noted that you could also use them with Scala. If liked using Java, you'll like Scala even more. Unless, of course, you've already got a predominantly Java project and have a specific reason against mixing/matching Scala (e.g., don't want to have a require having another jar in a servlet container which may be incompatible with the existing Scala jar in that container).
Clojure is yet another example of something very interesting that's happening on the JVM, but to me the big pull of Clojure isn't related to it being on the JVM: I like the fact it's a Lisp-1, its STM approach, first-order data structures - with syntactic sugar - beyond lists. Even if you viscerally hate Java and the JVM, you should give Clojure a try.
Of course there are a couple of JVM specific issues that are annoying and knee-cap all the JVM languages (in comparison to C, C++, Scheme/CLisp, OCaml and Haskell): lack of unsigned types, lack of ability to create user defined "primitive types", erasure with generics (mitigated through work arounds like Scala's implicit) and other artifacts of the JVM imposing a type system on you.
Personally I was dismayed by Java's smell (associated with the enterprise CRUD web development that went on in Java in the late 90s/early 2000s, Java's design by committee, etc...) and didn't even touch it until a few years ago; I squarely believed that all _real_ programming could only be done in C or C++ (while Lisp could be used for prototyping algorithms). I found that despite Java's _many_ annoyances, it's a language that could be practical for many non-trivial programs (rather than the usual "enterprise" apps which crash when you click the wrong button). Subsequently, I also discovered the same about Erlang, OCaml, Scheme, Common Lisp and languages I previously ignored as toys/glue languages (Python, Ruby, Perl).