Petr Hošek@petrh<br />CZJUG, December 2010<br />
Why do we need another web framework?<br />
„Foursquare switched over to Scala & Lift last year and we‘ve been thrilled with the results. The ease of developing compl...
„Lift is the kind of web framework that enables you as a developer to concentrate on the big picture. Strong, expressive t...
„Lift is the only new framework in the last four years to offer fresh and innovative approaches to web development. It‘s n...
„The fact that Lift-based applications run unchanged on the SAP's NetWeaver CE Java application server makes this an intri...
Overall View<br />
Expressive elegant web framework<br />Combines best of other frameworks<br />
Powered by                  language<br />Modern object-functional JVM language<br />
View First Approach<br />
View-Driven Development<br />Similar to MVC but not exactly the same<br />
No business code allowed in the view<br />Usually represents „seep“ of business logic<br />
Designer friendly markup content<br />Views are well-formed XHTML/HTML5<br />
View-Driven Development<br />Similar to MVC but not exactly the same<br />No business code allowed in the view<br />Usuall...
vs<br />Model-View-Controller<br />View-Driven-Development<br />
Snippets<br />
Snippet provides rendering logic<br />Called arbitrarily times on multiple pages<br />
Snippet is Scala class or object<br />Functions transforming sequence of XML nodes<br />
Snippets can be stateful or stateless<br />Using session affinity suitable in large scale<br />
No hidden magic or code plumbing<br />Everything is just well designed<br />
Snippet provides rendering logic<br />Called arbitrarily times on multiple pages<br />Snippet is Scala class or object<br ...
AJAX&Comet<br />
Native support for AJAX and Comet<br />Probably best support available today<br />
JavaScript becomes Scala functions<br />Using Scala function callbacks for AJAX<br />
Abstracts underlying JavaScript libraries<br />Support for JQuery, YUI and ExtJS<br />
Comet support through Actors<br />Receiving messages from browser<br />
Utilizes long-polling<br />Future use of HTML5 web sockets<br />
Provides inherent security<br />Using opaque GUIDs for AJAX & Comet URLs<br />
Native support for AJAX and Comet<br />Probably best support available today<br />JavaScript becomes Scala functions<br />...
Comet support through Actors<br />Sending/receiving messages to/from browser<br />Utilizes long-polling<br />Future use of...
Persistence Support<br />
Dual persistence support<br />Provided by Mapper and Record frameworks<br />
Mapper persistence framework<br />Original persistence framework<br />
Lightweight object-relational mapping<br />Similar design to ActiveRecord<br />
Support for common relational databases<br />MySQL, PostgreSQL, Oracle Database, etc.<br />
Support for different persistence systems<br />Hibernate, JPA, etc.<br />
Lightweight object-relational mapping<br />Similar design to ActiveRecord<br />Support for common relational databases<br ...
Upcoming SlideShare
Loading in …5
×

Lift web framework

1,569 views
1,497 views

Published on

Lift web framework is one of the most popular parts of Scala ecosystem. Thanks to many innovative features and its use in projects such as foursquare or snapsort, this web framework popularity is skyrocketing. Moreover, for many developers, this web framework is the main reason to study Scala programming language.

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,569
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
28
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • 3 swimlines:never did web applications, see what web has to offer and how Lift helps building rich web applicationsused legacy web technologies, see how new approaches such as View-Driven-Development helps being more productiveused modern MVC frameworks, see how easy is to switch and what Lift has to offer in addition
  • Lift borrows from the best of existing frameworks, providing:Seaside’s highly granular sessions and securityRails fast flash-to-bang, convention over configurationDjango’s “more than just CRUD is included”Wicket’s designer-friendly templating style
  • Lift borrows from the best of existing frameworks, providing:Seaside’s highly granular sessions and securityRails fast flash-to-bang, convention over configurationDjango’s “more than just CRUD is included”Wicket’s designer-friendly templating style
  • Promotes better coding, fewer defect because of immutability and strong type systemEvent driven programming, synergy with actorsBetter distribution and parallelism
  • Lift web framework

    1. 1. Petr Hošek@petrh<br />CZJUG, December 2010<br />
    2. 2. Why do we need another web framework?<br />
    3. 3. „Foursquare switched over to Scala & Lift last year and we‘ve been thrilled with the results. The ease of developing complex interactive AJAX web pages enabled very rapid port from our previous platform.“<br />Harry Heymann, <br />
    4. 4. „Lift is the kind of web framework that enables you as a developer to concentrate on the big picture. Strong, expressive typing and higher-level features like the built-in Comet support allow you to focus on innovating instead of the plumbing. “<br />David LaPalomento,<br />
    5. 5. „Lift is the only new framework in the last four years to offer fresh and innovative approaches to web development. It‘s not just some incremental improvement of the status quo, it redefines the state-of-the-art. If you are a web developer, you should learn Lift. “<br />Michael Galpin,<br />
    6. 6. „The fact that Lift-based applications run unchanged on the SAP's NetWeaver CE Java application server makes this an intriguing approach for enterprise applications in the SAP world.“<br />Darren Hague,<br />
    7. 7. Overall View<br />
    8. 8. Expressive elegant web framework<br />Combines best of other frameworks<br />
    9. 9.
    10. 10. Powered by language<br />Modern object-functional JVM language<br />
    11. 11. View First Approach<br />
    12. 12. View-Driven Development<br />Similar to MVC but not exactly the same<br />
    13. 13. No business code allowed in the view<br />Usually represents „seep“ of business logic<br />
    14. 14. Designer friendly markup content<br />Views are well-formed XHTML/HTML5<br />
    15. 15. View-Driven Development<br />Similar to MVC but not exactly the same<br />No business code allowed in the view<br />Usually represents „seep“ of business logic<br />Designer friendly markup content<br />Views are well-formed XHTML/HTML5<br />
    16. 16. vs<br />Model-View-Controller<br />View-Driven-Development<br />
    17. 17. Snippets<br />
    18. 18. Snippet provides rendering logic<br />Called arbitrarily times on multiple pages<br />
    19. 19. Snippet is Scala class or object<br />Functions transforming sequence of XML nodes<br />
    20. 20. Snippets can be stateful or stateless<br />Using session affinity suitable in large scale<br />
    21. 21. No hidden magic or code plumbing<br />Everything is just well designed<br />
    22. 22. Snippet provides rendering logic<br />Called arbitrarily times on multiple pages<br />Snippet is Scala class or object<br />Functions transforming sequence of XML nodes<br />Snippets can be stateful or stateless<br />Using session affinity<br />No hidden magic or code plumbing<br />Everything is just well designed<br />
    23. 23. AJAX&Comet<br />
    24. 24. Native support for AJAX and Comet<br />Probably best support available today<br />
    25. 25. JavaScript becomes Scala functions<br />Using Scala function callbacks for AJAX<br />
    26. 26. Abstracts underlying JavaScript libraries<br />Support for JQuery, YUI and ExtJS<br />
    27. 27. Comet support through Actors<br />Receiving messages from browser<br />
    28. 28. Utilizes long-polling<br />Future use of HTML5 web sockets<br />
    29. 29. Provides inherent security<br />Using opaque GUIDs for AJAX & Comet URLs<br />
    30. 30. Native support for AJAX and Comet<br />Probably best support available today<br />JavaScript becomes Scala functions<br />Using Scala function callbacks for AJAX<br />Abstracts underlying JavaScript libraries<br />Support for JQuery, YUI and ExtJS<br />
    31. 31. Comet support through Actors<br />Sending/receiving messages to/from browser<br />Utilizes long-polling<br />Future use of HTML5 web sockets<br />Provides inherent security<br />Using opaque GUIDs for AJAX & Comet URLs<br />
    32. 32. Persistence Support<br />
    33. 33. Dual persistence support<br />Provided by Mapper and Record frameworks<br />
    34. 34. Mapper persistence framework<br />Original persistence framework<br />
    35. 35. Lightweight object-relational mapping<br />Similar design to ActiveRecord<br />
    36. 36. Support for common relational databases<br />MySQL, PostgreSQL, Oracle Database, etc.<br />
    37. 37. Support for different persistence systems<br />Hibernate, JPA, etc.<br />
    38. 38. Lightweight object-relational mapping<br />Similar design to ActiveRecord<br />Support for common relational databases<br />MySQL, PostgreSQL, Oracle Database, etc.<br />Support for different persistence systems<br />Hibernate, JPA, etc.<br />
    39. 39. Record persistence framework<br />New store-agnostic persistence framework<br />
    40. 40. Support for different stores<br />MongoDB, CouchDB, Squeryl, etc.<br />
    41. 41. Easy to develop custom back-end<br />Automatic validation, CRUD and REST support<br />
    42. 42. Support for different stores<br />MongoDB, CouchDB, Squeryl, etc.<br />Easy to develop custom back-end<br />Automatic validation,CRUD and REST support<br />
    43. 43. REST & WebServices<br />
    44. 44. Built-in REST and WebService support<br />Using either simple DSL or full dispatching<br />
    45. 45. Both statefull and stateless handling<br />Declarative rules for URI dispatching<br />
    46. 46. Simple DSL for JSON construction<br />Extremely fast serialization/deserialization<br />
    47. 47. First-class XML support<br />Native part of Scala language<br />
    48. 48. Built-in REST and WebService support<br />Using either simple DSL or full dispatching<br />Both statefull and stateless<br />Declarative rules for URI dispatching<br />DSL for JSON construction<br />Extremely fast serialization/deserialization<br />First-class XML support<br />Native part of Scala language<br />
    49. 49. Modularity<br />
    50. 50. Lift uses modular architecture<br />Using Apache Maven artifacts<br />Many existing modules available to use<br />Just add dependency into your project<br />
    51. 51.
    52. 52. Security<br />
    53. 53. Out-of-the-box security<br />No vulnerability from the Top Ten<br />
    54. 54. Difficult to introduce vulnerabilities<br />Developers needs to put a lot of effort<br />
    55. 55. Page elements have opaque GUIDs<br />Used to reference server components<br />
    56. 56. AJAX and Comet use similar GUIDs<br />Sensitive data are not exposed<br />
    57. 57. Persistence safe from SQL injection<br />SQL queries sanitization enforcement<br />
    58. 58. Out-of-the-box security<br />No vulnerability from the Top Ten<br />Difficult to introduce vulnerabilities<br />Developers needs to make an effort<br />Page elements have opaque GUIDs<br />Used to reference server components<br />AJAX and Comet use similar GUIDs<br />Sensitive data are not exposed<br />Persistence safe from SQL injection<br />SQL queries sanitization enforcement<br />
    59. 59. Scalability<br />
    60. 60. Support for database sharding<br />Using federation of database servers<br />
    61. 61. Using non-blocking input/output<br />Out-of-the-box support for Jetty Continuations<br />
    62. 62. Decoupling threads from requests<br />Implemented via Scala Actors<br />
    63. 63. Support for database sharding<br />Using federation of database servers<br />Using non-blocking input/output<br />Out-of-the-box support for Jetty Continuations<br />Decoupling threads from requests<br />Implemented via Scala Actors<br />
    64. 64. Negatives & Drawbacks<br />
    65. 65. The good, the bad and the ugly<br />Lift has downsides as well<br />
    66. 66. Framework „takes over control“<br />What is happening in the background?<br />
    67. 67. Documentation is insufficient<br />Many important details are missing<br />
    68. 68. Exploring Lift book is incomplete<br />Upcoming Lift in Action book is still in EAP<br />
    69. 69. No direct tool support<br />Related to insufficient Scala tool support<br />
    70. 70. The good, the bad and the ugly<br />Lift has downsides as well<br />Framework „takes over control“<br />What is happening in the background?<br />Documentation is insufficient<br />Many important details are missing<br />Exploring Lift book is incomplete<br />Upcoming Lift in Action book is still in EAP<br />No direct tool support<br />Related to insufficient Scala tool support<br />
    71. 71. Summary<br />
    72. 72. Lift makes the web development simple<br />Lift combines many ideas & methodologies<br />Lift has new take on web development<br />Lift is inherently secure<br />Lift has excellent AJAX and Comet support<br />Lift is already proven in the industry<br />
    73. 73.
    74. 74. Content adapted from Lift in Action book<br />Timothy Perrett, Manning Publications, 2011<br />Content adapted from Exploring Lift book<br />Derek Chen-Becker, Marius Danciu and Tyler Weir, 2009<br />Content adapted from official website liftweb.net<br />Courtesy of WorldWide Conferencing, LLC<br />

    ×