SlideShare a Scribd company logo
An Introduction
to Lift
Dallas, TX
May 02, 2012




Discussion document – Strictly Confidential & Proprietary
Agenda …


Where are we going?

• Scala Web Frameworks

• Why is Lift Different

• In the Wild

• The Basics of Lift

   –   Getting Up and Running

   –   Building Blocks

   –   Page Templates

   –   Snippets

   –   Model

   –   Business Logic




                                An Introduction to Lift
                                         May 2, 2012      2
Agenda …


Goals

• Have an understanding of what Lift is

• Have an interest in learning more

• Go play with Lift!




                                          An Introduction to Lift
                                                   May 2, 2012      3
Scala Web Frameworks …


What web frameworks are available for Scala?

Minimalist
• Scalatra
    –    Leveraged primarily for RESTful services
    –    Used by LinkedIn for RESTful services supporting mobile platform
• Unfiltered
    –    Provides a consistent API for handling HTTP requests on various server backends
    –    Used by Meetup for real-time APIs



Full Stack
• Includes ORM, view and state management
• Play
    –    MVC Model
    –    Scala styling for the Java web framework
    –    Supported framework of Typesafe
• Lift




                                                                                           An Introduction to Lift
                                                                                                    May 2, 2012      4
Why is Lift Different …


Seven Things

Lift offers seven things that differentiate it from other frameworks
• Lazy loading
    –   Render page to browser while waiting for computation to complete
    –   Once complete, render remaining HTML
• Parallel page rendering
    –   By labeling a snippet parallel, Lift will forward snippet to another thread in a pool of threads
    –   When all threads are completed, results are combined and page is sent to browser
•   Comet and AJAX
    –   Server push – long poll wait for AJAX response
•   Wiring
    –   Interdependent page elements can be associated to one another
    –   If a precedent element changes, dependent items are redisplayed on the next HTTP response
•   Designer friendly templates
•   Wizard
    –   Define multi-page input screens with field and form level validation
•   Security




                                                                                                 An Introduction to Lift
                                                                                                          May 2, 2012      5
Why is Lift Different … Security …


Security

Lift can withstand many of the OWASP Top 10 Security Vulnerabilities
• Injection – Lift’s Mapper and Record libraries properly escape query strings before being sent to the
  backing store
• XSS – Lift holds the rendered pages as a DOM until late in the page rendering cycle, allowing it to
  automatically HTML escape Strings before sending to the browser
• Session Management – Lift uses the JEE container’s session management and keeps passwords
  hashed at all times with per-row salt
• CSRF – Lift uses session-specific bindings between HTML elements and the server-side behaviors
  associated with those elements. Bindings cannot be predicted, so cross site requests of session-
  specific bindings is impossible
• URL Access – Lift provides declarative rules for access to URLs. Access will be denied to a URL
  unless the criteria is met for accessing the specific URL




                                                                                            An Introduction to Lift
                                                                                                     May 2, 2012      6
In the Wild …


Lift is gaining traction

  OpenStudy – Collaborative learning tool used
  by MIT and many other top universities.
  FourSquare – Message queue in pure Scala.
  Website, mobile website and RESTful API
  running on Lift.
  StackMob– ‘Heroku for Mobile’.
  Novell – Pulse, a cloud-based, real-time
  collaboration platform for the enterprise.
  Utilizes Scala and Lift.




                                                 An Introduction to Lift
                                                          May 2, 2012      7
The Basics of Lift...


What you need to know to get started!

• Getting Up and Running

• Building Blocks

• Page Templates

• Snippets

• Model

• Business Logic




                                        An Introduction to Lift
                                                 May 2, 2012      8
The Basics of Lift …


Getting up and running

Required
• Java 1.5 or greater
• Scala 2.9.1 distribution
• SBT – Simple Build Tool
• Lift 2.4


Optional
• sbteclipse – create .project for Eclipse
• IDE Plugin
      –    ScalaIDE (Eclipse – must use Helios)
      –    Scala Plugin for IntelliJ IDEA
      –    Scala Plugin for NetBeans



Notes:
1) Installation of Scala and SBT involve expanding compressed file and adding to PATH
2) IDE installation varies by tool; some dependency on IDE release number
3) ScalaIDE officially supported by Typesafe




                                                                                        An Introduction to Lift
                                                                                                 May 2, 2012      9
The Basics of Lift … Building Blocks…


Building Blocks




                                        An Introduction to Lift
                                                 May 2, 2012      10
The Basics of Lift … Page Templates…


Page Templates




                                       An Introduction to Lift
                                                May 2, 2012      11
The Basics of Lift … Page Templates…


Page Templates

Templates
• A template is a well formed, designer friendly XML document
• Code cannot creep into the document
• Special tags to reference snippets




Example




                                                                An Introduction to Lift
                                                                         May 2, 2012      12
The Basics of Lift … Snippets…


Snippets




                                 An Introduction to Lift
                                          May 2, 2012      13
The Basics of Lift … Snippets…


Snippets

Snippets
• Any template element in the lift: or l: name space indicates a snippet
• Snippets are functions that transform the invocating element into a new node
• There can be multiple snippets per template
• Snippets are evaluated in the order they are encountered
• Processed serially, unless marked as parallel=true




Example




                                                                                 An Introduction to Lift
                                                                                          May 2, 2012      14
The Basics of Lift … Model…


Model and Persistence




                              An Introduction to Lift
                                       May 2, 2012      15
The Basics of Lift … Model…


Model

Model
• The model is the object representation of your persistence store
• Lift includes two options Mapper and Record
• Mapper typically used for relational databases
• Record typically used for NoSQLdatastores




Example




                                                                     An Introduction to Lift
                                                                              May 2, 2012      16
The Basics of Lift … Business Logic…


Your Business Logic




                                       An Introduction to Lift
                                                May 2, 2012      17
The Basics of Lift … Model…


Model

Model
• The model is the object representation of your persistence store
• Lift includes two options Mapper and Record
• Mapper typically used for relational databases
• Record typically used for NoSQLdatastores




Example




                                                                     An Introduction to Lift
                                                                              May 2, 2012      18
The Basics of Lift … Business Logic…


Your Business Logic

Business Logic
• Business logic resides in the lib directory




Example




                                                An Introduction to Lift
                                                         May 2, 2012      19
Appendix … Web References ...


Resources

                                                 Web Resources
             Description                                                   Link
                 Scala                http://www.scala-lang.org
       SBT – Simple Build Tool        http://github.com/harrah/xsbt
         ScalaIDE for Eclipse         http://scala-ide.org
     Scala Plugin for IntelliJ IDEA   http://confluence.jetbrains.net/display/SCA/Scala_Plugin+for+IntelliJ+IDEA
      Scala Plugin for NetBeans       http://wiki.netbeans.org/Scala
                  Lift                http://liftweb.net




                                                                                                      An Introduction to Lift
                                                                                                               May 2, 2012      20
Contact ...


Contact Me!




              blemons@credera.com

              @brentlemons

              slideshare.net/brentlemons




                                           An Introduction to Lift
                                                    May 2, 2012      21

More Related Content

Viewers also liked

メルマガマーケティング Ato z
メルマガマーケティング Ato zメルマガマーケティング Ato z
メルマガマーケティング Ato zHati Miura
 
ENGLISH LANGUAGE KSSR YEAR 1I wear...
ENGLISH LANGUAGE KSSR YEAR 1I wear...ENGLISH LANGUAGE KSSR YEAR 1I wear...
ENGLISH LANGUAGE KSSR YEAR 1I wear...
Ministry of Education
 
無題プレゼンテーション
無題プレゼンテーション無題プレゼンテーション
無題プレゼンテーションHati Miura
 
Ingles diapocitivas,partes del cuerpo y de la casa
Ingles diapocitivas,partes del cuerpo y de la casaIngles diapocitivas,partes del cuerpo y de la casa
Ingles diapocitivas,partes del cuerpo y de la casa
apoyate_en_mi
 
002 04『【再配布権】海外高額リードメール攻略マニュアル』
002 04『【再配布権】海外高額リードメール攻略マニュアル』002 04『【再配布権】海外高額リードメール攻略マニュアル』
002 04『【再配布権】海外高額リードメール攻略マニュアル』Hati Miura
 
Eメール マーケティング ato z
Eメール マーケティング ato zEメール マーケティング ato z
Eメール マーケティング ato zHati Miura
 
RAZONAMIENTO MATEMATICO 1ER AÑO 1ER BIMESTRE 2012-VISITAR www.gratis2.com
RAZONAMIENTO MATEMATICO 1ER AÑO 1ER BIMESTRE 2012-VISITAR  www.gratis2.comRAZONAMIENTO MATEMATICO 1ER AÑO 1ER BIMESTRE 2012-VISITAR  www.gratis2.com
RAZONAMIENTO MATEMATICO 1ER AÑO 1ER BIMESTRE 2012-VISITAR www.gratis2.com
lila cordova
 
Lift web framework and Scala programming language talk
Lift web framework and Scala programming language talkLift web framework and Scala programming language talk
Lift web framework and Scala programming language talk
clive boulton
 
Intro lift
Intro liftIntro lift
Intro lift
Knoldus Inc.
 

Viewers also liked (9)

メルマガマーケティング Ato z
メルマガマーケティング Ato zメルマガマーケティング Ato z
メルマガマーケティング Ato z
 
ENGLISH LANGUAGE KSSR YEAR 1I wear...
ENGLISH LANGUAGE KSSR YEAR 1I wear...ENGLISH LANGUAGE KSSR YEAR 1I wear...
ENGLISH LANGUAGE KSSR YEAR 1I wear...
 
無題プレゼンテーション
無題プレゼンテーション無題プレゼンテーション
無題プレゼンテーション
 
Ingles diapocitivas,partes del cuerpo y de la casa
Ingles diapocitivas,partes del cuerpo y de la casaIngles diapocitivas,partes del cuerpo y de la casa
Ingles diapocitivas,partes del cuerpo y de la casa
 
002 04『【再配布権】海外高額リードメール攻略マニュアル』
002 04『【再配布権】海外高額リードメール攻略マニュアル』002 04『【再配布権】海外高額リードメール攻略マニュアル』
002 04『【再配布権】海外高額リードメール攻略マニュアル』
 
Eメール マーケティング ato z
Eメール マーケティング ato zEメール マーケティング ato z
Eメール マーケティング ato z
 
RAZONAMIENTO MATEMATICO 1ER AÑO 1ER BIMESTRE 2012-VISITAR www.gratis2.com
RAZONAMIENTO MATEMATICO 1ER AÑO 1ER BIMESTRE 2012-VISITAR  www.gratis2.comRAZONAMIENTO MATEMATICO 1ER AÑO 1ER BIMESTRE 2012-VISITAR  www.gratis2.com
RAZONAMIENTO MATEMATICO 1ER AÑO 1ER BIMESTRE 2012-VISITAR www.gratis2.com
 
Lift web framework and Scala programming language talk
Lift web framework and Scala programming language talkLift web framework and Scala programming language talk
Lift web framework and Scala programming language talk
 
Intro lift
Intro liftIntro lift
Intro lift
 

Similar to Dallas GUG Lift Presentation

Spring
SpringSpring
Spring
Suman Behara
 
Oracle to MySQL 2012
Oracle to MySQL  2012 Oracle to MySQL  2012
Oracle to MySQL 2012
Marco Tusa
 
Introduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCIntroduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoC
Funnelll
 
OpenTravel Advisory Forum 2012 XML Object Suite Lab
OpenTravel Advisory Forum 2012 XML Object Suite LabOpenTravel Advisory Forum 2012 XML Object Suite Lab
OpenTravel Advisory Forum 2012 XML Object Suite Lab
OpenTravel Alliance
 
Java Spring
Java SpringJava Spring
Java Spring
AathikaJava
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
Viridians
 
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet ApplicationDrupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
Appnovation Technologies
 
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet ApplicationDrupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
DrupalcampAtlanta2012
 
How to organize the business layer in software
How to organize the business layer in softwareHow to organize the business layer in software
How to organize the business layer in software
Arnaud LEMAIRE
 
Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012
Adam Mokan
 
The Birth and Evolution of Ruby on Rails
The Birth and Evolution of Ruby on RailsThe Birth and Evolution of Ruby on Rails
The Birth and Evolution of Ruby on Rails
company
 
Quick Start: Rails
Quick Start: RailsQuick Start: Rails
Quick Start: Rails
David Keener
 
Scaling LinkedIn - A Brief History
Scaling LinkedIn - A Brief HistoryScaling LinkedIn - A Brief History
Scaling LinkedIn - A Brief History
Josh Clemm
 
Spring intro classes-in-mumbai
Spring intro classes-in-mumbaiSpring intro classes-in-mumbai
Spring intro classes-in-mumbai
vibrantuser
 
Knockout js
Knockout jsKnockout js
Knockout js
Andrey Kolodnitsky
 
Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016
Marco Breveglieri
 
spring
springspring
spring
Suman Behara
 
Seng 123 8-ooad
Seng 123 8-ooadSeng 123 8-ooad
Seng 123 8-ooad
Atilla Elçi
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
Julien Dubois
 
Spring introduction
Spring introductionSpring introduction
Spring introduction
Manav Prasad
 

Similar to Dallas GUG Lift Presentation (20)

Spring
SpringSpring
Spring
 
Oracle to MySQL 2012
Oracle to MySQL  2012 Oracle to MySQL  2012
Oracle to MySQL 2012
 
Introduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCIntroduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoC
 
OpenTravel Advisory Forum 2012 XML Object Suite Lab
OpenTravel Advisory Forum 2012 XML Object Suite LabOpenTravel Advisory Forum 2012 XML Object Suite Lab
OpenTravel Advisory Forum 2012 XML Object Suite Lab
 
Java Spring
Java SpringJava Spring
Java Spring
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet ApplicationDrupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
 
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet ApplicationDrupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
 
How to organize the business layer in software
How to organize the business layer in softwareHow to organize the business layer in software
How to organize the business layer in software
 
Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012
 
The Birth and Evolution of Ruby on Rails
The Birth and Evolution of Ruby on RailsThe Birth and Evolution of Ruby on Rails
The Birth and Evolution of Ruby on Rails
 
Quick Start: Rails
Quick Start: RailsQuick Start: Rails
Quick Start: Rails
 
Scaling LinkedIn - A Brief History
Scaling LinkedIn - A Brief HistoryScaling LinkedIn - A Brief History
Scaling LinkedIn - A Brief History
 
Spring intro classes-in-mumbai
Spring intro classes-in-mumbaiSpring intro classes-in-mumbai
Spring intro classes-in-mumbai
 
Knockout js
Knockout jsKnockout js
Knockout js
 
Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016
 
spring
springspring
spring
 
Seng 123 8-ooad
Seng 123 8-ooadSeng 123 8-ooad
Seng 123 8-ooad
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
 
Spring introduction
Spring introductionSpring introduction
Spring introduction
 

Recently uploaded

From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
Sease
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
Mydbops
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
Fwdays
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
ScyllaDB
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
christinelarrosa
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 

Recently uploaded (20)

From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 

Dallas GUG Lift Presentation

  • 1. An Introduction to Lift Dallas, TX May 02, 2012 Discussion document – Strictly Confidential & Proprietary
  • 2. Agenda … Where are we going? • Scala Web Frameworks • Why is Lift Different • In the Wild • The Basics of Lift – Getting Up and Running – Building Blocks – Page Templates – Snippets – Model – Business Logic An Introduction to Lift May 2, 2012 2
  • 3. Agenda … Goals • Have an understanding of what Lift is • Have an interest in learning more • Go play with Lift! An Introduction to Lift May 2, 2012 3
  • 4. Scala Web Frameworks … What web frameworks are available for Scala? Minimalist • Scalatra – Leveraged primarily for RESTful services – Used by LinkedIn for RESTful services supporting mobile platform • Unfiltered – Provides a consistent API for handling HTTP requests on various server backends – Used by Meetup for real-time APIs Full Stack • Includes ORM, view and state management • Play – MVC Model – Scala styling for the Java web framework – Supported framework of Typesafe • Lift An Introduction to Lift May 2, 2012 4
  • 5. Why is Lift Different … Seven Things Lift offers seven things that differentiate it from other frameworks • Lazy loading – Render page to browser while waiting for computation to complete – Once complete, render remaining HTML • Parallel page rendering – By labeling a snippet parallel, Lift will forward snippet to another thread in a pool of threads – When all threads are completed, results are combined and page is sent to browser • Comet and AJAX – Server push – long poll wait for AJAX response • Wiring – Interdependent page elements can be associated to one another – If a precedent element changes, dependent items are redisplayed on the next HTTP response • Designer friendly templates • Wizard – Define multi-page input screens with field and form level validation • Security An Introduction to Lift May 2, 2012 5
  • 6. Why is Lift Different … Security … Security Lift can withstand many of the OWASP Top 10 Security Vulnerabilities • Injection – Lift’s Mapper and Record libraries properly escape query strings before being sent to the backing store • XSS – Lift holds the rendered pages as a DOM until late in the page rendering cycle, allowing it to automatically HTML escape Strings before sending to the browser • Session Management – Lift uses the JEE container’s session management and keeps passwords hashed at all times with per-row salt • CSRF – Lift uses session-specific bindings between HTML elements and the server-side behaviors associated with those elements. Bindings cannot be predicted, so cross site requests of session- specific bindings is impossible • URL Access – Lift provides declarative rules for access to URLs. Access will be denied to a URL unless the criteria is met for accessing the specific URL An Introduction to Lift May 2, 2012 6
  • 7. In the Wild … Lift is gaining traction OpenStudy – Collaborative learning tool used by MIT and many other top universities. FourSquare – Message queue in pure Scala. Website, mobile website and RESTful API running on Lift. StackMob– ‘Heroku for Mobile’. Novell – Pulse, a cloud-based, real-time collaboration platform for the enterprise. Utilizes Scala and Lift. An Introduction to Lift May 2, 2012 7
  • 8. The Basics of Lift... What you need to know to get started! • Getting Up and Running • Building Blocks • Page Templates • Snippets • Model • Business Logic An Introduction to Lift May 2, 2012 8
  • 9. The Basics of Lift … Getting up and running Required • Java 1.5 or greater • Scala 2.9.1 distribution • SBT – Simple Build Tool • Lift 2.4 Optional • sbteclipse – create .project for Eclipse • IDE Plugin – ScalaIDE (Eclipse – must use Helios) – Scala Plugin for IntelliJ IDEA – Scala Plugin for NetBeans Notes: 1) Installation of Scala and SBT involve expanding compressed file and adding to PATH 2) IDE installation varies by tool; some dependency on IDE release number 3) ScalaIDE officially supported by Typesafe An Introduction to Lift May 2, 2012 9
  • 10. The Basics of Lift … Building Blocks… Building Blocks An Introduction to Lift May 2, 2012 10
  • 11. The Basics of Lift … Page Templates… Page Templates An Introduction to Lift May 2, 2012 11
  • 12. The Basics of Lift … Page Templates… Page Templates Templates • A template is a well formed, designer friendly XML document • Code cannot creep into the document • Special tags to reference snippets Example An Introduction to Lift May 2, 2012 12
  • 13. The Basics of Lift … Snippets… Snippets An Introduction to Lift May 2, 2012 13
  • 14. The Basics of Lift … Snippets… Snippets Snippets • Any template element in the lift: or l: name space indicates a snippet • Snippets are functions that transform the invocating element into a new node • There can be multiple snippets per template • Snippets are evaluated in the order they are encountered • Processed serially, unless marked as parallel=true Example An Introduction to Lift May 2, 2012 14
  • 15. The Basics of Lift … Model… Model and Persistence An Introduction to Lift May 2, 2012 15
  • 16. The Basics of Lift … Model… Model Model • The model is the object representation of your persistence store • Lift includes two options Mapper and Record • Mapper typically used for relational databases • Record typically used for NoSQLdatastores Example An Introduction to Lift May 2, 2012 16
  • 17. The Basics of Lift … Business Logic… Your Business Logic An Introduction to Lift May 2, 2012 17
  • 18. The Basics of Lift … Model… Model Model • The model is the object representation of your persistence store • Lift includes two options Mapper and Record • Mapper typically used for relational databases • Record typically used for NoSQLdatastores Example An Introduction to Lift May 2, 2012 18
  • 19. The Basics of Lift … Business Logic… Your Business Logic Business Logic • Business logic resides in the lib directory Example An Introduction to Lift May 2, 2012 19
  • 20. Appendix … Web References ... Resources Web Resources Description Link Scala http://www.scala-lang.org SBT – Simple Build Tool http://github.com/harrah/xsbt ScalaIDE for Eclipse http://scala-ide.org Scala Plugin for IntelliJ IDEA http://confluence.jetbrains.net/display/SCA/Scala_Plugin+for+IntelliJ+IDEA Scala Plugin for NetBeans http://wiki.netbeans.org/Scala Lift http://liftweb.net An Introduction to Lift May 2, 2012 20
  • 21. Contact ... Contact Me! blemons@credera.com @brentlemons slideshare.net/brentlemons An Introduction to Lift May 2, 2012 21

Editor's Notes

  1. Open web application security program (owasp)
  2. Think of sbt as being similar to maven or antShow ide and run HowdyBasic
  3. Field
  4. Field
  5. Field
  6. Field
  7. Field
  8. Field
  9. Field
  10. Field
  11. Field
  12. Field