• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Spring Boot and Grails

Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is Spring Boot a replacement for Grails? If they are used together, what is the relationship? If not, what is the migration path for a Grails project to Spring Boot?
Posts: 422
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Spring Boot isn't really a replacement for Grails. In fact, as of Grails 3.0, Grails apps *ARE* Spring Boot apps: Grails 3.0 builds on top of Spring Boot! (FWIW, I cover Grails 3.0 a bit in chapter 6 of Spring Boot in Action.)

* I'd characterize the relationship as Grails (3.0+) being an extension to Spring Boot. It has the familiar Grails programming model, but the Grails project structure is embedded in a Spring Boot app making it possible to take advantage of both programming models.
* Spring Boot is opinionated with regard to auto-configuration, but doesn't impose much opinion into your application code. Grails, for good or bad, expects you to build your model and controllers in the Grails way, thereby imposing a programming model on your application code.
* Grails employs a small amount of code generation, whereas Spring Boot has no code generation whatsoever.
* The Grails programming model implies that you'll be coding in Groovy (at least for the model and controllers). Spring Boot makes no such demands, allowing for any JVM language including Java, Groovy, Kotlin, etc. In fact, I've seen some nice examples of using Kotlin with Spring Boot lately.

I can't say a bad thing about Grails...I'm a big fan. I can't say which is a better fit for any given project...that's a decision you'll have to make. But the good news is that even if you choose Grails, you're also choosing Spring Boot if you choose Grails 3.0.
CAUTION! Do not touch the blades on your neck propeller while they are active. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
    Bookmark Topic Watch Topic
  • New Topic