background preloader

Lift basics

Facebook Twitter

Using SBT | Lift Space. Sbt is a build tool for Scala and Java projects that aims to do the basics well. Three ways to get started: Use a bash script. The script will download Java too, if needed. (Mac and Linux) curl > ~/bin/sbtUse the OS package manager (Mac and Linux)Download and install manually (Windows) See Scala-starter Github project for a minimal SBT setup. Lift build config template See also Tutorial: Building your first Lift app with sbt. Create a build.sbt file in the root of your project Create a new file called project/plugins/build.sbt or project/plugins.sbt with the following content: libraryDependencies <+= sbtVersion(v => "com.github.siasia" %% "xsbt-web-plugin" % (v+"-0.2.10")) // moved to repo1 // for the older version of the plugin, use the following instead: // you will need to change jetty's scope from 'container' to 'jetty' above //libraryDependencies <+= sbtVersion(v => "com.github.siasia" %% "xsbt-web-plugin" % ("0.1.0-"+v)) For SBT 10.x :

Set Up Lift with SBT and MySQL. Being new to Scala/Lift/SBT, I thought I'd share some things I've learned along the way. It seems that Lift will be moving toward SBT (scala build tool) soon. Lift's creator David Pollak has created a prototype SBT setup that, in and of itself, is a piece of cake. You'll need to have git installed and working as well. Then it's just a matter of entering in a terminal window: git clone By default that would create a folder called "lift_sbt_prototype" in the current folder, but you can override that by specifying the new folder name as a parameter.

Git clone iptracker This will create a folder called "iptracker" in the current folder. In this folder is a "project" subfolder that contains files that you can (and most likely) will modify as your project grows. Now for a quick test, just enter these commands in the main project folder terminal (iptracker in my case): create database iptracker; import sbt. Adding OpenId support to a Scala / Lift application « The Blog of Warren Strange. The Lift web framework includes basic support for OpenId using the the openid4java library. I wanted to learn a little more about Scala, Lift and OpenId – so what follows are my notes on how to get this running, along with some minor improvements that I have made.

You will want to start by familiarizing yourself with the OpenId chapter in the (rather excellent) Lift book. Out of the box, the lift-openid support gets you a vanilla login form where the user can enter their OpenId URL and submit the request. Something that looks like this: While this is nice for identity geeks, your grandma isn’t going to be using this anytime soon. The OpenId UI issues are being hotly debated as you read this, and I won’t open that can of worms. Too add a slicker login interface, I grabbed a copy Jarret Vance’s OpenId JQuery Plugin. I created a Lift template for the login page and placed it under my webapp/templates-hidden directory. Now that we have a login template, we can define the login page. Build Comet applications using Scala, Lift, and jQuery. Hello World Lift. Recently I've been trying to get into Lift. While there's a lot of information out there there's nothing that really lets a beginner start with the basics.

This post basically gives you the bare minimum configuration and dependencies to get a simple Lift application running. This example just writes some text to the main web page of your application - The ubiquitous "Hello World". If you find any errors or inaccuracies please let me know as I'm still figuring this stuff out! The source for this project can be found here. I'm using SBT for building this project. The basic structure of this Lift project is as follows: The SBT properties and SBT project can be found in: project > build.properties project > build > LiftProject.scala The scala source can be found in: src > main > scala > bootstrap > liftweb (contains a bootstrap class) src > main > scala > au > com > testlift > snippet (contains snippet code) Properties are defined in: The web application structure can be found in: 1. 2.

Update jetty-run. Scala Lift Web Framework Tutorial and Job Listings.