Which framework should I use (RoR, Grails, Java/Hib/Spring)?
-
I would like to create the back-end framework for my website using one of the following: Groovy Grails, Ruby on Rails, or Java. My main concern is scalability/performance and being able to potentially support the same number of users as a website on the level of Yelp. I will be using HTML5/JavaScript/Jquery1.6 for the front end and MySql and MongoDB or Casandra for the DB. Any info would be greatly appreciated, I am fluent with Java and have made a few small apps with Groovy/Grails. I have no experience with RoR but could probably learn it quickly and have friends that could help. Edit: some additional info; the app will have to be able to handle large sets of data, primarily read heavy.
-
Answer:
Having worked in all three of these environments (sometimes simultaneously), over the past year, I'd say: 1. If you are doing something time-sensitive, then go with what you know (Java). 2. If you're looking for something better, go with Ruby on Rails. Grails is fine if you are 'stuck' on the JVM, but it's largely an attempt to re-create the Rails environment in Groovy (on the Java VM). If this is a green-field project, you're probably better off just using Rails instead of a facsimile. If you need the scalability of the JVM later, you can move your Rails app to JRuby. 3. If you want to stick with Java, but need the rapid-prototyping / scaffolding, etc. take a look at Spring Roo. It's an environment that does this sort of stuff, but generates Java code, and it will save you a bunch of time.
Rich Freedman at Quora Visit the source
Other answers
I would use whichever framework you believe will allow you to deliver features most efficiently while building your project. Any of those frameworks can scale to support a large volume of users and leave you with well known paths to scaling further if you are so fortunate as to need to. Having used both Spring and Rails I think I would favor Rails for any new project. I find development in Ruby much faster than in Java and think it would be a net win even when accounting for the learning curve of developers new to the language and framework. I have found that the Ruby community provides a great set of tools to solve many common problems and the html templating options and javascript integration in Rails makes building the front end of a site much easier than anything I found available with Spring. Whatever you choose some reasonable db indexes, web server caching, and a well designed set of stateless controllers should allow you to easily scale to the limits of a large single database instance. That's way more than enough capacity to learn that supporting even more users is not a problem. Instead worry about building a product which can actually start to attract that volume of traffic. Even rudimentary monitoring should give you an idea if you'll ever need to worry about sharding your database or making other architectural changes to support increasing traffic. Unless you happen to have a large pile of money and a bunch of time you want to burn don't scale prematurely. Make reasonable decisions guided by any of these frameworks, monitor your growth and performance so you know when you need to make changes and more importantly what you need to change, and focus on building valuable features.
Jonah Williams
Give the java/scala based Play! Framework a try - http://www.playframework.org/Watch the 8.5 minute tutorial ... it seems to be a powerful webapps framework that borrows principles from the RoR world. In addition to (http://www.playframework.org/), there are many -based web and web service frameworks, and the stack is mature, modern, powerful (for example it is used for the demanding parts of 's back-end) and supported by companies like : http://typesafe.com/
Ron Gross
Not only would I say you should go grails, I would say we went grails and are loving it. Java developers are up to speed in weeks and wildly more productive within months than they ever were in java frameworks. Love the JVM ecosystem over RoR and Ruby still occurs to me like the next generation of Perl. I don't find it readable imho. We are handling 8 million unique visitors around 25 million page views through grails at http://www.virtualtourist.com One more tought that some people seem to miss. Grails uses Spring and Hibernate under the hood, so if you have those skills, the transition to Grails is very quick.
Todd R. Ellermann
In my opinion, you should go for Groovy on Grails. You can write code in both Java and Groovy whatever you like. It will give you both scalability/performance, there is GORM on top up hibernate ready for you. You can easily integrate with any frontend frameworks jQuery, angularjs or emberjs.
Prayag Upd
First, if you will have problems with the scalability then you will be lucky. That means your application has traction, lots of it. At this stage, I bet you will have investors and money to hire scalability specialists, rewrite your application and buy more hardware (or pay for the cloud). So, wait until you get there. Yelp took years to reach that level and I bet they have re-written their application several times to accommodate the growth (they use Python, Ubuntu, MySQL). Second, I didn't know about Groovy Rails (and Groovy language) and I bet many of web developers don't know either. That means it's pretty new and that means probably you won't find many web developers to know it or know much about it (including scalability). I see they have some cases studies but none are very high traffic websites, I think. But I heard a lot about Ruby on Rails and Java. Twitter was originally built on Ruby on Rails and just recently switched to Java and . That means RoR can be scalable. But again, do you think you will have Twitter's traffic? Or close to it? There are more examples of website built in RoR and some of them have high traffic: You can find RoR developers more easily than Grails and even more easily you can find Java developers. In the end, you will choose whatever language you know best and if that is Scala or Java then why not? Like I said, you shouldn't be concerned with the scalability issue in this phase. It's too early and it's pointless. Instead just build the stuff. Whatever language you will use, when you will have scalability issue I bet you will have to rewrite the application and bring other improvements to it to accommodate this. Read this please: The Number 1 Reason Startups Fail http://techcrunch.com/2011/08/29/what-kills-startups-blackbox-releases-reportapp-to-help-founders-avoid-the-deadpool/ (premature scaling on all levels) [1]
Mircea Goia
Build small apps in each of them and see what you prefer. If your app is time sensitive just go with what you know as you'll get to market quicker. If you want to try Grails and get introduced to our community come on out for the Grails48 hackathon http://www.grails48.com and work on a project with one of the teams. Can't think of a better way to test out a framework than working with it for 48hrs straight with some of best developers within the community.
Jeff Thorne
I'd go with Grails. You have the same agile high productivity web development of RoR, and the power of Spring/Java on the backend. If you're building a large scale web application, Java will scale and easily handle the complexities of a distributed application.
John Thompson
With the given choices, and my Java experience, I'd stick to Java. was already mentioned. Another choice would be JAX-RS REST stacks such as on the back end, and pure JavaScript + HTML5 on the front end. (This answer is late, so I presume the asker has already chosen one of the solutions.)
Miguel Paraz
Stick with java and take a look at Google http://code.google.com/p/google-guice/ I'm using it with jQuery and it works great. Much higher power to weight ratio than the heavy frameworks. Watch this video on "Twitter: From Ruby on Rails to the JVM"
John Stark
Related Q & A:
- Which preposition should I use?Best solution by German Language
- If you were to start using a Wordpress framework today, which one would you use?Best solution by WordPress
- Which framework to use in my enterprise application?Best solution by Stack Overflow
- What framework must I use to develop mobile native application?Best solution by Stack Overflow
- Which one is better? And Can I use it for single speed?
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.