简体   繁体   中英

Do I have to know groovy before learning grails?

在学习grails之前我是否必须知道groovy?

Complete fluency with Groovy is nice, but not necessary. It's possible to begin with Grails without mastering Groovy.

"Grails In Action" has a nice one chapter intro to Groovy.

I think it's more important to have a foundation in Spring and Hibernate so you can tell what's going on.

If you are a Java programmer, there is almost no learning curve to Groovy. You can fall back to Java whenever you want. Just get started with grails, and you will learn Groovy as you go. Groovy just makes Java easer with list manipulation apis, closures, XML parsing, etc.

I have a co-worker that started Grails withouth Groovy knowledge and learnt his way into the language, but he still wrote far less efficient and bloated grails code just by "falling back to Java", since learning Groovy is more than learning syntax.

Learning Groovy is about changing your programming habbits, and Grails is even more about that. So you should take a week of pure Groovy with "Groovy in Action" before starting "Grails in Action" or just visit the Groovy User Guide for what the differences are from the other languages.

Groovy is very easy to pickup if you know java. If not, its slightly hard (but not much).

You can also learn grails along with groovy at the same time, as long as you know java and programming concepts in general (things like data structures (maps, linked lists etc), loops, recursion etc).

If you dont know any java, or have never programmed before, then i suggest you start at the basics http://groovy.codehaus.org/Beginners+Tutorial , or learn from a book first before starting with grails. Otherwise, certain shortcuts/idioms in groovy/grails may confuse you to no end.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM