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
3
5.2k
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.7k
Syobochim should read book of modeling #syoboben
grimrose
0
1.6k
Gradleで始めるGroovy expand #jjug_ccc #ccc_r14
grimrose
4
5.6k
Groovy Shell with Gradle
grimrose
0
5k
Shibuya.Java #07
grimrose
0
720
Ambiguous Groups #sqlap
grimrose
0
810
ぼっちプロジェクトとアジャイルサムライ
grimrose
0
210
Shibuya.Java #04
grimrose
1
560
I made out Gradle plug-in
grimrose
0
870
Other Decks in Programming
See All in Programming
⼤規模⾔語モデルの拡張(RAG)が 終わったかも知れない件について
nearme_tech
23
15k
educure_カリキュラム生操作マニュアル.pdf
linew_official
0
740
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
490
CA.swift19 恋するAIアプリ開発の裏側
oskmr
0
360
PHPはいつから死んでいるかの調査
chiroruxx
1
400
"config" ってなんだ? / What is "config"?
okashoi
0
240
try! Swift Tokyo 2024 参加報告 / try! Swift Tokyo 2024 Report
hironytic
0
200
Node.js v22 で変わること
yosuke_furukawa
PRO
9
2.9k
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
670
Ruby Function Composition
bkuhlmann
1
330
GitHub Copilotのススメ
marcy731
1
200
Git Lint
bkuhlmann
4
750
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
17
1.4k
Optimizing for Happiness
mojombo
370
69k
Designing with Data
zakiwarfel
96
4.8k
Fireside Chat
paigeccino
21
2.6k
How To Stay Up To Date on Web Technology
chriscoyier
782
250k
Scaling GitHub
holman
457
140k
Building Flexible Design Systems
yeseniaperezcruz
319
37k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
30
6k
Teambox: Starting and Learning
jrom
128
8.4k
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 いかがでしょうか?
最後に ご清聴ありがとうございました