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
Static Resources Management with Spring
Search
Brian Clozel
April 30, 2015
Programming
0
360
Static Resources Management with Spring
(Workshop)
Brian Clozel
April 30, 2015
Tweet
Share
More Decks by Brian Clozel
See All by Brian Clozel
Back from SpringOnePlatform 2019
bclozel
4
220
Intro à Spring Boot
bclozel
0
140
Cloud native apps with Spring Cloud
bclozel
1
700
HTTP2 for the web developer devoxx
bclozel
0
180
HTTP2 for the web developer
bclozel
1
130
Inside http://spring.io
bclozel
1
340
Intro to Spring Boot
bclozel
4
2.6k
Inside spring.io: a production spring reference application
bclozel
0
130
Open-sourcing http://spring.io
bclozel
1
630
Other Decks in Programming
See All in Programming
KANNA Android の技術的課題と取り組み
watabee
0
160
By the way Google Cloud Next 2025に行ってみてどうだった
ymd65536
0
110
Ruby's Line Breaks
yui_knk
3
2.1k
PHPバージョンアップから始めるOSSコントリビュート / how2oss-contribute
dmnlk
1
1.1k
Orleans + Sekiban + SignalR でリアルタイムWeb作ってみた
tomohisa
0
190
2ヶ月で生産性2倍、お買い物アプリ「カウシェ」4チーム同時改善の取り組み
ike002jp
1
110
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
540
Cursorを活用したAIプログラミングについて 入門
rect
0
120
実践Webフロントパフォーマンスチューニング
cp20
42
9.5k
fieldalignmentから見るGoの構造体
kuro_kurorrr
0
120
Instrumentsを使用した アプリのパフォーマンス向上方法
hinakko
0
180
Vibe Coding の話をしよう
schroneko
12
3.4k
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1030
460k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Making Projects Easy
brettharned
116
6.1k
Documentation Writing (for coders)
carmenintech
69
4.7k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Fireside Chat
paigeccino
37
3.4k
GraphQLとの向き合い方2022年版
quramy
46
14k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
2.9k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
The World Runs on Bad Software
bkeepers
PRO
68
11k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
A designer walks into a library…
pauljervisheath
205
24k
Transcript
Static Resources Management workshop Brian Clozel @brianclozel
Getting started $ open http://bit.ly/resourcehandling $ git clone http://github.com/bclozel/…
$ git fetch -‐-‐all $ cd angularjs && mvn package
Brian Clozel @brianclozel http://spring.io/team/bclozel
First application 4 What could we achieve before Spring
4.1?
Resource Handling < 4.1 • Serve static resources from *any*
Spring Resource location • Basic Cache header management • Easy to configure 5
WORKSHOP PART #1
Remaining questions • optimize (concatenate, minify) • transform (LESS,
coffeescript, gzip) • front-‐end optimization (cache busting URLs, concatenate, minify) • development experience 7
AngularJS 8 First run with Resource Handling
Sources of inspiration • a complete asset pipeline built into
Spring MVC • fingerprinting URLs for cache busting • client side dev in Sagan project 9
Why not an asset pipeline? • runtime vs. build time
approach • languages and tools evolve *fast* • ES6, HTTP/2 10
Client source code layout • src/main/webapp just not adequate anymore
• client *and* server: dependency management, modularity, tests, build artifacts • client-‐side development: ctrl+S, F5 11
WORKSHOP PART #2
ES6 app 13 client-‐side build and JS module loaders
Spring 4.1 resource handling • ResourceResolver • ResourceTransformer
• ResourceUrlProvider 14
Built-‐in ResourceResolvers • PathResourceResolver • VersionResourceResolver • GzipResourceResolver
• CachingResourceResolver 15
Built-‐in ResourceTransformers • CssLinkResourceTransformer • AppCacheManifestResourceTransformer • CachingResourceTransformer
16
VersionResourceResolver • VersionStrategies: • ContentVersionStrategy (md5 hashes) •
FixedVersionStrategy (version string as a path prefix) 17
WORKSHOP PART #3
Q&A 19 …and what’s next?
What’s next? • https://github.com/bclozel/spring-‐resource-‐ handling • https://github.com/spring-‐io/sagan •
https://jira.spring.io 20