对于一个完整的 Scala 新手来说,基于 Scala 的框架如何叠加 - Lift、Play、Circumflex 等
最近,基于 Scala 的 Web 框架社区发生了很多变化。来自 Rails、Rake、ActiveRecord 和迁移 - 这是一个很好的 Scala 框架来构建生产站点?
如果可以提供更好的可维护代码,那么性能上的小影响是可以接受的。如果内置协作功能,例如数据库迁移等,那就太好了。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
(主持人编辑:David Pollak 是 Lift 框架的创始人)
如果您想要一个简单的 Scala Web 框架来执行 CRUD 和几个页面,我的建议是 Play。它有一个很好的开发周期,而且简单易用。
如果您正在构建一个将要增长并处理大量流量的应用程序,我建议使用 Lift ;-)
Lift 支持各种 ORM 系统。 Mapper 很像 ActiveRecord。 Mapper 不使用迁移,而是使用 Schemifier 从 Mapper 定义中读取架构定义并相应地更新 RDBMS。
如果您正在构建任何类型的 Ajax 或 Comet 应用程序,Lift 是正确的选择。 Lift 的 Ajax 支持很简单...只需将服务器上的功能与 Ajax 控件相关联即可。当用户单击按钮、下拉选择等时,将调用该函数。
Lift 拥有所有框架中最好的服务器推送 (Comet) 支持。请查看http://liftweb.blip.tv/file/2033658/彗星支持的味道。
在性能和可扩展性方面,Lift 为 Foursquare 和其他高流量网站提供支持。
就简洁的代码而言,Lift 非常简洁,但类型安全(Play 和其他用 String 名称表示变量的框架则不然)。因此,您可以获得类型安全、非常可维护的 REST 支持,这里也非常简洁地演示了: http://www.assembla.com/wiki/show/liftweb/REST_Web_Services
(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
在我看来,玩 scala 模块远比 lift 好,scala 是玩的一等公民。无状态,快速,简单,强大,在生产使用中,有scalate模块,有活跃的用户/开发人员,全栈框架包括缓存,数据库,日志记录,...
观看此视频:http://vimeo.com/7731173
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
Scala Web 框架当前(很可能是未来)的明星是 Lift,尽管您也可以使用任何其他 Java 框架,例如 Play with Scala。
从 Ruby 迁移到 Scala/Lift 时,您不必担心任何性能影响,期望它运行得更快(我听说比 Ruby on Rails 快 600% 到 2000% 的数字),但这取决于您在做什么。
以下是 Lift 创建者关于什么的两个简短解释Lift 确实,以及为什么它对于来自 Rails 的人来说可能很有趣。
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.
有关迁移,请参阅 Scala 迁移
Lift 还没有构建器,但是我认为 play 框架有这个功能。然而,如果您正在开发企业网站,Lift 可能是您的最佳选择。Lifty 是 Lift 的构建器/处理器有关
Lift 的介绍,请查看 Lift in Action(预发布)和Lift 权威指南:基于 Scala 的 Web 框架。后者也可在 Google 网上论坛上获取,请参阅文件“master.pdf”
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"
提升
应该像 Ruby on Rails 一样,并且受到许多人的青睐。
Lift
Supposed to be like Ruby on Rails and is prefered by many.