$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Building your Webapp Muscles with Lift
Search
Matt Farmer
May 06, 2015
Programming
0
46
Building your Webapp Muscles with Lift
Matt Farmer
May 06, 2015
Tweet
Share
More Decks by Matt Farmer
See All by Matt Farmer
Testing at Stream Scale
farmdawgnation
0
180
The Case for the Cutting-Edge
farmdawgnation
0
170
Other Decks in Programming
See All in Programming
Develop iOS apps with Neovim / vimconf_2024
uhooi
1
320
HTTP compression in PHP and Symfony apps
dunglas
2
1.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
1
130
Missing parts when designing and implementing Android UI
ericksli
0
390
CSC509 Lecture 14
javiergs
PRO
0
130
React CompilerとFine Grained Reactivityと宣言的UIのこれから / The next chapter of declarative UI
ssssota
7
3.4k
.NET 9アプリをCGIとして レンタルサーバーで動かす
mayuki
1
760
Jakarta EE meets AI
ivargrimstad
0
950
MoQとか勉強会#2 発表資料
yuki_uchida
2
650
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
130
React への依存を最小にするフロントエンド設計
takonda
21
8.9k
14 Years of iOS: Lessons and Key Points
seyfoyun
1
690
Featured
See All Featured
Producing Creativity
orderedlist
PRO
341
39k
The Cult of Friendly URLs
andyhume
78
6.1k
RailsConf 2023
tenderlove
29
920
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
The Language of Interfaces
destraynor
154
24k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Fireside Chat
paigeccino
34
3.1k
The Invisible Side of Design
smashingmag
298
50k
4 Signs Your Business is Dying
shpigford
181
21k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Being A Developer After 40
akosma
87
590k
Transcript
Building your Web Application Muscles with Lift Matt Farmer May
6th, 2015
Sorry, I was sick.
Tonight’s Demonstration • A site for submitting and voting on
puns. • URL: http://punerator.frmr.me • Source: https://github.com/farmdawgnation/punerator
Lift is a bit different.
The Seven Things 1. Lazy Loading 2. Parallel Page Rendering
3. Comet and AJAX 4. Wiring 5. Designer-friendly Templates 6. Wizard 7. Security
The Seven Things 1. Lazy Loading 2. Parallel Page Rendering
3. Comet and AJAX 4. Wiring 5. Designer-friendly Templates 6. Wizard 7. Security
Designer-friendly Templates
None
Lift is not an MVC framework.
Lift is not an MVC framework. No, I’m not insane.
Lift is not an MVC framework. No, I’m not insane.
Well, maybe a little but not completely.
View First
MVC vs. View First
MVC vs. View First Typical MVC Framework User Framework Controller
View
MVC vs. View First Typical MVC Framework User Framework Controller
View Lift User Framework View Snippet Snippet Snippet
View First Snippet (NodeSeq) => NodeSeq
View First Snippet (NodeSeq) => NodeSeq CSS Transforms
View First Snippet (NodeSeq) => NodeSeq CSS Transforms
View First Snippet (NodeSeq) => NodeSeq CSS Transforms
View First Snippet (NodeSeq) => NodeSeq CSS Transforms Magic
View First Snippet (NodeSeq) => NodeSeq CSS Transforms Magic DSL
(Domain Specific Language)
View First Snippet (NodeSeq) => NodeSeq CSS Transforms Magic DSL
(Domain Specific Language) “.date *” #> invoice.date
View First Snippet (NodeSeq) => NodeSeq CSS Transforms Magic DSL
(Domain Specific Language) “.date *” #> invoice.date CSS Selector
View First Snippet (NodeSeq) => NodeSeq CSS Transforms Magic DSL
(Domain Specific Language) “.date *” #> invoice.date CSS Selector Content
View first
View first • Lift templates are just HTML.
View first • Lift templates are just HTML. • Lift
finds things to change using CSS selectors.
View first • Lift templates are just HTML. • Lift
finds things to change using CSS selectors. • Any designer who understands HTML and CSS can make changes relatively safely.
Let’s see some code.
None
Push to the Browser
COMETS!
Why not WebSockets? https://groups.google.com/d/msg/liftweb/ 1fa3rolbnvI/enV5CFm2Rd4J
Push to the Browser
Push to the Browser • What if we could represent
the page a user’s browser is viewing as an actor?
Push to the Browser • What if we could represent
the page a user’s browser is viewing as an actor? CometActor
Actors, but for pages Browser CometActor
Actors, but for pages Browser CometActor
Actors, but for pages Browser CometActor Render HTML.
Actors, but for pages Browser CometActor Render HTML. Push JavaScript.
Actors, but for pages Browser CometActor Render HTML. Push JavaScript.
Session
Actors, but for pages Browser CometActor Render HTML. Push JavaScript.
Session SessionVar
Actors, but for pages Browser CometActor Render HTML. Push JavaScript.
Session SessionVar LiftActor Snippets
Lift handles the magic
Lift handles the magic • Loading the relevant client side
bits.
Lift handles the magic • Loading the relevant client side
bits. • Detecting when a CometActor isn’t needed.
Lift handles the magic • Loading the relevant client side
bits. • Detecting when a CometActor isn’t needed. • Handling connectivity issues.
Let’s see some code.
None
Further reading • The Lift Website http://liftweb.net • Lift Template
Projects https://github.com/lift/lift_26_sbt • The mailing list http://groups.google.com/group/liftweb • The Seven Things: http://seventhings.liftweb.net • The Lift Cookbook: http://cookbook.liftweb.net
Thank you. @farmdawgnation / farmdawgnation.com
[email protected]
Creative Commons Attributions • “Big Weight” https://www.flickr.com/photos/ennuidesign/ 2715836520 • “Are
your eyeballs running?” https://flic.kr/p/4HbQj2 • “Comet Panstarrs March 2nd 2013” https://flic.kr/p/ dZdD7k