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
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
160
Other Decks in Programming
See All in Programming
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
みんなでプロポーザルを書いてみた
yuriko1211
0
260
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
1.9k
Outline View in SwiftUI
1024jp
1
320
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
520
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
Realtime API 入門
riofujimon
0
150
subpath importsで始めるモック生活
10tera
0
300
RubyLSPのマルチバイト文字対応
notfounds
0
120
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
600
Featured
See All Featured
Designing the Hi-DPI Web
ddemaree
280
34k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Practical Orchestrator
shlominoach
186
10k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Done Done
chrislema
181
16k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
Building a Scalable Design System with Sketch
lauravandoore
459
33k
4 Signs Your Business is Dying
shpigford
180
21k
Designing for humans not robots
tammielis
250
25k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
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