Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Groovy Grails or Scala Play

I am deciding if I should learn Groovy and Scala, and currently I am comparing web frameworks. I like the Groovy language a bit more, but Play! works with both Java and Scala. Another thing pointing me towards Play! is the tight CoffeeScript Integration. For collaboration purposes, I need my framework to be able to affectively communicate and interact with some sort of JavaScript. For my choice I have a few questions on the Grails frameworks.

Questions

  1. Can Grails use Java, or just Groovy?
  2. Does Grails have any tight JavaScript integration? I mean can the two technologies communicate at runtime?
  3. The Eclipse Grails Project seems to be maintained by spring. Does this mean Groovy can use Spring?

I am still confused on which to learn. Hopefully the answers to these questions will help me decide which to learn.

like image 638
James Parsons Avatar asked May 28 '14 14:05

James Parsons


1 Answers

All of this information is widely available on the internet, easily found using Google or your favorite search engine. That said, here are the answers to your questions:

Question: Can Grails use Java, or just Groovy?

Answer: Grails uses both. Groovy is a dynamic language which runs within the JVM and in a lot of ways extends Java. Grails uses both Java and Groovy. You can use both within your Grails project as well. This allows you to leverage the vast array of Java libraries available. Much like Grails itself does.

Question: Does Grails have any tight JavaScript integration? I mean can the two technologies communicate at runtime?

Answer: Any Javascript library can be used, and they can (if you make them) communicate at runtime. (Your question doesn't really make a lot of sense). In regards to coffeescript (which you mentioned in your question), there are plugins available that will compile coffeescript at build time for your Grails project.

Question: The Eclipse Grails Project seems to be maintained by spring. Does this mean Groovy can use Spring?

Answer: Grails is built upon Spring, so yes. You (and it) can use Spring. There are a great number of reasons to leverage the Spring framework within your Grails project, and with the Bean builder DSL it's fairly straight forward to do so.

like image 101
Joshua Moore Avatar answered Oct 10 '22 02:10

Joshua Moore