How do the Scala based frameworks stack up for a complete Scala newbie - Lift, Play, Circumflex, etc [closed]
Asked Answered
G

5

14

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.

Gallonage answered 2/7, 2010 at 7:58 Comment(3)
hah! you're worried about scala being slower than rails?Tuggle
@Peter, the performance comment is for amongst the Scala based frameworks themselves. I thought my language was pretty clear. Frequently people get fixated with 0.01% performance gain benchmark as the reason why framework A is better than framework B - I wish to avoid that.Gallonage
That makes sense, and I feel the same way. I thought you meant you were willing to sacrifice some speed to go from ruby to scala, which i thought was funny, because ruby/rails is typically stereotyped as being relatively slow.Tuggle
A
16

(moderator edit: David Pollak is the founder of the Lift framework)

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

Ammoniac answered 8/7, 2010 at 20:51 Comment(0)
S
6

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.

Spiritualty answered 3/7, 2010 at 10:24 Comment(0)
P
6

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

Proulx answered 3/7, 2010 at 19:38 Comment(5)
My two cents goes to Play, probably the easiest to get started with. Great documentation and easy setup. Very similar to Rails project structurePyrogen
A new article: "Scala and the Play Framework, Wow!" mkaz.com/archives/1312/scala-and-the-play-framework Another play-scala video: vimeo.com/11926707Proulx
how is scala not a first class citizen in lift?Tuggle
@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.Proulx
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,...Proulx
A
4

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"

Airs answered 2/7, 2010 at 17:3 Comment(0)
T
3

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

Tapetum answered 2/7, 2010 at 8:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.