14 Jul
Posted by suresk as Uncategorized, Technology, JEE, Enterprise Development, Software Development
I use Java almost 100% of the time in my day job. I think it is perfectly suited for what we do and love working with it. I also do work on the side and am really struggling to use Java for that stuff.
I actually think that with some really cool developments made over the last few years, Java is just as fast to develop with as Rails is. The language, to me, is better than Ruby (though there are some cool things in Ruby, and this is just my subjective opinion), and I like developing in it more. I’d really like to leverage my experience with Java I gain from work, and I’d like to have more time to play around with stuff I can’t spend a lot of time on at work, like Scala, Groovy, JBoss Seam, iceFaces, etc.. So, why the dilemma?
Deploying small Java apps is still pretty tricky. Rails (and PHP) are easy to deploy to a commodity host (< $10 per month). There are far fewer Java hosts, and they tend to support fewer features, cost more, are behind on the technology, and are difficult to use. Currently, the best and cheapest way I've found is to get a VPS. This works reasonably well, but is a little expensive ($30 per month or more for what you need to run a Java app server) and takes a lot of tweaking to optimize memory usage and allocation.
I realize that smaller, hobbyist apps are not necessarily the target market for JEE, but I think this is part of the problem. Making it easier for these types of apps would attract more people to the platform who may now be turned off by the comparatively higher time and money investment required. It also helps those of us who would like to use our Java skills for side projects and also experiment with newer libraries and features that we couldn't otherwise do at our day jobs.
I know a lot of other Java developers face this dilemma. I've had numerous conversations with co-workers about this very topic. A previous post where I showed how to get JBoss AS (and Seam) running on a VPS generated some comments on the blog and via private email about this issue. So, I guess I’m curious to see how others have dealt with this? And, is there any hope for easier Java app deployment in the future?
13 Responses
Keith Sader
July 16th, 2007 at 7:12 am
1I think the part where Java/Java-framework development really shines is in i18n. Rails still hasn’t got this right - yet.
However, I think your assessment of hosting options for the hobbyist is correct. Java has not enabled hosting providers to leverage the language for ‘casual’ developers.
Michael
July 16th, 2007 at 10:18 am
2Rails got i18n right, though maybe you’ll spend more time figuring that out. But it is definitely there, believe me.
Steve
July 16th, 2007 at 10:30 am
3For cheap, shared java hosting, go to lunarpages
http://www.lunarpages.com/index.php
You can do shared java hosting for 10, 11 dollars / month
However you just get a servlet container and not an ejb container…
I wouldn’t recommend rails, or java on a shared env that you will eventually get a lot of traffic on, as they are both memory intensive.
java is not a popular option for web hosts b/c they are trying to pack customers in like sardines on a box…and trying to fit 200 jvm’s w/ all those classes loading on a machine isn’t as feasible as 200 php websites.
evanx
July 16th, 2007 at 11:06 am
4you can get $15 VDS with 256megs - which is enough to run, but not start, JBoss 4.1 - but might be enough to start and run JBoss 4.2 and/or Glassfish?! Cos i heard that Glassfish only starts up services on demand?
Failing that, you can of course run servlets, plus JSF, using Tomcat, and Jetty.
Sean Bowman
July 16th, 2007 at 11:12 am
5I’ve got both a ton of Java and Rails development under my belt, and I’ve got to say your assessment of “Java is just as fast to develop with as Rails is” shows your strength in Java and your weakness in Ruby. No criticism, but look at Ruby for its strengths, and let go your Java design tendencies. You’ll find Ruby on Rails is leaps and bounds faster to develop apps with than Java.
The reason you’re not seeing Java on the hosting services is memory requirements. Java gobbles up such vast amounts of memory that hosting providers just can’t handle more than one or two app server instances per server, which is just too expensive.
suresk
July 16th, 2007 at 6:09 pm
6“…I’ve got to say your assessment of “Java is just as fast to develop with as Rails is” shows your strength in Java and your weakness in Ruby.”
Perhaps. I really do need more experience with Rails before I can make a definitive statement either way. Have you used JBoss Seam though? If it doesn’t make Java development as fast as Rails development, it at least closes the gap quite a bit.
I have to ask - What makes Rails so much faster? Is there something preventing Java apps from being as fast to develop?
Stuart Clayman
July 17th, 2007 at 6:21 am
7You should look at GRAILS. http://grails.codehaus.org/
It has the best of both worlds. It is rapid to develop apps in like RoR,
but is written using groovy, so all your Java knowledge and skills are
still appropriate. As it is all JVM underneath, you can deploy to wherever
you want to.
From my perspective, I did one app in RoR and liked it a lot.
Then 2 weeks after deploying that, I found GRAILS.
That was a year ago. We haven’t looked back since.
stuart
Robert
July 17th, 2007 at 7:36 am
8I think the main issues currently w/ Java development are: 1) the need to make development time “investment” proportional (e.g. make the easy things easy), which is mainly an issue with over thinking the design (e.g. Seam might be great for big projects, but the amount of setup needed is just overkill to get started on a small project) and 2) too many “me too” frameworks, while some choice is good, it seems to me that there are probably at least twice as many Java web frameworks as needed making picking one a problem.
Robert
July 17th, 2007 at 7:45 pm
9While there are far fewer hosting companies for Java, the good ones are up to date. I host my latest app at eapps and they have jdk 1.5, JBoss, tomcat 5.5.x, etc. ability to restart tomcat (private JVM w/96mb), etc. Not too bad for $25.
The problem with java hosting is that it takes more work for the providers and most don’t want to deal with it. Shame, but that is the way it is.
Stan Berka
July 17th, 2007 at 7:52 pm
10Actually, the solution to the dilemma seems to me to be the Groovy and Grails. Why?
* performance much better than RoR (after all, it’s using a well optimized Java VM)
* you don’t have to learn a new language like Ruby, but have in Groovy all the new “stuff” of a modern language
* you can utilize all your Java libraries/code without doing anything special, just copy and paste, if you prefer it
* it’s cool!
suresk
July 17th, 2007 at 8:00 pm
11Robert - I’d be interested in hearing who your host is.
As for Groovy/Grails… I like Groovy, and I think Grails is interesting, but I don’t see how it helps this situation? My reason (in part, at least) for choosing Ruby is deployment..
Björn Wilmsmann
September 19th, 2007 at 7:07 pm
12Being an incredibly young language, Groovy does not come even close to Ruby in terms of maturity. Regarding its alleged performance advantage: Just using the JVM as runtime environment does not make a language as fast as Java. Otherwise, JRuby or Jython would be just as fast as Java, too. In fact, current benchmarks clearly show that Groovy tends to be much slower than Ruby. I don’t say that it does not have the potential to be faster than Ruby one day, however, at the moment it is not.
Apart from speed and maturity isssues of Groovy itself, Grails at the moment seems like a desperate attempt to catch up with the groundbreaking concepts brought about by Rails. It might be a viable alternative in the future. However, at this time Rails clearly is the framework to choose if you want to develop web applications quickly and painlessly. There are cases where using JSF, Struts or some other kind of Java Web Framework still makes sense, though in most cases you will simply end up needing more time to accomplish your work than you will do with RoR.
Konstantin Gredeskoul
October 17th, 2007 at 1:09 am
13On java vs rails productivity:
As someone who’s been working with both Rails and Java in the last year and a half, I really think that there are tremendous productivity gains achieved with Rails, when building web applications. Especially when starting projects.
In Java you typically have to pieces various open source frameworks together, and keep them independently upgraded as projects keep moving on. Rails combines design patterns, MVC, persistence and automated testing in a single framework, which is what makes starting a new project so much more simple compared to java.
Java project setup right with right team can perhaps be just as productive, but having to make less choices is often a way to streamline things a bit.
RSS feed for comments on this post · TrackBack URI
Leave a reply
Categories
Archives
Links
Meta
Recent Entries
Recent Comments
Most Commented
SpencerUresk is proudly powered by WordPress - BloggingPro theme by: DesignDisease