Lifty Engine for Beginners


Lifty Engine is a Sbt processor target to LiftWeb Processor. If we would like to create our first LiftWeb processor with the Lifty Engine the best point to start is reading this article.

The objective of this post is go deep on that article and post my own experience using it. Also, to share some of my progress with it to automatize the process.

Lifty-Engine is the framework underneath the Lifty tool
The Lifty processor is packed with the following templates which help us to automatize the projects works. Being a lazy developer, the world automatize sounds terribly good.

The processor can create the following templates:
We execute at sbt prompt (Once the sbt project has been already created. See this previous post). Beware that sbt prompt is case sensitive, enter lifty processor using lower case letters.

  • Snippet: This template creates a Liftweb snippet. It creates the snippet file src/main/scala/org/lifty/snippet/MySnippet.scala using the following syntax lifty create snippet MySnippet
  • Mapper: Model class using Mapper
  • Comet: Comet component
  • Layout: An empty layout with a surround tag
  • Project: A Lift project with some functionality to get you started. It creates a project with a H2 database and the Users created.
  • Project-blank: A blank Lift project that uses SBT as it’s build system. It is the same that the liftweb-project-blank archetype.
  • User: Model class implemented using Mapper. It provides basic functionality that would expect from a User
  • Dependency Factory:To test