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
Lift evolved: New in 2.4 and the road ahead
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Indrajit Raychaudhuri
April 18, 2012
Technology
1
230
Lift evolved: New in 2.4 and the road ahead
Lift presentation at Scala Days 2012 (18/04/2012 @ London)
Indrajit Raychaudhuri
April 18, 2012
Tweet
Share
More Decks by Indrajit Raychaudhuri
See All by Indrajit Raychaudhuri
Lift evolved: New in 2.4 and the road ahead
indrajitr
1
79
Lift Introduction
indrajitr
1
140
Simple Build Tool Introduction
indrajitr
3
200
Other Decks in Technology
See All in Technology
ドメイン駆動セキュリティへの道しるべ
pandayumi
0
170
AI アクセラレータチップ AWS Trainium/Inferentia に 今こそ入門
yoshimi0227
1
310
ドキュメントからはじめる未来のソフトウェア
pkshadeck
1
330
20260120 Amazon VPC のパブリックサブネットを無くしたい!
masaruogura
2
160
Security Hub と出会ってから 1年半が過ぎました
rch850
0
170
Lambda Durable FunctionsでStep Functionsの代わりはできるのかを試してみた
smt7174
2
100
「全社導入」は結果。1人の熱狂が組織に伝播したmikanのn8n活用
sota_mikami
0
360
アウトプットはいいぞ / output_iizo
uhooi
0
140
BiDiってなんだ?
tomorrowkey
2
440
たかがボタン、されどボタン ~button要素から深ぼるボタンUIの定義について~ / BuriKaigi 2026
yamanoku
1
290
AIAgentを駆使してSREが貢献する開発体験の向上
yoshiiryo1
4
1k
ソフトとハード両方いけるデータ人材の育て方
waiwai2111
1
550
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
170
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
230
Faster Mobile Websites
deanohume
310
31k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
36k
Thoughts on Productivity
jonyablonski
74
5k
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
740
BBQ
matthewcrist
89
10k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Transcript
Indrajit Raychaudhuri @indrajitr
Full stack Scala Web application Framework
Full stack Scala Web application Framework Secure Scalable Designer friendly
Interactive
Lift: The Scala Companion
Retaining NodeSeq helps in secure type-safe transformation Page generation is
functional and type-safe Simple transformation as NodeSeq => NodeSeq And not, say, just () => String Lift: The Scala Companion
But dive deeper and deal with HTTP and HTML Higher
Level Abstraction Page compositions UI behaviors Helpers Lift: The Scala Companion
Simple ≠ Easy after all, ‘tis about correctness Steeper Learning
Curve (compared to MVC based frameworks) But you cruise once you hit the plateau Lift: The Scala Companion
Lift: The Core Tenets
Grab the readily available ones, or build your own Lift:
The Core Tenets Lift's Abstraction are generalized With sane readily usable defaults
Lift: The Core Tenets Lift's Responses are XSS Safe ".name
*" #> "<script>alert('hi');</script>"
Lift: The Core Tenets Elegant Comet support Requests multiplexed through
single request Requests are versioned Auto-detects containers for best fit
Lift: The Core Tenets Secure and maintainable REST support object
MyRestHelper extends RestHelper { serve { case "api" :: "user" :: AsLong(id) :: _ XmlGet _ => <b>ID:{id}</b> case "api" :: "user" :: AsLong(id) :: _ JsonGet _ => JInt(id) case "api" :: "user" :: AsLong(id) :: _ XmlGet _ => RestContinuation.async { reply => for { i <- lengthyCompute(id) } reply(<x>{i}</x>) } }
Lift: The Core Tenets Secure and maintainable REST support //
Stateful LiftRules.dispatch.append(MyRestHandler) // Stateless (choose one!) LiftRules.statelessDispatch.append(MyRestHandler)
Lift: The Core Tenets Designer friendly Templates <!DOCTYPE html> <html>
<head><title>Home</title></head> <body> <div class="lift:surround?with=default;at=content"> <h2>Welcome to Awesome website!</h2> <div class="lift:helloWorld.howdy"> Current time: <span id="time">Time goes here</span> </div> </div> </body> </html>
Lift: The Core Tenets Designer friendly Templates class HelloWorld {
def howdy = "#time" #> Helpers.formattedTimeNow }
Lift: Evolved in 2.4
Lift: Evolved in 2.4 CSS Selector Transforms got better syntax
<span><span id="event"/></span> "#event" #> "Scaladays 2012" <span>Scala Days 2012</span>
Lift: Evolved in 2.4 CSS Selector Transforms got better syntax
<span><span id="event"/></span> "#event *" #> "Scala Days 2012" <span><span id="event">Scala Days 2012</span></span>
Lift: Evolved in 2.4 CSS Selector Transforms got better syntax
<a href="#" id="event">Scala Days 2012</a> "#event [href]" #> "http://days2012.scala-lang.org" <a href="http://days2012.scala-lang.org" id="event">Scala Days 2012</a>
Lift: Evolved in 2.4 CSS Selector Transforms got better syntax
<span class="cool" id="event">Scala Days 2012</span> "#event [class+]" #> "fancy" <span class="cool fancy" id="event">Scala Days 2012</span>
Lift: Evolved in 2.4 CSS Selector Transforms got better syntax
<span><span id="event"/></span> "#event" #> List("Scala ", "Days ", "2012") <span>Scala Days 2012</span>
Lift: Evolved in 2.4 CSS Selector Transforms got better syntax
<table><tr class="r"><td class="c">???</td></tr></table> ".r *" #> (".c *" #> "Scala") <table><tr class="r"><td class="c">Scala</td></tr></table>
Lift: Evolved in 2.4 Exclusive XHTML to HTML5 preferred
Lift: Evolved in 2.4 Stateless or Stateful – you decide
trait StatelessBehavior { def statelessDispatch: PartialFunction[String, NodeSeq => NodeSeq] }
Lift: Evolved in 2.4 Better Mock support, ability to test
better
Lift: Evolved in 2.4 Utilities and Helper updates JSON Serializer
improvements Mailer improvements BsonDSL additions to JsonDSL Build system on SBT
Lift: The Upcoming
Lift: The Upcoming Refinements Netty support giter8, lifty templates Explore
Scala 2.10 support Likely have to drop 2.8 support
Lift: The Upcoming Moar Refinements Modules’ owned and supported by
community Comply with upstream libraries Long deprecation for bolted-in JS libraries H5BP, Bootstrap support
Lift: Resource Code: https://github.com/lift Wiki: http://assembla.com/spaces/liftweb/wiki Cookbook: http://cookbook.liftweb.net Books: http://simply.liftweb.net
http://www.manning.com/perrett
Thank you!