LEAN JAVA WEB
Are you kidding ME?
Oh!! E agora...
-
Groovy
Quem poderá responder??
-
Grails
-
RatPack
-
Spock
-
Geb
-
Glide
Groovy
-
Groovy
Quero escrever menos!!
Groovy: http://groovy-lang.org/ (Source Code)
Guillaume Laforge(git@glaforge)
Apareceu 2003
Groovy
def list = [5, 6, 7, 8]
assert list.get(2) == 7
def range = 5..8
assert range.size() == 4
def map = [name:"Gromit", likes:"cheese", id:1234]
assert map.get("name") == "Gromit"
assert map.get("id") == 1234
def words = ['ant', 'buffalo', 'cat', 'dinosaur']
assert words.findAll{ w -> w.size() > 4 } == ['buffalo', 'dinosaur']
def words = ['ant', 'buffalo', 'cat', 'dinosaur']
assert words.collect{ it[0] } == ['a', 'b', 'c', 'd']
class Pessoa {
private String nome
private int idade
}
Static Typing Where Possible, Dynamic Typing When Needed:
The End of the Cold War Between Programming Languages
Grails
-
Grails
Quero escrever menos ainda
E para a WEB ...
Grails: https://grails.org/ (Source Code)
Graeme Rocher (git@graemerocher)
Apareceu 2005
Grails
grails create-app loja
cd loja
grails create-domain-class Produto
grails generate-all loja.Produto
grails run-app
links:
RatPack
Aí tem muita coisa que não vou usar!
Dá para ser mais objetivo?
-
RatPack
RatPack
@Grab("io.ratpack:ratpack-groovy:0.9.8")
import static ratpack.groovy.Groovy.*
ratpack{
handlers {
get{
render "Hello world!"
}
}
}
Glide
-
Glide
Deploy caro e complicado!!
Quero escrever menos ...
Glide: http://glide-gae.appspot.com/ (Source Code)
Kunal Dabir (git@kdabir)
Apareceu 2012
e pagar menos também
Glide
glide -a myapp create
glide -a myapp run
glide -a myapp deploy
package views.post
import model.Post
new Post(title: params.title, content: params.content, user: users.currentUser).save()
redirect "/"
Spock
-
Spock
Eita!!!
"Agora tenho que testar TUDO!!"
Spock: http://spockframework.org (Source Code)
Peter Niederwieser (git@pniederw)
Apareceu 0.1 = 2009
Spock
import spock.lang.*
// Hit 'Run Script' below
class MyFirstSpec extends Specification {
def "let's try this!"() {
expect:
Math.max(1, 2) == 3
}
}
GEB
-
GEB
Aqui ...
Preciso garantir a navegação também
Sem querer explorar...
Geb: http://www.gebish.org/ (Source Code)
Luke Daley(git@alkemist)
Apareceu 0.1 = 2010
GEB
import geb.Browser
Browser.drive {
go "http://myapp.com/login"
assert $("h1").text() == "Please Login"
$("form.login").with {
username = "admin"
password = "password"
login().click()
}
assert $("h1").text() == "Admin Section"
}
END...
@
May the force be with you!
@Grab
LEAN JAVA WEB: Are you kidding ME?
By jonatasemidio
LEAN JAVA WEB: Are you kidding ME?
- 2,344