$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
I wanna tell you about "Groovy Template"
Search
grimrose
October 17, 2014
Programming
3
5.4k
I wanna tell you about "Groovy Template"
テンプレートエンジンNight
http://www.zusaar.com/event/10707003
grimrose
October 17, 2014
Tweet
Share
More Decks by grimrose
See All by grimrose
だいたい10分くらいで 知った気になれる Vert.x 3.0 #渋谷Java / Shibuya.java #11
grimrose
0
1.9k
Syobochim should read book of modeling #syoboben
grimrose
0
1.8k
Gradleで始めるGroovy expand #jjug_ccc #ccc_r14
grimrose
4
6k
Groovy Shell with Gradle
grimrose
0
5.2k
Shibuya.Java #07
grimrose
0
870
Ambiguous Groups #sqlap
grimrose
0
900
ぼっちプロジェクトとアジャイルサムライ
grimrose
0
280
Shibuya.Java #04
grimrose
1
630
I made out Gradle plug-in
grimrose
0
930
Other Decks in Programming
See All in Programming
Deno Tunnel を使ってみた話
kamekyame
0
150
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
160
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
140
ローターアクトEクラブ アメリカンナイト:川端 柚菜 氏(Japan O.K. ローターアクトEクラブ 会長):2720 Japan O.K. ロータリーEクラブ2025年12月1日卓話
2720japanoke
0
740
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
860
俺流レスポンシブコーディング 2025
tak_dcxi
14
9.1k
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
180
Microservices rules: What good looks like
cer
PRO
0
1.5k
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
1.4k
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
190
AIコーディングエージェント(skywork)
kondai24
0
190
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
130
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
0
88
Facilitating Awesome Meetings
lara
57
6.7k
A designer walks into a library…
pauljervisheath
210
24k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandezseo
0
83
Navigating Weather and Climate Data
rabernat
0
44
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
250
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Highjacked: Video Game Concept Design
rkendrick25
PRO
0
240
Ruling the World: When Life Gets Gamed
codingconduct
0
92
Transcript
JVMで テンプレートに迷っている あなたに伝えたい "Groovy Template" @grimrose 2014-10-17 テンプレートエンジンNight
あなた誰? AboutMe { name "よしだ" twitter “@grimrose” favorite { lang
"Groovy" ide "IntelliJ IDEA" } }
Yokohama.groovy #yokohamagroovy #mattarigrails
話すこと • Groovyの紹介 • ヒアドキュメント • テンプレートエンジン • 用途
話さないこと • 詳細
Groovyとは?
Groovyとは • JVM上で動作する選択的型付け言語 • Javaより簡潔 • Javaの資産が使える • スクリプトも書ける •
etc...
ヒアドキュメント
ヒアドキュメント String
ヒアドキュメント def doc1 = '''Groovyは、 ヒアドキュメントが 書けます。 '''
ヒアドキュメント GString
ヒアドキュメント def bean = [ message: '出来ます' ] def doc2
= """ こんな感じに 式展開も${bean.message}。 """
テンプレートエンジン
テンプレートエンジン groovy-all.jar (とりあえず)
テンプレートエンジン • groovy.text • Template • TemplateEngine • SimpleTemplateEngine •
GStringTemplateEngine • XmlTemplateEngine
テンプレートエンジン G*Magazine Vol.6 オレオレ・プログラミング GROOVY
テンプレートエンジン XML/HTML
テンプレートエンジン Markup Template Engine
テンプレートエンジン ''' html { body { div(class: "container") { p
"$placeHolder" } } }
テンプレートエンジン <html> <body> <div class="container"> <p>Hello Groovy!</p> </div> </body> </html>
テンプレートエンジン • groovy.text.markup • TemplateConfiguration • MarkupTemplateEngine
テンプレートエンジン Groovy 2.3
テンプレートエンジン Type checked templates
テンプレートエンジン groovy-lang.org/templating.html
テンプレートエンジン Object to HTML, XML, JSON
テンプレートエンジン 動的に作りたいですよね?
テンプレートエンジン Builder
テンプレートエンジン • groovy.xml • MarkupBuilder • StreamingMarkupBuilder • groovy.json •
JsonBuilder • StreamingJsonBuilder
用途
用途 • 組み込み • オレオレ自動生成ツール • HTML
組み込み • XML • JSON • メール • etc...
オレオレ自動生成ツール
オレオレ自動生成ツール • xxx.properties • xxx.json • xxx.xml • xxx.java •
xxx.sql • etc...
HTML
HTML Grails grails.org
HTML Spring Boot projects.spring.io/spring-boot/
HTML Ratpack www.ratpack.io
HTML Yoke pmlopes.github.io/yoke/
HTML Aeromock github.com/CyberAgent/aeromock
最後に
最後に Groovy Template いかがでしょうか?
最後に ご清聴ありがとうございました