Ratpack and You
Dan Hyun
@Lspacewalker
Me
@Lspacewalker
github.com/danhyun
What is Ratpack?
Web application framework
100% Java (jdk8 only as of 0.9.9)
Netty + Guava + Reactive Streams
First-class Groovy & Guice support
What is Ratpack?
“Ratpack tries to bridge the performance/convenience gap via its execution model.”
-Luke Daley
http://ldaley.com/post/97376696242/ratpack-execution-model-part-1
Hello, World!
@GrabResolver('http://oss.jfrog.org/artifactory/repos') �@Grab('io.ratpack:ratpack-groovy:0.9.11') � �import static ratpack.groovy.Groovy.ratpack ��ratpack { � handlers { � get { � response.send("${new Date()}") � } � } �}
Another framework?
Pure runtime (no dev binaries!)
Build it how you like (first class Gradle support)
Amazing testability
Easy deployments
Module based “plugin” architecture
Performance - low resource, great throughput
Extras
IntelliJ + Spring Loaded
Groovy script auto reload
Leverage all gradle plugins (compass plugin, asset-pipeline)
Ratpack Essentials
Launching
Handlers
Context - context registry
ExecControl - async power
Testing
Ratpack Live Code
git clone \
git@github.com:danhyun/ratpack-and-you-2014
Ratpack Modules
Codahale metrics, Groovy, Guice, H2, HikariCP, RxJava, Hystrix, Spring Boot, Session, Handlebars, Thymeleaf, Groovy Markup Template Engine
Caveats
Still pre 1.0 (1.0 targeted for July 2015)
JDK8 only - Deal breaker?
Ratpack in the Wild
Ratpack Future?
Grails 3?
Gradle + Spring Boot + Ratpack
App profile http://www.slideshare.net/lhotari/ratpack-andgrails3
Ratpack Resources
https://github.com/ratpack/ratpack/issues
“Learning Ratpack” O’Reilly 2015
Ratpack & You
Questions?