Lift is the most powerful, most secure web framework available today
You’ve probably heard about the growth of functional programming languages, and of Scala in particular. What you might be wondering is what that means for web frameworks, and that’s where Lift fits in.
Lift is an open source web framework, built for the Scala programming language, and started by David Pollak in 2007. Version 1.0 shipped in 2009, and the latest version, 2.5.1, was released in June 2013.
The “most powerful, most secure” title of this post is taken from the Lift home page. That power and security comes from Lift’s different approach to web development–it’s not another MVC framework, but instead has a different emphasis on development.
For example, templates (pages) in Lift have the property of being designer friendly. That means a designer can work on the page without having to gingerly step around any server-side scripting elements. That’s because Lift uses CSS classes to mark areas of a page for replacement on the server. Web editing tools work well with this, and Lift can get on and use the content without changes.
Another example is the way HTML form elements can be connected back to functions on the server. In some frameworks you wire a URL to code, extract values, and do something with them. You can do that in Lift, but you also have the ability to bind a function to input fields and forms. Your function can focus on what it needs to do, and Lift will take care of calling your function at the right time.
Features like this give great power but can be confusing at first. A tweet from a new Lift user captures it well:
BOOM! coding up a storm in Lift. Learning curve has been steep but well worth it. Great community on the forums.
— Andrew (@undrewb) August 11, 2013
My understanding of Lift improved by hanging out on the mailing list. Not just by asking questions, but by learning from what others in the community were discussing. I eventually tried to help answer some questions, which I think is a great way of learning. At about the same time my confidence was given a boost by seeing that FourSquare were using Lift. It’s an indicator that the technology is serious: that site has plenty of traffic.
I further grew my experience in Lift by building applications, first for internal company use, and then rolling out Lift for customers.
The “coding up a storm” comment about fun and productivity rings true for me. It’s probably most obvious in Lift’s superb Comet and Ajax support. This makes Lift a great platform for building interactive sites, from subtle server-push page updates to a dashboard, through to full social applications.
When it comes to other aspects of web development, Lift doesn’t force you down any particular route. With databases, for example, you get to pick what you want to use and how you want to work with it. Lift Record works well with relational databases, MongoDB and CouchDB. But you don’t have to use it if there’s something else you’d prefer, and you’re not going to miss out on the other features of Lift by going your own way.
Richard Dallaway is a partner at Underscore Consulting, the UK’s leading Scala consultancy, where he works on delivering software projects for clients. He’s a committer on the Lift project, focusing mainly on the modules system, and author of The Lift Cookbook: Recipes from the Community for Building Web Applications with Scala, published by O’Reilly.