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
Indrajit Raychaudhuri
April 18, 2012
Technology
1
220
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
74
Lift Introduction
indrajitr
1
140
Simple Build Tool Introduction
indrajitr
3
190
Other Decks in Technology
See All in Technology
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
複雑なState管理からの脱却
sansantech
PRO
1
140
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
1
2.3k
Can We Measure Developer Productivity?
ewolff
1
150
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
580
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
380
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
120
Why does continuous profiling matter to developers? #appdevelopercon
salaboy
0
190
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
410
Featured
See All Featured
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Producing Creativity
orderedlist
PRO
341
39k
A Philosophy of Restraint
colly
203
16k
Six Lessons from altMBA
skipperchong
27
3.5k
What's new in Ruby 2.0
geeforr
343
31k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
The Language of Interfaces
destraynor
154
24k
Embracing the Ebb and Flow
colly
84
4.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Fireside Chat
paigeccino
34
3k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
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!