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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Brian Clozel
April 30, 2015
Programming
380
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Static Resources Management with Spring
(Workshop)
Brian Clozel
April 30, 2015
More Decks by Brian Clozel
See All by Brian Clozel
Back from SpringOnePlatform 2019
bclozel
4
250
Intro à Spring Boot
bclozel
0
170
Cloud native apps with Spring Cloud
bclozel
1
750
HTTP2 for the web developer devoxx
bclozel
0
210
HTTP2 for the web developer
bclozel
1
170
Inside http://spring.io
bclozel
1
410
Intro to Spring Boot
bclozel
4
2.8k
Inside spring.io: a production spring reference application
bclozel
0
170
Open-sourcing http://spring.io
bclozel
1
670
Other Decks in Programming
See All in Programming
Flow は今どうなっているか
mizdra
PRO
0
660
運用ダッシュボードの設計を誰も教えてくれないのだけどみなさんどうしてるんですか? - チームに監視するという文化を根付かせるための第一歩を踏みたい -
satoshi256kbyte
1
140
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
160
AIを紡ぐPMのお話
swdtkuy
0
120
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
340
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
1
240
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
170
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
280
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
350
「人を評価する AI」の設計と実装
ryoyanara
0
220
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
6.6k
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
500
Featured
See All Featured
Discover your Explorer Soul
emna__ayadi
2
1.3k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
440
RailsConf 2023
tenderlove
30
1.5k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
470
A designer walks into a library…
pauljervisheath
211
24k
Designing for Performance
lara
611
70k
A better future with KSS
kneath
240
18k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
290
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
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