views:

875

answers:

4

I'm stuck on whether I should focus on Play or Lift for doing web development in Scala.

Play looks very polished. The Scala-specific tutorial looks amazing. Furthermore, since I've been coding in MVC frameworks for a long time, it looks super familiar. However, it doesn't look like it can easily accomplish all the brilliant things that Lift can do. For instance, I can't find anywhere where it mentions Comet or Jetty Continuations. Furthermore, I kind of like the "View First" methodology in Lift because instead of using one controller, it lets me use a ton of snippets to piece together a page.

Lift looks brilliant, but leaves me with a lot of questions unanswered. Being highly stateful looks like it opens up a lot of possibilities, but I wonder how it'll turn out in practice. The book on Lift is a bit of a mess, and so is the wiki. The "Getting Started" page is badly formatted and is no match for Play's tutorial.

Does Play support Jetty Continuations?

Is it painful to get started with Lift doing normal web application development?

How does Lift's statefulness work out in practice? How do you cope with web servers going down in Lift? If I'm using Lift, and I push a new version of my code on a daily basis, does that mean I have to restart the application, and does that mean everyone's session gets wiped out?

Does Lift's statefulness actually make it easier to code?

What happens if someone messes around with the back button in Lift? What happens if a user is bouncing back and forth between several tabs?

Thanks, guys!

+2  A: 

I've only touched Lift once so I can't offer a comparison, but here are my $0.02 on Play!.

I spent the summer using Play! (mostly sans-scala) on the job, and will likely be starting another Play! project soon, this time with Scala and Akka.

Some features I really enjoyed:

  • Java Support
    Yeah, I'd prefer pure Scala, but sometimes it doesn't make sense to rewrite something when you could just drop it in. Play! has no problems with some or all of your source files being .java.

  • The module system rocks
    Modules are basically Play! apps, added as an overlay which can extend any or all parts of a an app. The library of existing modules contains some great stuff too.

  • Creating custom view tags is quite easy
    I didn't start doing this until the end of the project, but I wish I had. Custom tags can save alot of code and time, and are so easy to write there's no excuse not to.

Maybe most impressive to me though, was that from the first time I decompressed Play! to the first time I could show my boss a working prototype of my project was just a couple days -- I think I'd be hard pressed to find a framework with less overhead/learning curve.

P.S. There's also no Play! book(s)... whatever that says about Play! vs Lift.

David
Victor above also mentioned Play + Akka. That's interesting. If you're using Akka to provide Comet support, does that mean it's safe to let web browsers directly talk to Akka instead of having it hidden in the backend?
Shannon -jj Behrens
Yes Shannon :-)
Viktor Klang
+9  A: 

Akka + Play! and you have Comet + REST + Presentation layer + scalability

Viktor Klang
Wow, that was unexpected!
Shannon -jj Behrens
Ok, that looks pretty impressive! Tell me more! Is it too good to be true?
Shannon -jj Behrens
Akka supports JAX-RS via Jersey and Comet/WebSockets via Atmosphere
Viktor Klang
+1  A: 

I think the Play framework and Akka are the way to go.

Shannon -jj Behrens
+5  A: 
Chris Hagan
That's really helpful. Thanks! After a lot of deliberation, I came to the conclusion that Play is a better fit for me: http://jjinux.blogspot.com/2010/09/scala-lift-vs-play-for-web-development.html
Shannon -jj Behrens