Chapter 2. Hello Lift

 

In this chapter, you’ll be creating your first Lift application, but before getting to that, you need to set up your environment so you can compile and run your application code. In order to run on the JVM, Scala code must be compiled before it can be executed. Although it’s possible to compile Scala source code manually, it’s a good idea to have an automated build tool that does this for you.

If you’re coming from a dynamic language such as Ruby or PHP, you may never have needed a build tool. Essentially, build tools automate parts of your development and deployment processes. Typical tasks include compiling and packaging code into deployable binaries, generating code documentation, and lots of other things.

In this chapter, you’ll be setting up the Simple Build Tool (SBT) that you’ll use throughout this book. You’ll also see how you can get SBT to speed up your development by generating starting points for projects, classes, and markup templates.

Once you have your environment configured, you can get to work making your first Lift application. Section 2.2 walks you through creating this first project and explains the various component parts, their purposes, and how you can add to them.

The final section builds upon this introduction and explains how you can put together your own snippets and templates.

2.1. Getting started with SBT

2.2. Your first Lift application

2.3. Snippets and templating overview

2.4. Summary