Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to learn JSP/MVC, with previous experience in ASP.Net MVC?

I just started to get into the door of the Java world. I have been programming in C# for the last 3 years, and been doing about 3 months of ASP.Net MVC. I absolutely love it, but the fact that I need Windows for it to run the latest and greatest libraries is a bit of a turn down... Plus I think learning another language helps with understanding concepts, since you get a comparison.

I want to learn JSP/MVC. I was wondering if it's similar to ASP.Net MVC, and if I can write JSP/MVC web apps without using another framework (like Spring) to get started.

Also, which is the better way to learn JSP/MVC from my C# background?

Any suggestions are welcome. Thanks in advance!

like image 849
Ke Sun Avatar asked Jan 22 '10 15:01

Ke Sun


People also ask

How is JSP used in the MVC model?

In this article, we have learnt about the MVC i.e. Model View Controller architecture. JSP plays the role of presentation of the data and controller. It is an interface between model and view while model connects both to the controller as well as the database. Main business logic is present in the model layer.

Is ASP.NET MVC hard to learn?

It's really difficult to try and learn an entirely new language/framework under pressure. If you're required to deliver working software for your day job, trying to learn ASP.NET Core at the same time might be heaping too much pressure on yourself.


2 Answers

JSP is a view technology, which is best to be compared with "classic ASP". The Sun Java counterpart of Microsoft ASP.NET MVC is actually JavaServer Faces (JSF).

For a short and quick introduction of JSP/Servlet/JSF, read this answer. To learn more about JSF, go through Sun Java EE 6 tutorial part II chapters 4-9.

For JSF there's by the way another view technology available: Facelets. This is way much better than JSP. If you can, I recommend to forget about JSP for this bit and go ahead with Facelets.

like image 154
BalusC Avatar answered Sep 22 '22 00:09

BalusC


To supplement the answer above, I have dug up this fantastic article on getting started in JSP:

http://articles.sitepoint.com/article/java-6-steps-mvc-web-apps

It goes right into the basics of servlets, jsp and then mvc techniques, none of the mumbo jumbo in other MVC tutorials out there for JSP. Very down to earth. Wish the guy who wrote it would write a book on this topic...

like image 38
Ke Sun Avatar answered Sep 21 '22 00:09

Ke Sun