Lift in Action: The Simply Functional Web Framework for Scala

By Timothy Perrett

Summary

Lift in Action is a step by step exploration of the raise framework. It strikes in the course of the topic quick utilizing rigorously crafted, well-explained examples that make you cozy from the beginning. This booklet is written for builders who're new to either Scala and Lift.

About the Technology

Lift is a Scala-based internet framework designed for terribly interactive and fascinating net functions. it truly is hugely scalable, production-ready, and should run in any servlet box. And Lift's convention-over-configuration strategy helps you to stay away from useless work.

About this Book

Lift in Action is a step by step exploration of the raise framework. It strikes in the course of the topic speedy utilizing conscientiously crafted, well-explained examples that make you cozy from the beginning. you are going to keep on with an enjoyable commute public sale program that covers the center recommendations and indicates up architectural and improvement innovations. convenient appendixes provide a Scala crash path and counsel for constructing an outstanding coding atmosphere.

This booklet is written for builders who're new to either Scala and raise and covers barely enough Scala to get you started.

buy of the print booklet comes with a suggestion of a unfastened PDF, ePub, and Kindle booklet from Manning. additionally on hand is all code from the publication.

What's Inside

  • Complete insurance of the carry framework
  • Security, maintainability, and performance
  • Integration and scaling
  • Covers raise 2.x

Table of Contents

    PART 1 GETTING STARTED
  1. Introducing Lift
  2. Hello Lift
  3. PART 2 software TUTORIAL
  4. The public sale application
  5. Customers, auctions, and bidding
  6. Shopping basket and checkout
  7. PART three elevate IN DETAIL
  8. Common initiatives with elevate WebKit
  9. SiteMap and entry control
  10. HTTP in Lift
  11. AJAX, wiring, and Comet
  12. Persistence with Mapper
  13. Persistence with Record

Show description

Quick preview of Lift in Action: The Simply Functional Web Framework for Scala PDF

Similar Computing books

Recoding Gender: Women's Changing Participation in Computing (History of Computing)

This day, ladies earn a comparatively low percent of desktop technological know-how levels and carry proportionately few technical computing jobs. in the meantime, the stereotype of the male "computer geek" seems far and wide in pop culture. Few humans recognize that girls have been an important presence within the early a long time of computing in either the U.S. and Britain.

PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)

It hasn't taken net builders lengthy to find that after it involves growing dynamic, database-driven sites, MySQL and Hypertext Preprocessor offer a successful open-source mixture. upload this publication to the combination, and there is no restrict to the strong, interactive sites that builders can create. With step by step directions, entire scripts, and professional how one can advisor readers, veteran writer and database clothier Larry Ullman will get down to company: After grounding readers with separate discussions of first the scripting language (PHP) after which the database application (MySQL), he is going directly to conceal defense, classes and cookies, and utilizing extra net instruments, with a number of sections dedicated to developing pattern functions.

Game Programming Algorithms and Techniques: A Platform-Agnostic Approach (Game Design)

Video game Programming Algorithms and strategies is an in depth assessment of some of the vital algorithms and strategies utilized in game programming this present day. Designed for programmers who're accustomed to object-oriented programming and uncomplicated facts constructions, this publication makes a speciality of sensible techniques that see real use within the online game undefined.

Guide to RISC Processors: for Programmers and Engineers

Info RISC layout ideas in addition to explains the variations among this and different designs. is helping readers collect hands-on meeting language programming event

Extra info for Lift in Action: The Simply Functional Web Framework for Scala

Show sample text content

This is often the technique TestAccess adopts. reckoning on your application’s requisites, you could opt for both implementation. try differs from TestAccess in that it takes a Req example as its functionality argument so that you can payment any point of the request that you simply like. for instance, might be the incoming request should have a selected cookie, or can in simple terms be accessed lower than a undeniable host (like localhost). some of these issues are simply established for with the try out parameter. think about the subsequent utilization: >> Test(req => req. hostName == "localhost") during this instance, except the URL is being accessed below http://localhost/, carry will yield a 404. you could do that out through vacationing http://127. zero. zero. 1/ after which http:// localhost/. the previous gets a 404 web page, however the latter provide you with the web page as anticipated. lovely neat. try has its makes use of in yes purposes, yet you’ll most probably use TestAccess extra since it eliminates goods from the menu that yield a Full[LiftResponse] from the functionality. TestAccess enables you to money any source you love inside of your functionality, to ensure that the present person has entry to that point of the applying. for instance, it’s universal to envision no matter if a consumer is logged in, and in the event that they are a specific worth will exist within the present consultation. If the person then occurs to navigate to that web page with out logging in (perhaps the web page used to be stored as a bookmark), you could effectively redirect them to the login URL. Here’s an instance of forcing a person to log in to a web page: item LoggedIn extends SessionVar[Box[Long]](Empty) >> TestAccess(() =>LoggedIn. is. selection( x => Empty)(Full(RedirectResponse("login")))) There are a number of issues occurring within the previous code. First, an item referred to as LoggedIn that holds a person identity is decided by way of a web page referred to as login. The TestAccess parameter then assessments for the life of the adequately set SessionVar ahead of permitting entry to the web page. If TestAccess is Empty, the menu is displayed and all is definitely. If it yields the redirect reaction, the hyperlink is faraway from the rendered menu and any try and entry the web page will lead to a redirect to login. at the login web page, the consumer may well input their credentials and the code there could effectively set the worth of LoggedIn, letting them effectively entry the web page in query. HTTPAUTHPROTECTED on the way to use Lift’s HTTP authentication, you want to first outline whatever like directory 7. 2 on your Boot type to outline the kind of HTTP authentication you should use. you could at present choose from HTTP uncomplicated authentication and the extra refined HTTP digest authentication. presently the alternative among the 2 mechanisms is worldwide on your software, yet this quite often isn’t a topic since it could most likely be challenging to combine the 2 authentication codecs. 152 bankruptcy 7 directory 7. 2 SiteMap and entry regulate Configuring HTTP authentication in Boot LiftRules. authentication = HttpBasicAuthentication("yourRealm"){ case (un, pwd, req) => if(un == "admin" && pwd == "password"){ userRoles(AuthRole("admin")); precise } else fake } for additional information at the distinction among HTTP easy authentication and digest authentication, see the Wikipedia articles at http://en.

Download PDF sample

Rated 4.83 of 5 – based on 19 votes