Making the Shift from Rails to Lift*
Lift's view-centric approach to MVC and Scala's static typing along with its use of immutable constructs, implicits, case classes, and pattern matching can prove confusing to Rails developers. Charles Munat explains how Lift differs from Rails and shows how to exploit those differences to write powerful web applications in Lift.
Scala is a hybrid functional/object oriented programming language that compiles into bytecode and runs in the JVM. Scala’s function aspect permits programmers to write code that looks much like Ruby, but with the added benefits of static typing, a compiler, full access to Java libraries, and the full power and performance of the JVM.
Lift is a view-centric web framework that combines the best features of Seaside, Rails, Django, and Wicket. For Comet applications, there’s nothing better.
But the shift in paradigms from Ruby and Rails to Scala and Lift can be confusing. In this presentation, Charles Munat addresses the difficulties he encountered when switching from Rails to Lift, and demonstrates how to build a CRUD application in Lift from a Rails developer’s perspective.
Topics covered include creating models and migrating the database, the benefits of Lift’s strict separation of view XML and controller logic, Lift’s lightweight snippets and how they differ from Rails controllers, working with Maven, a comparison of IDEs, how Lift’s plumbing differs from a typical Rails app, Lift resources and how to use them, and more.
Two equivalent web applications – one in Lift and one in Rails – will be constructed side by side to show how the frameworks compare and contrast. Attendees may follow along on their own computers simultaneously.
Charles Munat has been building dynamic database-backed web applications for more than a decade. He has worked with Scala/Lift, Ruby/Rails, LAMP, .Net, ASP, and even Tcl/Tk and Cold Fusion. At one time or another he has used every major RDBMS, plus a few more exotic databases as well. He’s built desktop applications and COM objects in C#, command-line applications in C, C++, and Java, and Java applets, and even helped teach a class in C programming. His first programming language was PL-C learned at Cornell University in the late 1970s on an IBM mainframe using punch cards and printouts.
Charles built his first website in 1995 using Notepad. His first professional site, built in 1997 and still using Notepad, featured absolute CSS positioning, was standards compliant, and met virtually every requirement of the Web Content Accessibility Guidelines (WCAG), then still in working draft format. He was an early advocate of usability and accessibility, sitting briefly on the W3C WCAG 2.0 working group, and was highly active on the W3C Web Accessibility Initiative’s interest group mailing list.
Over the years he has worked mostly as a private contractor, building applications to help elementary school children with behavioral disabilities, promote health, the environment, and alternative energy sources, and provide enterprise-level power to small and/or non-profit businesses.
Charles holds a B.S. in Informatics and a B.A. in Linguistics from the University of Washington. His interests range from politics, philosophy, and art, to culture, cuisine, and even cocktails (but only the really good ones).