Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Human Talks: N'ayez pas peur de faire du Groovy
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Cédric Champeau
November 18, 2014
Programming
570
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Human Talks: N'ayez pas peur de faire du Groovy
Slides du lightning talk donné à HumanTalks Nantes.
Cédric Champeau
November 18, 2014
More Decks by Cédric Champeau
See All by Cédric Champeau
Integrating Python and Java easily using (Micronaut) GraalPy
melix
0
110
JSol'Ex : traitement d'images solaires en Java
melix
0
290
JSol'Ex : solar image processing in Java
melix
0
930
Ecrire un microservice Java natif avec Micronaut et GraalVM
melix
1
290
Micronaut Test Resources
melix
1
340
Micronaut Test Resources
melix
1
500
AlpesJUG: Micronaut Test Resources
melix
0
180
Micronaut_Test_Resources.pdf
melix
0
280
Consommation électrique du foyer
melix
0
330
Other Decks in Programming
See All in Programming
残高管理から台帳サービスへの進化
artoy
1
220
JIS keyboard support in Omarchy
lef237
0
160
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
160
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
3
600
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.1k
ActionController meets Protocol Buffers
sorah
1
730
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
3
1.3k
AmebaブログはKMPから卒業します
kmars0605
0
270
最近”作らせてる” ローカルAIアプリの話
akit37
0
500
Modernizing iOS Apps
seyfoyun
0
120
sbt 2.0: takeoff
eed3si9n
0
170
Seven New Principles of Software Engineering
yegor256
0
350
Featured
See All Featured
How to make the Groovebox
asonas
2
2.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
470
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
600
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
470
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
BBQ
matthewcrist
90
10k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
290
How STYLIGHT went responsive
nonsquared
100
6.3k
The Language of Interfaces
destraynor
162
27k
Transcript
N'ayez pas peur de faire du @CedricChampeau
Made in Nantes
Scripting
log.message "Releasing Groovy $version with user: $user" def desc =
"Release of $version" def date = new Date().format("yyyy-MM-dd'T'HH:mm:ss.SSSZ") def remoteCall = { String url, List params, Closure onFailure -> def p = ['curl', "-m", "3600", "-u", "$user:$key", *params, url].execute() int code = p.waitFor() def resp = p.text log.message "${resp}" if (code!=0 || resp.toLowerCase().contains('error') ) { onFailure(code) System.exit(code) } }
DSLs
remoteSession { scp { from { localDir "$buildDir/application " }
into { remoteDir '/usr/local/myapp' } timeout 10.minutes } }
Java friendly
@Immutable @ToString class Person { String name int age String
greet(String them) { "Hello $them, my name is $name" } }
Dynamic
@ToString class Person { String name int age } def
storage = [new Person(name:'Cédric', age:35), new Person(name:'Hugues', age:44)] Person.metaClass.static.methodMissing = { String name, args -> if (name.startsWith('findBy')) { String prop = (name - 'findBy').toLowerCase() storage.findAll { it."$prop" == args[0]} } } println Person.findByAge(35)
Static
@ToString class Person { String name int age } @CompileStatic
void erreurDeCompil() { println Person.findByAge(35) }
Functional
new URL('http://beta.groovy-lang.org').text .split(' ') .findAll { it == 'Groovy' }
.size()
Microservices?
@Grab('com.h2database:h2:1.3.179') import grails.persistence.* @Entity @Resource(uri='books') class Book { String title
}
Builds
apply plugin: 'groovy' repositories { jcenter() } dependencies { compile
'org.codehaus.groovy:groovy:2.3.4-beta-3' }
Android
notify(NOTIFICATION_ID) { smallIcon = R.drawable.ic_action_alarms largeIcon = cachedBitmap contentTitle =
'Time left' contentText = "$timeLeft (Elapsed: ${rounded}%)" contentIntent = pendingActivityIntent(0, intent(WearPresentationActivity), FLAG_UPDATE_CURRENT) ongoing = true style = bigTextStyle { bigText """Time left for your presentation: $timeLeft Elapsed time: ${rounded}%) """ } }
Templating
layout 'layouts/main.groovy', true, pageTitle: 'The Groovy programming language - Mailing-lists',
mainContent: contents { div(id: 'content', class: 'page-1') { div(class: 'row') { div(class: 'row-fluid') { div(class: 'col-lg-3') { include template: 'includes/community-navbar.groovy' } div(class: 'col-lg-8 col-lg-pull-0') { include template: 'includes/contribute-button.groovy' h1 { i(class: 'fa fa-envelope-o') {} yield ' Mailing-lists' } ...
Et tant d'autres...
None
Merci ! @CedricChampeau