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
Building your Webapp Muscles with Lift
Search
Matt Farmer
May 06, 2015
Programming
0
35
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
140
The Case for the Cutting-Edge
farmdawgnation
0
130
Other Decks in Programming
See All in Programming
try! Swift Tokyo 初参加報告LT
hinakko2
0
190
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
190
Ruby製社内ツールのGo移行
bgpat
2
330
VSCodeでのDatabricks開発もお勧めしたい/I would also recommend Databricks development with VSCode.
kazumain
0
230
入門 AWS Amplify Gen2 / Introduction to AWS Amplify Gen2
genkiogasawara
1
310
受託開発でGitLab CI を活用していく
xiombatsg
1
270
デザインシステムで Tailwind CSSとCSS in JSに分散投資をしたら良かった話
fsubal
18
4.8k
Ruby Pattern Matching
bkuhlmann
0
920
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
7
3.1k
TYPO3 v13 – The road to LTS: What's new and new APIs
luisasofie_xoxo
0
180
Git Rebase
bkuhlmann
11
1.6k
Elm Form Validation
bkuhlmann
0
500
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
58
5k
Web development in the modern age
philhawksworth
201
10k
YesSQL, Process and Tooling at Scale
rocio
162
13k
4 Signs Your Business is Dying
shpigford
175
21k
Unsuck your backbone
ammeep
662
57k
The Cult of Friendly URLs
andyhume
73
5.7k
GitHub's CSS Performance
jonrohan
1023
450k
Adopting Sorbet at Scale
ufuk
67
8.6k
Building Applications with DynamoDB
mza
88
5.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
124
32k
Into the Great Unknown - MozCon
thekraken
10
980
GraphQLの誤解/rethinking-graphql
sonatard
49
9.2k
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