Mark Raible has been one of the best and most honest framework evaluators out there for the Java end of the world. It still sucks that there are so many choices, but at the same time, having choices is a good thing.
Found this via Brea Grant’s blog. It’s a good song, and the rest of the album is pretty good. You can get the album, Re-arrange Us, on Amazon.com’s MP3 store. No DRM, just plain, high quality MP3 files.
(PS. Don’t forget to watch Brea Grant on Heroes in a few weeks, and check out other books and music she likes over at Coolspotters. And, no, I’ve got no connection to her, business or otherwise. Just a fan since I saw her on Friday Night Lights.)
(I’m not a Rails hater, but I hate the Java haters in the Rails community, and there are a ton of them)
So, a few weeks ago I linked to a funny video from RailsEnvy that made fun of Java programmers. In it, they make fun of jars, the packaging format for Java that has existed since the beginning of Java. I laughed because, yes, I got the joke the Rails guys were making, but in the back of my mind I went, “Gosh, gems seem like more of less the same thing.” No matter, we’ll forgive the Rails guys their crowing (heck, it would be impossible to admire their work if one didn’t ignore the constant crowing).
Then, today, I run across a number of blogs that want developers to release everything as gems. Everything, including full applications. Then there’s conversations about unpacking the gems into the vendor tree in your Rails apps.
At this point, I’m ready to throw up. I was simply confused at the first part, uncomfortable about packaging my whole app as a gem, and then completely ill by the end. Folks, you’re over-engineering your build/test cycle! Seriously, STOP!
Regardless of my actual opinion here, I really just want to point out that the entire bit about hating jars is about hating manual dependency management. All platforms have some variation of it. Perl and Ruby have gone the way of standardizing on a “one true way” to distribute libraries for the core lang (CPAN modules and gems, respectively). Java has only relatively recently enjoyed widespread adoption of Maven 2 and things like buildr. Historically dependency resolution and installation was a manual process.
All of this doesn’t eliminate the fact that as you try to package external dependencies and deal in higher level bundles, you have to manage those dependencies. None of the automated solutions are perfect. I find it funny that a community that beats up on Java fairly constantly is actually reinventing the exact same solution for the problem. And, since it’s a solution coming out of the Rails community, it’s “teh awesome!”
Yes, I’m whining. And really, I’ve never seen a community so proud of it’s NIH syndrome. Yeesh. It’s not everyone, but a lot of the haters are truly unfamiliar with what they’re hating on.
(and yes, I understand the original issue with plugin versioning in Rails and why it needs a solution… and I’m okay with dropping them in favor of RubyGems because, see, I’m coming from the Java world where we used these things called jars and… God, I’m back to the beginning of this post again, aren’t I?) ![]()
I’m now deep into Rails land, and I’ve had a ton of Java experience at my former employer, so I feel like I’m in a good place to compare the two.
Bottom line, if I didn’t have to consider hiring issues, especially here in CT, I would go Java if I were starting up my own company. Rails is great, don’t get me wrong, but I feel tied down and held back by the limited choices in Ruby land. And the fact that I’ve had to debug makefiles and break out my C knowledge to figure out some clever things is quite scary.
Basically, I’m reacting to the immaturity of both Ruby and Rails. Both are young, slow, and limited compared to Java frameworks out there. The biggest bonuses of Rails tend to be useless when you actually get beyond the early parts of your app. On top of that, scalability is a known issue with Rails, and there are odd decisions throughout (Rails is inherently non-reentrant?!). These are getting fixed in upcoming major releases, so I’m sure in 2-3 years, they’ll be on equal footing with the best Java frameworks.
So, my advice is to focus on what your dev team knows and you’ll be fine. In my case, I’m pretty good at both Java and PHP and Perl, and Ruby was a snap to pick up, so this wasn’t an issue either way for me. Of course, Rails has enough hype now that it is in itself a selling point for a startup to both VC and investors. For that reason alone, I’m working in Rails. I have little doubt I could architect a site that could handle Twitter or ESPN Fantasy Football traffic in Rails, anyway, so it probably won’t matter.
I just finished a long ramble about this on a Startupping thread if you’re interested in a less coherent version of this post.
One of the weirder debates at my old job was moving from Ant to Maven. I always looked at it as way, way, way more complexity for marginal gains. That being said, Buildr looks good and I’ll be looking into it for my Java projects. Maven 2 was, by far, the most annoying thing about learning Appfuse.
No, not a subtantive comparison, just a funny video:
OK, so it’s not that accurate (I could make a list of Java advantages that would be quite long), but it’s damn funny. Not having to deal with compiler quirks and Makefiles would be at the top of my list (and, by the way, this is coming from an experienced Linux/OS X/Unix guy…). Java just makes that stuff very easy.
Interesting dependency injection framework for Java 5. Similar to Spring’s DI framework, but Google claims it’s lighter-weight and better for just DI.
Interesting development. I’ve never used Tangosol but it does seem like a great product.
If you’ve done any serious development with server side Java, you become intimately familiar with the behavior of the JVM’s Garbage Collector. I’ve spent countless hours testing JVM configuration under load and it’s not fun. The biggest, most common problem is garbage collector pauses. Basically, for those of you that aren’t Java programmers, the Java Virtual Machine manages all of the memory being used by a Java program. When it tries to clean up objects your program isn’t using, it will stop your app from running while the collector does it’s thing. There are ways to limit it, and there are interesting solutions like Azul to reduce the pauses, but it’s a common problem.
I was floored when I read this, though:
We have several clients running 20 - 30 GB JVMs. Only consistent problem I hear is not stability but GC pauses of “minutes.”
I’ve typically run services will single-digit GB heaps and we’ve seen seconds (which we consider unacceptable). I don’t want to imagine our users’ reactions if we ever had pauses of minutes…
I’m evaluating both Hibernate and iBATIS as a replacement for our in house ORM/DAO libraries at work.
Anyone had any experience with both in a high traffic web application? Any experience in general?
I’ve been reading books and doing a bunch of research, including building a test application and I’m pretty much down to which persistence layer I choose. It seems like iBATIS makes more sense to me, as I’m in control of the SQL and there’s less “magic” happening. I keep reading posts and forums messages online that seem to imply there’s some extra features in Hibernate that help with “complexity” (what that complexity is often is left undefined). Since both can use a variety of cache providers, including OSCache, my favorite so far, I’m not really sure what other major differences there are. I’m still reading about iBATIS, though.
In any case, I’m curious if people who have used either could leave comments on their experiences and why they chose one or the other. I’d appreciate it.
A coworker just ran into an interesting feature in Java that created a subtle bug. Most Java programmers know what the += operator does when used like this:
op1 += op2
Basically op2 is added to the value of op1 and then assigned to op1. So, for example:
bankAccount += 100;
// bankAccount now contains 2100
Well, what happens in Java if you accidently type =+ instead of +=?
He didn’t know, I didn’t know, and another excellent Java programmer here had no idea either. So, off to look at the list of Java operators to make sense of it.
I’ll post the answer after the jump.
(Click here to read the rest of this post)





