DEV Community

Discussion on: Why should I not choose Ruby on Rails ?

Collapse
 
gregopet profile image
Gregor Petrin

Grails is a framework while Kotlin is a language so you can't directly compare them.

You can compare Grails vs. Spring Boot (regardless of the language in use, and you have quite a few to choose from) in which case Grails is a more opinionated, convention-over-configuration framework with lots of helpers, integrations and concepts that would be left for you to implement on your own in Spring Boot. It has, for instance, its own persistence framework, based on Hibernate down below but looking a lot more like Rails' active record to the programmer. There's plenty more: centralized URL mappings, command objects, a service layer, HTML helper tags and JSON & HAL renderers come to mind first, but do take a look at the docs yourself (and the docs are pretty good btw, which is a huge bonus).

As for the languages, Groovy and Kotlin are loosely related; Kotlin actually took a few of its concepts from Groovy (as did Swift). Groovy is a bit wilder, optionally typed, script-like language, comparable to Ruby. Crazy productive! .. though sometimes its wild side is a bit too much. Kotlin on the other hand is strongly typed, with extra strictness added on top (e.g. null safety and immutable variables). Personally I prefer to use Groovy for scripting and the view layer, and Kotlin for the business logic.

Theoretically, you could use Kotlin to write Grails code, but it's probably not optimal because a lot of the Grails magic relies on Groovy's concepts.