Scala (2.8)/Lift (2.2) vs. C# (4.0)/ASP.NET-MVC 3
Asked Answered
N

4

24

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.

Needle answered 18/3, 2011 at 17:49 Comment(5)
My friend just sent me this link which seems to exclusively suggest advantages on the Scala/Lift side: scala-programming-language.1934581.n4.nabble.com/…Needle
Preference and target, mostly. Heck, one could use Java/Stuts or whatnot. I personally prefer the Scala programming language although the integrated aspects of the Microsoft solution can be very appealing. Of course the Microsoft solution requires running on Microsoft software and that can get more costly, etc. Lift is different than ASP.NET in that it's continuation-based vs. (manually) restore-control-state based. That being said, I use C#3/ASP.NET for work -- work revolves around SharePoint -- and it's still productive and not entirely frustrating (i.e. it's a far cry from PHP) ;-)Flemish
@pst just talking about ASP.net is a bit ambiguous. Do you mean webforms or MVC? I'm not aware of any "restore-control-state" stuff in MVC. Could you elaborate what you mean by that?Basrelief
@CodeInChaos Yes, ASP.NET/MVC (&AJAX) -- after every page load (this is a little lie) the control state must be restored to be able to "resume" the context of the session. That is, the first step is to put back the state (control hierarchy) into the way in which it was found before through hydration (various ways of managing state here). If there was a set of check-boxes created prior to the postback they must be restored after the postback to be used, etc -- mismatches cause errors. Most of this is well-automated (esp. with ASCX), thankfully, but the control-centric model differs from Lift.Flemish
@pst Your description of restoring the control state is very accurate when it comes to ASP.NET Webforms, but does not happen at all when doing ASP.NET MVC. In ASP.NET MVC you can have a view model populated and passed in as a parameter to an action you are calling, but that has nothing to do with the state of controls on the page.Jura
G
8

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

Guntar answered 21/3, 2011 at 11:32 Comment(0)
N
2

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#

Neoteny answered 23/8, 2012 at 7:18 Comment(2)
A few? Scala's type system blows C#'s out of the water in more than a few ways.Manducate
Along with pattern matching, better functional support, etc.. Btw, I use C# at work and I know it has its benefits too.Manducate
L
1

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
Larson answered 8/9, 2011 at 0:46 Comment(6)
C# supports functional programming too.Transferor
C# supports functional progranning tooBoehmenism
C# supports functional progranning too.Glycine
C# supports functional progranning too.Maury
C# supports functional progranning too.Cementum
C# supports functional progranning too.Bechler
F
0

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.

Fredenburg answered 30/11, 2011 at 15:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.