![]() |
![]() |
||||
Lift is a popular web application framework for using Scala
on the server. It is probably best known as the platform used by FourSquare. Scala has also become more well known since April 2009 when Twitter announced they had switched large portions of their backend over from Ruby to Scala and intended to convert the rest.
This is a short tutorial on installing one of the sample applications from Lift 2.4 / Scala 2.9 onto Tomcat and TomEE.
For this tutorial, we deployed successfully to the following platforms, using standard Metawerx Java Hosting accounts:
Introduction to Lift/Scala applications
Lift/Scala applications install easily on any standard Tomcat/TomEE VM. The application is built locally and the web application is generated automatically by the build scripts, ready to WAR up and deploy. Therefore the installation is actually very simple.
Lift is built on Scala, a hybrid functional OO language that compiles code into Java bytecode. Scala code can call any Java code and make use of all Java classes.
Lift code is as clean and brief as Rails, but performs at least 6 times faster and is multithreaded. Scala is also strongly typed so the compiler catches type errors.
Other benefits of a Lift application include:
Getting Started
sbt update ~jetty-run
1. Waiting for source changes... (press enter to interrupt)
Test Locally
Deploy to Tomcat
cd lift-lift_24_sbt-f911f30\scala_29\lift_basic\target\scala_2.9.0-1\webapp jar cvf lift_basic.war .
Notes on the lift_basic sample application
Easy! Now go back and try the other samples or start developing your new Scala/Lift app!
- Neale Rudd, 14-Apr-2012