你在 Scala/Lift 中开发的经验是什么?

2022-01-16 00:00:00 scala frameworks lift java

我听说了很多关于 Scala 和 Lift Web 框架最近,特别是来自 Foursquare 的家伙 因此,我可能会在我的下一个项目中使用这项技术.

I heard a lot of good things about Scala and the Lift Web framework recently, especially from Foursquare's guys hence, I might use this technology in my next projects.

  • 你们中有人是 Scala/Lift 开发人员吗?
  • 您在此平台上进行开发的经验是什么?与 Ruby On Rails 或 Python/Django 相比,它有哪些优势?
  • 您是否认为它是一种可行的技术以及未来几年值得关注的东西"?

值得吗?分享您在 Scala/Lift 平台上的经验.

Is it worth it? Share your experiences on the Scala/Lift Platform.

推荐答案

  1. 我目前大部分的工作都是在 Scala 中完成的.(我应该提一下,我认为 Scala 是自不久前发明轮子以来最好的东西.:-D)

  1. I'm currently doing most of my things in Scala right now. (I should mention that I think that Scala is the best thing since the invention of the wheel some time ago. :-D )

以我的拙见,它是唯一真正允许人们选择最佳方法来完成任务的语言,而不会在(更多)面向对象和(更多)函数式方法之间进行不必要的划分.

In my humble opinion it is the only language which truly allows people to choose the best approach to a task without some unnecessary divide between (more) object-oriented and (more) functional approaches.

查看之前声称类似的语言,我基本上可以看到两个相互竞争的语言设计阵营:

Looking at the languages which claimed something like this before, I can basically see two competing language design camps:

  • 那些来自面向对象方面的人最近看到函数式编程获得了一些关注,并认为好吧,我们并不真正理解函数式的东西,但是让我们在我们的语言中添加一些花哨的语法糖,所以我们可以声称它也有功能!"(例如:Java、Python)

然后是函数式的,他们认为嗯,我们的函数式方法比其他任何方法都优越,面向对象的废话很烦人,但是让我们在我们的语言中添加一些额外的关键字,这将使我们的语言肯定会逃离学术界!"(例如:F#、OCaml)

Then the ones from the functional side, who thought "Well, our functional approach is far superior to anything else and that object-oriented nonsense is annoying, but let's put some additional keywords into our language, that will make our language escape academia for sure!" (examples: F#, OCaml)

Scala 的设计者统一了来自双方的许多方法,并创建了一些设计良好的语言,在我看来,这是与其他语言最大的不同之处,因此决定采用弗兰肯斯坦"方法进行编程语言设计.

Scala's designers unified many approaches coming from both sides and created some well-designed language, which is - in my humble opinion - the biggest difference to other languages, which decided to take the "Frankenstein" approach to programming language design.

我只对 Lift 做过一些小事,对 Rails 和 Django 也只有肤浅的经验,我不得不承认,大多数时候当我想知道 Lift 中的某些东西与我预期的不同时,这是由于事实上,我的期望是有缺陷的,而 Lift 的方法更胜一筹.

Having done only smaller things with Lift yet and only superficial experience with Rails and Django, I have to admit that most of the time when I wondered why something in Lift worked differently from what I expected, this was due to the fact that my expectations were flawed and Lift's approach superior.

Lift 肯定不是对 Scala 的简单介绍",但学习 Lift 的工作原理几乎与学习之前的 Scala 一样有益.

Lift is certainly no "easy introduction to Scala" but learning how Lift works was almost as rewarding as learning Scala before it.

拥有一个没有任何逻辑的干净"视图的能力是对其他声称相同但未能实现的框架的巨大改进.Scala 的 XML 文字支持可以验证您的响应的格式正确:编译器将在编译时证明您只向客户端发出格式正确的 XML.

The ability to have a "clean" view without any logic in it is a great improvement to other frameworks which claimed the same, but fell short of it. Scala's XML literal support makes it possible to verify the well-formedness of your response: The compiler will prove at compile time that you only emit well-formed XML to a client.

Lift 是一种可行的技术,如果您想构建看起来、感觉和行为都像真实"桌面应用程序的 Web 应用程序,而无需自己编写大量代码,那么它是目前唯一真正的方法.

Lift is viable technology and at the moment the only real approach if you want to build web applications which look, feel and behave like "real" desktop applications without writing insane amounts of code yourself.

相关文章