Scala (2.8)/Lift (2.2) 与 C# (4.0)/ASP.NET-MVC 3

发布于 2024-10-23 19:45:12 字数 1548 浏览 1 评论 0原文

我最近在个人时间里学习Scala。在工作中,我一直在学习C#/.NET (4.0)。我对两者都不够熟悉,无法对 LiftASP-MVC 3。我正处于十字路口。鉴于我的时间非常有限,我必须在接下来的 3-6 个月内选择其中之一来学习和构建应用程序。

我今天看到这篇 Lift 文章,立刻就被吸引了。我已经尝试了文章中概述的大部分内容,这给我带来了无尽的沮丧和头痛。其中一些我最终放弃并实施了粗糙不安全的简单版本只是为了完成项目。所以,这篇文章让 Scala/Lift 非常有吸引力。

然后在午餐时,我的团队成员(也是朋友)正在讨论他在 .NET 4.0 上使用 C# 开发 ASP-MVC 3 的工作。听起来学习和使用起来会非常愉快。他谈到的事情似乎与我早上读到的 Lift 文章重叠。

我的问题是这样的:鉴于我的时间有限,选择 Scala/Lift 相对于 C#/ASP-MVC 3 的优点和/或缺点是什么?而 C#/ASP-MVC 3 相对于 Scala/Lift 有哪些优势呢?

为了降低评估的复杂性:请假设每种技术均采用当前最新版本; Scala 2.8.1(2010 年/12 月)、Lift 2.2(2011 年/1 月)、C#/.NET 4.0(2010 年/4 月)和 ASP-MVC 3(2011 年/1 月)。

感谢您在这个关键的架构决策点为我提供帮助。


2011 年 3 月 19 日 12:25 CDT 更新:
此后我偶然发现了一些似乎对 Scala/Lift 方面非常有帮助的资源:
1. 免费电子书(PDF 和 HTML),标题为 “探索 Lift(基于 Scala 的 Web 框架)”
2. Lift 创建者的 Wiki 文章,标题为 “View First”

第一章电子书非常有帮助。我真的很喜欢 Lift 设计原则和实现对“关注点分离”(将代码排除在显示片段之外)和“约定优于配置”的关注。

从我到目前为止所看到的情况来看,虽然 ASP-MVC 3 使用相同的“强指导方针”,但它仍然依赖于代码和表示“混合”的层。这是站点设计者和软件工程师在创建之后都不敢涉足的地方。 IOW,起源之后,会有维护龙。我希望有人告诉我我在这里错了。

I have recently been learning Scala in my personal time. At work, I have been learning C#/.NET (4.0). I am not deeply familiar enough with either to be able to more than minimally evaluate either Lift or ASP-MVC 3. I'm at a crossroads. And given my very limited time, I must choose between one or the other to learn and build an application over the next 3-6 months.

I came across this Lift article today and I immediately was intrigued. I have attempted most of the things outlined in the article causing me endless hours of frustration and headaches. And some of which I eventually gave up and implemented crude unsafe simple versions just to get the projects completed. So, this article made Scala/Lift very attractive.

And then at lunch, my team member (and friend) were discussing his working on ASP-MVC 3 using C# on .NET 4.0. And it sounds like it would be very enjoyable to learn and use. And he spoke of enough things that seemed to overlap the Lift article I had read about in the morning.

My question is this: Given my limited time, what are the advantages and/or disadvantages of choosing Scala/Lift over C#/ASP-MVC 3? And what kind of advantages does C#/ASP-MVC 3 have over Scala/Lift?

To reduce complexity in my evaluation: Please assume the current latest version of each of these technologies; Scala 2.8.1 (2010/Dec), Lift 2.2 (2011/Jan), C#/.NET 4.0 (2010/Apr) and ASP-MVC 3 (2011/Jan).

Thank you for helping me at this critical architecture decision point.


UPDATE 2011/Mar/19 12:25 CDT:
I have since stumbled upon to a couple of resources that seem to be very helpful on the Scala/Lift side:
1. Free ebook (PDF and HTML) titled "Exploring Lift (Scala based web-framework)"
2. Wiki article by Lift's creator titled "View First"

The first chapter of the ebook has been very helpful. I am really liking how focused the Lift design principles and implementation are on "separation of concerns" (keeping code out of the display snippets) and on "convention over configuration".

And from what I have seen so far, while ASP-MVC 3 uses the same "strong guidelines", it still depends upon a layer where code and presentation are "hybridized". It's where neither the site designers nor the software engineers dare tread AFTER origination. IOW, after origination, there be maintenance dragons. I would love for someone to tell me I am wrong here.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

离鸿 2024-10-30 19:45:12

Scala / Lift 优点:

  • 可以使用庞大的开源解决方案/库,为 Web 和企业带来
  • 更多创新
  • 成本
  • (主观:更喜欢 Scala 语法和数据模型)

C# / ASP 优点:

  • 您是在工作中学习的,因此您对 .NET 技术更加熟悉。
  • 花更少的时间学习(从第一点开始),并在工作中获得支持。

对我来说 Scala / Lift 是更有效的解决方案,但我更熟悉 java/jvm 并且与 .NET 无关

Scala / Lift pros:

  • can use enormous open source solutions / libraries for web and enterprise
  • more innovate
  • cost reduction
  • (subjective: prefer Scala syntax and data model)

C# / ASP pros:

  • you are learning it at work, so you are more familiar in .NET technologies.
  • Spend less time for learning (since first point), and get support in job.

For me Scala / Lift is more effective solution, but I'm more familiar with java/jvm and not tied with .NET

海拔太高太耀眼 2024-10-30 19:45:12

我刚刚阅读了维基百科,c# 似乎涵盖了 scala 提供的大部分内容。

来自维基百科...
Scala 还提供了一个统一的类型系统(与 C# 相同,但与 Java 不同),其中所有类型(包括整数和布尔值等基本类型)都是 Any 类型子类的对象。 Scala 同样包含 C# 中存在但 Java 中不存在的许多其他功能(或非功能),包括运算符重载、可选参数、命名参数、原始字符串(Scala 中可能是多行)以及无检查异常。

scala 只提供了一些额外的东西,并且由于您有使用 .net 的经验,所以我会坚持使用 c#

I was just reading wikipedia and c# seems to cover most things scala is providing.

From wikipedia...
Scala also provides a unified type system (as in C#, but unlike in Java), where all types, including primitive types like integers and booleans, are objects that are subclasses of the type Any. Scala likewise contains a number of other features (or non-features) present in C# but not Java, including operator overloading, optional parameters, named parameters, raw strings (which may be multi-line in Scala), and no checked exceptions.

There is only a few extra things scala provides and since you have experience with .net I would just stick with c#

守望孤独 2024-10-30 19:45:12

Scala pro:

  • 支持函数式编程
  • 如果使用 jvm,则更好的 linux 支持(对于 C# 使用 mono,这不是
    由微软支持)

C# pro:

  • 工具/IDE 更加成熟/强大
  • 目前市场上有更多空缺职位

Scala pro:

  • Support functional programming
  • Better linux support if use jvm (for C# to use mono which is not
    supported by microsoft)

C# pro:

  • Tooling/IDE more mature/robust
  • More open jobs in market at this moment
浅忆 2024-10-30 19:45:12

请查看http://circumflex.ru/(英语)。
新的有吸引力的 Scala Web 框架。

不是 MVC,但对于类似桌面的应用程序来说非常酷:http://vaadin.com/ - 服务器端 RIA。您可以使用 Scala、Java 或任何其他 JVM 语言。只有一个 JAR。客户端无需插件。

Please look at http://circumflex.ru/ (english language).
New attractive Scala web framework.

Not MVC, but very cool for desktop-like applications: http://vaadin.com/ - server side RIA. You can use Scala, Java or any other JVM language. Just one JAR. No plugin required on client.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文