Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moving from ASP.Net to Java for web development

My job has required me to change technologies quite radically. I am fine with this, I am excited to be learning new stuff; but I feel like I am very much a newbie in Java, especially the web development side in which I have zero experience.

Just a little background, I would usually create websites using ASP MVC 3, Razor view engine, C# and on the backend everything will be nicely TDD'd and using EF for data access. With .NET in general I have been doing it for around 4 years.

Now I appreciate that for my purposes I wont find it difficult translating my skills from C# to Java syntactically, it's just everything around it, the frameworks, webservers and stuff which is going to confuse me in the short term. Even using a new IDE will be frustrating at first.

Can anyone offer any advice? I know we want to be using Spring MVC, presumably with Tomcat. Do I need to setup and install Tomcat for dev purposes? Or does eclipse/netbeans (which should I use?!) automagically do that for you, in a similar way that Visual Studio does by making a local IIS webserver to use.

For TDD, is there a good plugin for eclipse/netbeans anyone would recommend so i can just right click a class file and do "run tests"

Any general helpful links, getting started tutorials?

Cheers

like image 411
Chris James Avatar asked Mar 02 '11 10:03

Chris James


People also ask

Is it good to switch from .NET to Java?

NET Developer switching to the Java programming language, it is certainly possible. In fact, it is pretty straightforward, since both are Object Oriented languages with similar syntax and features. The only aspect you will miss, is Visual Studio IDE because it is certainly the best IDE out there.

How do I migrate from .NET to Java?

While Microsoft already has had a tool to migrate Java code to the company's . Net application development platform, Stryon is turning the tables. Stryon's iNet product migrates applications and Web services from Visual Basic . Net, C#, and J# to Java without the need to rewrite the code, according to Stryon.

Is ASP.NET better than Java?

Both technologies have similarities and differences. However, they are especially good for complex projects. While Java has a bigger community, more documentation, a bigger talent pool, and more career opportunities, . NET shows better performance and tools for complex user interfaces.

Which is better for Web development Java or C#?

C# is best suitable for Windows applications and video game development. It is often used for web applications and enterprise software too. While Java performs great for web apps and Android apps but also is known for its application in scientific and other high precision software.


1 Answers

I don't recommend to start with Spring MVC. You should start a far lower level to keep it simple at the start.

I recommend to install an Eclipse IDE version for Java EE Developers. This version contains all the stuff you need except of an application server.

So you have to install a Tomcat yourself.

In Eclipse you can now start with a "new Project" and choose Dynamic Web Project that does all you need for a clean new Web Application.

Out of Eclipse you can then rightclick the project and click Run on Server, which opens a qizard where you configure the things for your Tomcat installation.

This is what the setup is about. And you should use Eclipse, because Eclipse is a standard editor in a professional environment.

What you now should learn or where you should start is first of all learning java if you not already did. And then go on with: Servlet API and Java Server Pages (JSP) API.

You should get you some books on that to get your head around it.

After that it will be much easier to understand what Spring MVC is, what it does and how it works.

Starting with Spring MVC in this case would be like building a house starting with the roof. I think this would fail.

Edit: Just to complete this, I found this link here, which seems to me like a good first starting point.

Edit: Another last thing: the standard library for TDD in Java is called JUnit and there is a nice plugin for Eclipse to use it.

like image 62
Chris Avatar answered Sep 21 '22 10:09

Chris