views:

1808

answers:

5

Hi,

I'm planning on writing a simple web application that will be used by lots of users (as complicated as a simple bookmarking app) and I'm trying to decide which framework/language to use.

I'm very experienced with Spring/Hibernate and Java in general but new to both Grails and RoR (and Spring ROO). The only reason I'm considering RoR is because Java hosting is MUCH more expensive than RoR hosting (which is supported by almost any hosting vendor for 5$ per month).

Assuming the price wasn't an issue, which one of the frameworks/languages mentioned above would you recommend for a Java developer (who knows how to configure Spring/Hibernate etc.)? I'm afraid that by using RoR I won't be able to easily support many users who are using the website at the same time.

thanks

+2  A: 

Performance issues with RoR are going to be caused more by the $5 hosting plan than by the choice of language and framework. Consider Heroku for your hosting, as you can start cheap / free, and then scale up as needed.

For a simple bookmark app, however, Rails is probably overkill. Take a look at the Sinatra framework as well, as you weigh your options.

jdl
I'd probably want my application to be a bit more complex in the future, but still not very complicated. In general - do you consider RoR better than java/Grails for such applications?
Liz
In general I would not use a Java framework for an app like this. However, since you already know Java you'll get it up and running much faster. If you're doing this as a hobby, or an excuse to learn something new, then go with Ruby.
jdl
A: 

Have you looked at Gaelyk? http://gaelyk.appspot.com/

It's a lightweight Groovy framework for Google App Engine

leebutts
+5  A: 

First you can have a look to these related questions :

http://stackoverflow.com/questions/81830/rails-or-grails

http://stackoverflow.com/questions/5087/learning-ruby-on-rails-any-good-for-grails

http://stackoverflow.com/questions/1283935/what-technology-asp-php-joomla-rails-grails-for-a-website-from-scratch

http://stackoverflow.com/questions/397228/is-grails-worth-it

http://stackoverflow.com/questions/2055396/is-grails-now-worth-it

Now, I will try to answer you according to your requirements you have communicated and the information I have gathered from the internet and my own experience.

Ruby on Rails

I do not advice you to start with RoR because you are a Java developer and you will have to learn a new language (Ruby) and a new environment (Rails). The hosting issue is not a real issue. You can have a VPS hosting plan for $10 (www.enjoyvps.com) perfectly suited for small grails app. If you application needs more memory, you might need to add another 10 Bucks.

If you hosting is really THE critical factor, go with Python/Django or PHP/Kohanna (a very good MVC framework). Otherwise, according to your background, Grails is more suited for you than Rails.

Grails

Few months ago, I had the same dilemma as yours and I decided to have my way with Grails. Why?

Because it's cool !! I mean, community is very helpful and dynamic, Groovy is a pleasure to develop with (be careful : thereafter , there are good chances that you will loath Java). Also, it is a state-of-the-art framework based on very-well established technologies (Hibernate, Spring, Java) and hence, it can improve considerably your market value as a developer. Grails is my favorite

Spring Roo

Roo is Grails for Java. So if you don't want to learn Groovy and if you need pure Java application (that will always run faster than a Groovy-based app), go with it. The community is smaller than Grails but the project is supported by SpringSource who is quite active in the community. I think that if you want to go as fast as possible, this is the solution for you.

Spring Application

You should choose this option only if you don't like Spring Roo integrated technologies (Hibernate, JSP, Maven...) and you want Java absolutely. Otherwise, there is no interest (except for educational purposes) of spending hours of configuration and tuning when you can build sophisticated enterprise applications in a best-practice manner within minutes (with Rails, Roo or Grails).

Each of the options above will provide you enough performance for the application you want to build. A lot depends on best practices for website applications like good architecture design, correct usage of caching strategies and requests optimization...

My Bottom Line

If you have some time to spend for learning new concepts (Groovy, RAD...), go with Grails. If not, go with Roo. Forget about Spring App and Rails. If hosting is THE issue, so go with Python/Django. You can deploy on GAE, it's free scalable, performant and you will deal with the same concepts as Rails or Grails.

fabien7474
Thanks, I tried ROO and was a bit surprised by all the Aspects it creates (everything is via aop, even the ORM definition) - do I have anything to worry about in terms of performance?
Liz
I don't think so. Really, Roo is a spring application with other components. Nothing's fancy.
fabien7474
There is no benchmark out there but I guess that Roo is even more performant than Grails or Rails. Pure java is 2 times faster than Groovy/Ruby.
fabien7474
I guess I'll try Spring ROO. thanks for the help!
Liz
The aspects added by Spring ROO do not affect performance as they are applied at compile time - there are no runtime aspects being applied by ROO
Martin OConnor
+2  A: 

I don't understand the obsession with runtime performance. Given your scenario your primary focus should be on your performance, as in your ability to get things done with the chosen technology.

You will get more done in a given period of time with Groovy than with Java any day. Often one line of Groovy code will equate to 10 lines of Java code etc etc

Very rarely will byte code execution time be your performance issue, most often its...

  • Bad algorithm implementation or design.
  • Bad DB design and / or queries
  • Taking to long to get things done and then having all sorts of commercial relationship issues because of it.

With web applications you are usually not performing lots of long running CPU bound operations. Most of your request / response time is spent in the wire (internet routing etc) and in the DB (executing queries).

Choose a technology that takes a load off your mind and one that frees you from writing mountains of boiler plate code, so that you can rather concentrate on designing and implementing good algorithms, DB's and queries etc etc

Id personally choose Grails.

tinny
Also, you can deploy Grails applications on Google App Engine
tinny
I'd really like to vote this answer up 10 times.. :-)
Daniel Rinser
A: 

I chose Roo over Grails and Rails at my company. Runtime performance, easy debugging, nice Eclipse integration (it's plain old Java after all), no "black magic" happening at runtime. In fact, there is no Roo runtime library needed to run a Roo app, just the library dependencies like Hibernate and AspectJ. You can look at the code that is generated so you know exactly what is going on. Also a biggie for me is that Google has chosen Roo as the preferred tool for creating GWT apps going forward and they are throwing their support behind it. I have been extremely impressed with Roo thus far, I think it will be the tool of choice in the near future.