lift introduction
TRANSCRIPT
Dave Briccetti
@dcbriccetti
Indrajit Raychaudhuri
@indrajitr
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
• Secure
• Interactive
• Designer Friendly
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
• Secure
• Interactive
• Designer Friendly
• Scalable
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
• Secure
• Interactive
• Designer Friendly
• Scalable
Super Easy !!
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
About Us• Dave Briccetti
• Veteran software developer
• Teacher in love with programming
• Indrajit Raychaudhuri
• Active Lift committer
• Hacker trying to do programming
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
The Project
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
The Project• Started by David Pollak (@dpp) in 2006
• Community (> 3000 members in ML)
• Committers from around the world
• Stable master philosophy
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
The Project
• Developers ≠ Plumbers
• Best concepts from other frameworks
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
The Project
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
The Project• Open Source (Apache 2.0 License)
• Ready on a JVM near you
• Full Java EE compliance
• Works in all modern servlet containers
• Batteries included (user replaceable)
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
The Project• Best implementation on JVM for
Comet Ajax
REST Templating
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Secure Lift
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
• Definitive strategy tackles OWASP Top 10
• So you don’t have to bother
Secure Lift
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
• Definitive strategy tackles OWASP Top 10
• So you don’t have to bother
Secure Lift
“.name *” #> “<script>alert(‘hi’);</script>”
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Interactive Lift
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Interactive Lift• Great support for Comet and AJAX
• Great REST Support
• Parallel Rendering of Snippets
• Lazy Rendering of Snippets
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Interactive Lift• Great support for Comet and AJAX
• Great REST Support
• Parallel Rendering of Snippets
• Lazy Rendering of Snippets
serve { case "api" :: "user" :: AsLong(id) :: _ XmlGet _ => <b>ID:{id}</b> case "api" :: "user" :: AsLong(id) :: _ JsonGet _ => JInt(id) }
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Interactive Lift• Great support for Comet and AJAX
• Great REST Support
• Parallel Rendering of Snippets
• Lazy Rendering of Snippets
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Interactive Lift• Great support for Comet and AJAX
• Great REST Support
• Parallel Rendering of Snippets
• Lazy Rendering of Snippets
// HTML<div class="lift:FetchTicker?parallel=true"> Ticker server #1: <span class="ticker">The Ticker</span></div>// Snippetobject FetchTicker { def render = { Thread.sleep(500 millis) // The call ".ticker" #> Thread.currentThread.getName // The result }}
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Interactive Lift• Great support for Comet and AJAX
• Great REST Support
• Parallel Rendering of Snippets
• Lazy Rendering of Snippets
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Interactive Lift• Great support for Comet and AJAX
• Great REST Support
• Parallel Rendering of Snippets
• Lazy Rendering of Snippets
// HTML<div class="lift:LazyLoad"> <span class="lift:LongTime"> I started this computation at <span id="start">start</span> and it completed at <span id="end">end</span>. </span></div>// Snippetobject LongTime { def render = { val start = now Thread.sleep(randomLong(15 seconds)) "#start" #> start.toString & "#end" #> now.toString }}
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Designer Friendly Lift
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Designer Friendly Lift• Step 1: Get designers to write pure XHTML, HTML5
• Step 2: There isn’t any!
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Scalable
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Scalable• Fast path for handling REST/Ajax/Comet
• No additional layers (e.g. bolt-on security)
• Foursquare and UK Guardian serve millions of pages a day with Lift
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Summary• Tremendously secure
• Highly Interactive Web apps simple
• Very friendly to designers
• Successful large scale deployments
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Resources• Source [github.com/lift]
• Books
• Simply Lift [simply.liftweb.net]
• Exploring Lift [exploring.liftweb.net]
• Wiki [wiki.liftweb.net]
• Mailing List [googlegroups.com/group/liftweb]
Scala: A Quick Primer
Copyright © 2011 Lift Web Framework, Worldwide Conferencing, LLC
Smarter Java• Runs on JVM, interoperated with any JVM language
• Functional (and OO too!)
• It’s a lot easier than you think
• Stories from the trenches
Demo: TalkingPuffin Web
Questions?