Spring MVC Apps With Groovy
Kunal Dabir
Why Groovy?
because its groovy :)
what are the options?
- JVM -> Scala, Clojure, Kotlin, Ceylon ?
- Other-> Ruby, Python, PHP
Reality Check
You are on existing project, Can you now :
- Change Language ?
- Change Framework/Architecture?
- Add a Library?
- Add a plugin to Build?
Why Groovy ?
Language overheads are minimal
like, optional semicolon, optional return, optional function parens etc.
Native language level support for map and lists,
def list = ["groovy", "spring", "hibernate"]
Operators overloaded intelligently
list << "rocks"
WHY GROOVY ?
Sensible Defaults
Class public by default, Fields private by default,
Methods public by default,
Automatic accessors (properties)
WHY GROOVY ?
Optional Typing - def
Closures,
String templates,
Multiline strings,
First class regex,
Awesome Builders (MarkupBuilder,
SwingBuilder, AntBuilder)
Why With Spring-MVC and Hibernate?
Easy to add in existing projects
If you are just making the switch
Hate learning curve of yet another framework
ELSE ?
Use Grails, Gaelyk (GAE), Ruby on Rails,
Django, Sinatra, Node.js ....
pick your poison
CODE DEMO
Download the code from :
spring mvc and groovy
By Kunal Dabir
spring mvc and groovy
- 4,100