scala Lift 框架是否像 Ruby on Rails 或 Django 一样“简单”?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/957795/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 01:26:39  来源:igfitidea点击:

Is the Lift framework as "easy" as Ruby on Rails or Django?

ruby-on-railsdjangoscalalift

提问by johnny

Just wondering if anyone has experience with the three. I have used read through some RoR and used Django. They seem fairly easy to use. Is lift "easy" like these two are? I know easy is subjective and has no context here. I mean in a very high level and general sense.

只是想知道是否有人对这三个有经验。我使用过一些 RoR 并使用过 Django。它们看起来相当容易使用。电梯像这两个一样“容易”吗?我知道简单是主观的,这里没有上下文。我的意思是在非常高的层次和一般意义上。

回答by Matt

I'm currently working on a series of projects in lift, so I'll give my personal experiences.

我目前正在做一系列的电梯项目,所以我会给出我的个人经验。

Its a very capable framework - and I find it makes lighter work of application development than the equivalent in rails or django. However, you will need a reasonable understanding of scala in order to get started on sophisticated app development as documentation is existent but limited, and not centralised.

它是一个非常强大的框架 - 我发现它比 rails 或 django 中的等效框架使应用程序开发工作更轻松。但是,您需要对 scala 有一个合理的了解才能开始复杂的应用程序开发,因为文档存在但有限,而且不是集中的。

Lift itself has cherry-picked a lot of features from existent frameworks - rails and django included - to form, imho, a best of breed framework. It also uses some novel techniques of its own that truly mean you can take a frontend and build an application around it relatively quickly.

Lift 本身从现有框架(包括 rails 和 django)中精心挑选了许多功能,以形成最好的框架。它还使用了一些自己的新技术,这真正意味着您可以相对快速地使用前端并围绕它构建应用程序。

Following the tutorials, you can create the classic "todo" application demonstrated by many frameworks with little to no experience within 2-3 minutes. But I would say that you need to have a reasonable knowledge of Java, and an understanding of scala in order to get the most out of lift.

按照教程,您可以在 2-3 分钟内创建由许多框架演示的经典“todo”应用程序,几乎没有经验。但我想说的是,您需要对 Java 有一定的了解,并了解 Scala 才能充分利用 Lift。

Setting up a comfortable development environment isn't exactly painless, due to spotty scala support in the mainstream IDEs.

由于主流 IDE 中对 Scala 的支持参差不齐,因此设置一个舒适的开发环境并非完全没有痛苦。

If you have a weekend you can dedicate to getting startedand reading the bookI would highly recommend taking the plunge.

如果你有一个周末,你可以专注于入门阅读这本书,我强烈建议你尝试一下。

As a more direct answer to your question, in terms of "ease", I would say that if you are unfamiliar with Java, scala, ruby and python, then of the three, your best bet would be rails - as ruby is a beautiful language, nigh on self-explanatory, well documented, introduces the majority of OO concepts, and is very easy to learn. Additionally, I know of many people that have actually learned ruby solely through developing in rails.

作为对您的问题的更直接回答,就“易用性”而言,我会说,如果您不熟悉 Java、scala、ruby 和 python,那么在这三者中,您最好的选择是 rails - 因为 ruby​​ 是一种美丽的语言,近乎不言自明,有据可查,介绍了大多数面向对象的概念,并且非常容易学习。此外,我知道很多人实际上只是通过在 Rails 中开发来学习 ruby​​ 的。

回答by Anthony Skipper

I have to disagree with the other answers that support Lift over RoR and Django. Lift is incredibly capable, and it is very flexible. But anyone who thinks it is easier to grok and get rolling with than Django and RoR isn't being pragmatic.

我不得不不同意支持 Lift over RoR 和 Django 的其他答案。Lift 非常强大,而且非常灵活。但是任何认为它比 Django 和 RoR 更容易理解和上手的人并不务实。

For one there is a lot more documentation on Django and RoR. Their are training classes, way more books, lots of web entries on solving common problems. Django has a huge number of plug-ins,etc. I know it might not seem like these things matter but they do. When it's hard to hire, hard to train, you have to solve common problems over again, etc it's a real drain.

其中之一是关于 Django 和 RoR 的更多文档。他们是培训班,更多的书籍,关于解决常见问题的大量网络条目。Django 有大量的插件等。我知道这些事情似乎并不重要,但它们确实重要。当招聘困难、培训困难时,你必须重新解决常见的问题,等等,这真的是一种消耗。

I'm a fan of lift, and I think one day my recommendation might not be true. But if your life is dependent on it you might want to take the safe course and go RoR/Django.

我是电梯的粉丝,我想有一天我的建议可能不是真的。但是,如果您的生活依赖于它,您可能想要采取安全的路线并转到 RoR/Django。

回答by JAL

I'd have to say it's a bit more difficult to get started with, due to the complexities of the Java/Scala ecosystem (maven? gradle? .war files? Tomcat? Jetty? what??) and the necessity of compilation. The exception is if you have Java development experience, or especially Java web development experience, in which case I'm sure all of this stuff is an old hat to you.

我不得不说,由于 Java/Scala 生态系统的复杂性(maven?gradle?.war 文件?Tomcat?Jetty?什么??)和编译的必要性,它开始有点困难。例外情况是,如果您有 Java 开发经验,或者特别是 Java Web 开发经验,在这种情况下,我相信所有这些东西对您来说都是老生常谈。

Once you've gotten past that and have a workflow, it's great. Scala is a fantastic language, and lift is an engaging framework.

一旦你克服了这一点并拥有了一个工作流程,那就太好了。Scala 是一种奇妙的语言,而lift 是一个引人入胜的框架。

回答by ozone

If ease of start up is your only concern then you may want to go with RoR or Django. But if long term performance, scalability and maintainability are significant, if you are capable of learning scala, which is a bit more complicated but quite elegant and enjoyable in my experience, then Lift or Play will probably yield greater longevity and adaptability long term, which may greatly out weigh the slightly larger startup time on a significant project. Take a look at some of the performance comparisons

如果您只关心易于启动,那么您可能想要使用 RoR 或 Django。但是如果长期性能、可扩展性和可维护性很重要,如果你有能力学习 Scala,这有点复杂,但在我的经验中相当优雅和愉快,那么从长远来看,Lift 或 Play 可能会产生更长的寿命和适应性,这在一个重要的项目上,可能会大大超过稍长的启动时间。看看一些性能比较