3

Last 8 months I have been working in ASP.NET MVC framework but now I have to switch to Java. So, I wonder what is Java's framework that is the most similar to ASP.NET MVC. I would like to stick to MVC pattern but most of my colleagues work in JSF, which doesn't seem like (real) MVC. Which one would you suggest?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
ilija veselica
  • 9,414
  • 39
  • 93
  • 147
  • 1
    Related question: [Java alternative to ASP.NET MVC](http://stackoverflow.com/questions/2556553/what-is-the-main-stream-java-alternative-to-asp-net-php/2556601#2556601). Please elaborate why JSF doesn't seem like real MVC. Your *actual* problem/answer is in there. @abarr: Struts is a very vintage framework. Not really worth the effort nowadays IMO. By the way, its inventor/creator Ed Burns left Apache and joined Sun about 7 years ago to create JSF. It's in essence a further evolution of Struts. – BalusC Oct 11 '10 at 13:23
  • 1
    JSF, as I heard, is similar to ASP.NET Webforms (even has something like the VIEWSTATE - yuck..) – Andrei Rînea Oct 11 '10 at 14:24

5 Answers5

2

Spring MVC have Model, View, and controller exactly like ASP.net MVC, you can use the Annotation for post or get data as you can do in ASP.net MVC

Alaa Abuzaghleh
  • 1,023
  • 6
  • 11
2

ile,

unfortunately, i think you'll find that there's a huge amount of collaterol in JSF with your collegues. in my opinion, you'd be better to start off with JSF as you'll have a lot of knowledge that you can feed off of initially there. then you could investigate the alternatives and try to get some peer buy-in to some of your initiatives.

see: https://gmvc.dev.java.net/

so for now, suck and see i guess.

[edit] - spring seems popular as well http://en.wikipedia.org/wiki/Spring_Framework_%28Java%29

jim tollan
  • 22,305
  • 4
  • 49
  • 63
2

Spring framework is really easy to grasp. I did the change the other way round and the concepts where similar. I suggest you get the book Spring in action, because it explains the concepts in an easy to follow way.

Carles Company
  • 7,118
  • 5
  • 49
  • 75
2

I'd say you stick with ASP.NET MVC because there is lot of investment going around it by Microsoft learning from previous technologies. Imagine they're now at version 3 in just 2 years span while JSF takes about 5yrs before another major release comes out.

And as a developer, you'll find yourself hanging with JSF because there is not too much people blogging about it. If there is, it would be old stuff already! Although, I have to admit I learned a lot with BalusC blog plus 2 JSF books. ASP.MVC had tons of books out.

But, ASP.NET MVC fails to compare with JSF in terms of FREE AJAX frameworks like JSF have primefaces and openfaces.

nellbryant
  • 3,109
  • 4
  • 20
  • 16
1

Java Server Faces (JSF) is a java framework that looks like ASP.net MVC Spring also is another alternative of java MVC