Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
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
5.4k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
I wanna tell you about "Groovy Template"
テンプレートエンジンNight
http://www.zusaar.com/event/10707003
grimrose
October 17, 2014
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.9k
Gradleで始めるGroovy expand #jjug_ccc #ccc_r14
grimrose
4
6.1k
Groovy Shell with Gradle
grimrose
0
5.3k
Shibuya.Java #07
grimrose
0
890
Ambiguous Groups #sqlap
grimrose
0
940
ぼっちプロジェクトとアジャイルサムライ
grimrose
0
300
Shibuya.Java #04
grimrose
1
660
I made out Gradle plug-in
grimrose
0
960
Other Decks in Programming
See All in Programming
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
220
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.4k
Vite+ Unified Toolchain for the Web
naokihaba
0
380
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.5k
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
1k
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
820
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
130
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.5k
技術的負債解消で開発者の未来を開く- AIの力でコード刷新
kmd2kmd
0
120
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
330
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.6k
Featured
See All Featured
Designing Experiences People Love
moore
143
24k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Building AI with AI
inesmontani
PRO
1
1.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
220
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
400
The Language of Interfaces
destraynor
162
27k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
350
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
480
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
640
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
55k
BBQ
matthewcrist
89
10k
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 いかがでしょうか?
最後に ご清聴ありがとうございました