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

﹥>﹥吖頭↗ 提交于 2019-12-20 09:18:47

问题


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.


回答1:


(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




回答2:


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




回答3:


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.




回答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"




回答5:


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



来源:https://stackoverflow.com/questions/3164071/how-do-the-scala-based-frameworks-stack-up-for-a-complete-scala-newbie-lift-p

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!