views:

612

answers:

5

hi, There has been a lot of movement in the Scala based web framework community of late. Coming from Rails, Rake, ActiveRecord and migrations - which is a good Scala framework to build production sites in ?

A small hit in performance is acceptable if it gives a much better maintainable code. It would also be nice if collaboration features are built in - e.g. something like DB migrations, etc.

+2  A: 

Lift
Supposed to be like Ruby on Rails and is prefered by many.

Skuge
+2  A: 

For migrations see Scala Migrations

Lift has no builders (yet), but I think play framework has that. However Lift is probably the way to go if you are developing enterprise sites.

Lifty is a builder/processor for Lift

For an introduction to Lift have a look at Lift in Action (prerelease) and The Definitive Guide to Lift: A Scala-based Web Framework. The latter is also avaliable at Google Groups see file "master.pdf"

oluies
+4  A: 

The current (and quite likely the future) star of the Scala web frameworks is Lift, although you can use any other Java framework like Play with Scala, too.

You don't have to fear any performance hit when moving from Ruby to Scala/Lift, expect it to run faster (I heard numbers between 600% and 2000% faster than Ruby on Rails), but it depends on what you are doing.

Here are two short explanations from the creator of Lift about what Lift does and why it might be interesting for people coming from Rails.

soc
+4  A: 

Hi,

Play with scala module is far better than lift in my opinion, scala is a first class citizen in play. Stateless, fast, simple, powerful, in production use, have scalate module, have active users/developers, full stack framework including caching, db, logging,... Look this video: http://vimeo.com/7731173

sirmak
My two cents goes to Play, probably the easiest to get started with. Great documentation and easy setup. Very similar to Rails project structure
Marcus Kazmierczak
A new article: "Scala and the Play Framework, Wow!" http://mkaz.com/archives/1312/scala-and-the-play-framework/Another play-scala video: http://vimeo.com/11926707
sirmak
how is scala not a first class citizen in lift?
Peter Recore
@Peter: I'm impressed with the answer of David Pollak, too. He's the developer of the lift framework and one of the best scala guy. My Best.
sirmak
I've checked lift again, it's heavyly stateful so can not scale easyly (and I've tired of foursquare sample, everything is possible but development cost matters), play is pure stateless by default. And Play with scala+scalete is more simpler and more full stack,...
sirmak
+10  A: 

If you want a nice simple Scala web framework for doing CRUD and a few pages, Play would be my suggestion. It's got a nice development cycle and it's simple and approachable.

If you're building an app that is going to grow and handle lots of traffic, Lift is my recommendation ;-)

Lift supports a variety of ORM systems. Mapper is much like ActiveRecord. Rather than using migrations, Mapper uses Schemifier to read the schema definition from the Mapper definitions and updates the RDBMS accordingly.

If you're building any kind of Ajax or Comet app, Lift is the right choice. Lift's Ajax support is simple... just associate a function on the server with an Ajax control. When the user clicks the button, pulls down the select, etc. the function gets invoked.

Lift has the best server-push (Comet) support of any framework. Please check out http://liftweb.blip.tv/file/2033658/ for a flavor of the Comet support.

In terms of performance and scalability, Lift powers Foursquare and other very high traffic sites.

In terms of concise code, Lift is very concise, yet type-safe (the same is not true of Play and other frameworks that represent variables with String names). So, you get the kind of type-safe, very maintainable REST support that's also very concise demonstrated here: http://www.assembla.com/wiki/show/liftweb/REST_Web_Services

David Pollak