Java FUD

There’s a great article sys-con.com called: Why Do ‘Cool Kids’ Choose Ruby or PHP to Build Websites Instead of Java?
I’ve been developing desktop and web apps in Java for a fair few years and I’m no Java-basher by any means. But when I’ve built stuff in my spare time I’ve always used PHP, so I guess I kinda fall into the article’s cool kids category. Before I give my reasons for not using Java for spare-time projects I thought I’d post some of the great FUD from the cool kids article:
PHP and Ruby etc are cool for building pages, but they are not ideal candidates for building middleware logic. Given that Java covers the “high end” of the spectrum well (where sophisticated processing is needed), wouldn’t it be great to use Java all the way?
PHP, Ruby etc not good for middleware logic? I’d say that as languages, Ruby and Python are ahead of Java in terms of functionality – they both have rock-solid OO support and functional programming features like closures that are still not in Java. PHP is a bit behind but as of version 5 it also has sold OO capabilities. It’s simple enough to write well-structured classes and build code using well-known design patterns using Ruby, Python or PHP so I really can’t see how they are not suitable for middleware.
Is it Java as a programming language too difficult to use, comparing with those scripting oriented interpreted languages? Yes, this maybe the reason.
WHAT THE FUCK? On syntax alone I’d say that Ruby is the most difficult to pick up. The only reason I would consider Java more difficult to learn is that it’s strong-typed and a beginner would have to learn about casting, generics and so on. And I guess the insistence on abstracting everything to the nth degree does make for more verbose and more difficult to learn and remember syntax. This is Java-snobbery in action.
JavaServer Faces: JSF is the new kid on the block. Is it going to make building websites easier? Probably not. It is designed for simplifying building form-based applications.
If there’s one thing that turned me off from Java web development it’s JSF. I just cannot buy into it at all. How anyone can say that JSF simplifies anything is beyond me. I know JSF2.0 fixes a lot of 1.x’s problems but boy were there a lot of problems. Tons of Javascript injected into in each page just to make the basics work. POST requests for everything, this beggar’s belief, it breaks basic navigation and made it impossible to bookmark a page. Duh.
The scripting languages are pretty easy to learn, and lack the complexity of Java (generics being an exquisite example of that). To learn Java, it’s not like just picking up a book and having all you need to begin developing. This is the polar opposite of scripting languages, where a short book or online tutorial will provide all you need to begin. After all, many people would rather die than learn something new. And Java takes some effort to master. Whereas with a scripting language, the basics are easy and then one simply needs to learn about other “packages” or plug-ins.
This is a snippet from the first comment and this is real FUD-gold. Generics an exquisite example of complexity? I think the commentor, raysea, needs to go and find out why generics don’t exist in Python, Ruby, etc. The rest of this comment is again pure Java snobbery.
OK, a lot of websites are fairly simple, mainly composed of markup pages, scripts and some lightweight logic on the server side, where PHP and Ruby are good for. Java maybe an overkill for such websites. But there are a lot of websites that are much more sophisticated than “lightweight” logic on the server side. For example, FaceBook was relatively simple initially, but now with FaceBook API and Platform, its complexity is growing. Why not use Java for such websites?
He uses Facebook as an example of a sophisticated Java app but this is such an extreme example it’s not worth thinking about. How many people are using Java to build sites with Facebook’s complexity and scalability requirements? Next to none. So where is this extra sophistication that Java provides being used? People use the example of intranet sites with lots of controls. Is that harder in Ruby? Nope. And besides, same question as before: how many people are building intranet sites versus extranet ones? I find it hard to see many examples where I would need Java to build a site.
So why do the cool kids shun Java web dev?
For me, it’s simple: Because the cool kids what to get things done quickly and cleanly and they know full-well that their Ruby, Python or PHP app running on Apache will fly. The other reason is that Java web frameworks have mostly become bloated monsters that abstract everything to the nth degree and required a lot of XML config whereas Rails, CakePHP and Django have mastered the art of quick and painless web dev.
I don’t doubt that Java running on Tomcat will outperform PHP on Apache but unless you are writing the next Twitter it really doesn’t matter – unless your app becomes super popular you are never going to reach the limit of a scripting languages performance.
Well, I’m going back to Java from PHP
Java’s saviour has arrived. The Play framework takes the best ideas from Rails etc and offers a Java framework that eschews complexity, configuration and bloat and lets you concentrate on the job in hand: building great webapps.
Subscribe via RSS
RSS via Email
Follow me
Leave a Reply