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
Pourquoi vous devriez utiliser Groovy
Search
Cédric Champeau
November 25, 2014
Programming
280
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Pourquoi vous devriez utiliser Groovy
Talk donné au FinistJUG.
Cédric Champeau
November 25, 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
910
Ecrire un microservice Java natif avec Micronaut et GraalVM
melix
1
270
Micronaut Test Resources
melix
1
330
Micronaut Test Resources
melix
1
500
AlpesJUG: Micronaut Test Resources
melix
0
180
Micronaut_Test_Resources.pdf
melix
0
270
Consommation électrique du foyer
melix
0
330
Other Decks in Programming
See All in Programming
Webの地図
yosuke_furukawa
PRO
6
4.7k
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
490
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
2.4k
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
130
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
2
300
一人だけ、Kiroが静止する日
hideg
0
130
Verilogで学ぶCPU自作入門.pdf
uyuki234
2
900
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
900
すこし踏み込む CancellationToken
htkym
2
780
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
200
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
510
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.2k
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Believing is Seeing
oripsolob
1
220
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
850
エンジニアに許された特別な時間の終わり
watany
109
250k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Become a Pro
speakerdeck
PRO
31
6.3k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
440
ラッコキーワード サービス紹介資料
rakko
1
5M
First, design no harm
axbom
PRO
2
1.3k
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