Scala & LiftSander Mak
What should awebframeworkdo?
Webframeworks should• Provide templating• Show dynamic content• Handle user input• Abstract from request/response cycle?• ...
Webframeworkstemplating         Provide                 should• Lift is view-first   • Pure XHTML or HTML5 templates• Embed...
Webframeworks should         Show dynamic content• Pure templates: no code in templates                 Problem?
Snippets
Webframeworks should         Show dynamic content• Snippets transform DOM to DOM  NodeSeq => NodeSeq• Well-formed and sani...
Webframeworks should          Show dynamic content • Snippets transform DOM to DOM    NodeSeq => NodeSeq • Well-formed and...
Webframeworks should          Handle user input• Add server-side behavior to DOM nodes  ... with snippets• Behavior captur...
Highly interactive
Comet• ‘Reverse Ajax’: server push• Realtime webapps
Actors
Actors• Asynchronous• Mailbox serializes messages        Mailbox                                   Internal state• Thread ...
The demo                Actor                   ChatServerCometActor      CometActor              CometActor  ChatClient  ...
Scala + Lift =       Abstraction
Wiring• Functional/reactive programming
What else?• Persistence layer - Mapper & Record• REST support - Expose APIs for webapps• Lift Modules - User contributed
Scala and Lift
Scala and Lift
Upcoming SlideShare
Loading in …5
×

Scala and Lift

8,409 views

Published on

Presentation for the Dutch Open University on Lift, the webframework written in Scala. Though the slides are light on content, the sample application that was used throughout the presentation can be found at https://github.com/sammy8306/Lift/tree/lift_ou/playground and should give more than enough insight into a working Lift application

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
8,409
On SlideShare
0
From Embeds
0
Number of Embeds
16
Actions
Shares
0
Downloads
26
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Scala and Lift

    1. 1. Scala & LiftSander Mak
    2. 2. What should awebframeworkdo?
    3. 3. Webframeworks should• Provide templating• Show dynamic content• Handle user input• Abstract from request/response cycle?• Be highly interactive? Preferably concise, performant and secure
    4. 4. Webframeworkstemplating Provide should• Lift is view-first • Pure XHTML or HTML5 templates• Embed and surround to compose pages default.html
with: <lift:bind name=”content” /> signup.html
with: <lift:surround with=”default” name=”content”> ... signup form ... <lift:surround />
    5. 5. Webframeworks should Show dynamic content• Pure templates: no code in templates Problem?
    6. 6. Snippets
    7. 7. Webframeworks should Show dynamic content• Snippets transform DOM to DOM NodeSeq => NodeSeq• Well-formed and sanitized transformation• Use {request, session, database} state
    8. 8. Webframeworks should Show dynamic content • Snippets transform DOM to DOM NodeSeq => NodeSeq • Well-formed and sanitized transformation • Use {request, session, database} stateNot MVC: menu/index.xhtml date content
    9. 9. Webframeworks should Handle user input• Add server-side behavior to DOM nodes ... with snippets• Behavior captured in closures ... which are executed after submit• Lift unifies ajax and traditional request/ response interaction, includes JavaScript DSL
    10. 10. Highly interactive
    11. 11. Comet• ‘Reverse Ajax’: server push• Realtime webapps
    12. 12. Actors
    13. 13. Actors• Asynchronous• Mailbox serializes messages Mailbox Internal state• Thread pooling executor Actor actor ! Message
    14. 14. The demo Actor ChatServerCometActor CometActor CometActor ChatClient ChatClient ChatClient ... Browser Browser Browser ...
    15. 15. Scala + Lift = Abstraction
    16. 16. Wiring• Functional/reactive programming
    17. 17. What else?• Persistence layer - Mapper & Record• REST support - Expose APIs for webapps• Lift Modules - User contributed

    ×