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
350
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
130
Cloud native apps with Spring Cloud
bclozel
1
690
HTTP2 for the web developer devoxx
bclozel
0
180
HTTP2 for the web developer
bclozel
1
130
Inside http://spring.io
bclozel
1
320
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
バックエンドのためのアプリ内課金入門 (サブスク編)
qnighy
8
1.7k
Kanzawa.rbのLT大会を支える技術の裏側を変更する Ruby on Rails + Litestream 編
muryoimpl
0
220
Honoとフロントエンドの 型安全性について
yodaka
4
250
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
9
2.2k
『GO』アプリ データ基盤のログ収集システムコスト削減
mot_techtalk
0
110
テストをしないQAエンジニアは何をしているか?
nealle
0
130
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
130
Formの複雑さに立ち向かう
bmthd
1
720
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
120
2024年のWebフロントエンドのふりかえりと2025年
sakito
1
230
Introduction to kotlinx.rpc
arawn
0
630
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
7
2.5k
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Being A Developer After 40
akosma
89
590k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
99
18k
The Pragmatic Product Professional
lauravandoore
32
6.4k
The Invisible Side of Design
smashingmag
299
50k
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