ASP.NET MVC vs Spring MVC

Java.Netasp.net MvcComparisonSpring Mvc

Java Problem Overview


Can anyone please make a comparison of ASP.NET MVC vs Spring MVC.

Which technology is better in performance, productivity, maintenance, features,...

Regards, sirmak

Java Solutions


Solution 1 - Java

It's hard to say which one is "better"....

First - there's the whole underlying "Java vs. .NET" argument - you can't really compare the frameworks ignoring this.

The whole history of web development in Java with "heavyweight" J2EE apps vs. "lightweight" Spring apps. That in Java there are a ton of web frameworks (MVC and not, open-source vs. Sun-developed) and that Spring MVC had a lot to be based on.

And on the ASP.NET MVC side - the whole history of ASP -> ASP.NET -> ASP.NET MVC. And the lack of widely-used non-Microsoft .NET frameworks - web or otherwise.

Now into the opinionated part...

I'm somewhat the opposite of @Luke101 as I've worked mostly with Spring MVC and very little with ASP.NET MVC.

I have to say I prefer MVC-style web development over component-based web development.

I have worked with JSF, which is similar to ASP.NET webforms. (I have to say I liked ASP.NET more than JSF - though this probably has more to do with the maturity of each framework when I used it, and tools available - I used JSF 1.0/1.1 and just Eclipse with no JSF specific support vs. ASP.NET 2.0/.NET 3.5 with Visual Studio 2008.)

As far as MVC frameworks I prefer Spring MVC - but that's entirely because I'm just more familiar with Java - language-wise and development-wise, as opposed to ASP.NET MVC / C# /.NET. Also, Spring MVC requires Spring, and I like to develop using Spring's whole IOC pattern and use things already integrated into Spring.

I haven't tried using Spring.NET and ASP.NET MVC - maybe this would be similar to Spring MVC / Spring / Java.

In the Spring.NET repo there are some examples of integrating Spring.NET into ASP.NET MVC version 3, version 4 and version 5.

Solution 2 - Java

I've tried both Spring and ASP.NET MVC frameworks. I found ASP.NET MVC easier to use, mainly because of significantly less configuration code (both xml and java/c#) in ASP.NET framework required to get things worked. In Spring you can get all the features ASP.NET MVC has by default, but be prepared to write many xml/java configuration code and maybe use some third party tools.

Among strong benefits of Spring are integrated IoC, ORM (mainly Hibernate for me) and transaction managment support.

Solution 3 - Java

This question has been around for a couple years, but I think you guys should stop thinking in terms of who is more familiar with asp or Java. In todays world it doesnt matter, I can hire a few code monkey's like us anywhere or I for example can write in both and anyone can pick up either in a matter of days, I think in a large scale scenario, what matters more is what is affordable, hosting on Windows/asp platform or Linux/Java, sure the easy of technology matters, but we arent comparing C programming to Java. I guess everyone agree they both are competing technologies. What do you rather invest into? Questions to that nature. For example I think hosting on a linux platform will be cheaper.

Solution 4 - Java

ASP.NET MVC is pretty young but very powerful and fast. I have rewritten all my web applications from webforms to asp.net MVC. I have seen a noticable difference in the cpu utilization and the amount of ram being used. I think if I built my projects from scratch in MVC it would take a little longer then in webforms.

I really can't comment on spring as I have never used it. But, here is an interesting discussion on the whole java and microsoft thing.

http://philip.greenspun.com/bboard/q-and-a-fetch-msg?msg_id=000tcP

Solution 5 - Java

Here's a PDF I found titled Comparision Between Spring and ASP.NET Frameworks, but I don't agree with some of the ASP.NET MVC comments like:

  • Offers only one view format (.aspx pages)
  • Tight coupling between URL and Class action name

It appears to be a quickly done slide deck for a university course, and not something by someone that has developed in each framework.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsirmakView Question on Stackoverflow
Solution 1 - JavaNateView Answer on Stackoverflow
Solution 2 - JavakilonetView Answer on Stackoverflow
Solution 3 - JavaninjaView Answer on Stackoverflow
Solution 4 - Javauser161433View Answer on Stackoverflow
Solution 5 - JavaKevin HakansonView Answer on Stackoverflow