Java or ASP.NET C# for web development

Despod

Junior Member
Feb 28, 2013
2
0
0
What technology is better for large scale web applications??
Java can run on every Server OS but asp.net can run only on Windows Server and Java is mostly common in enterprise world
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
"It depends"

PHP, Tomcat, IIS/ASP.NET, others like Ruby can all be used for large scale applications, especially in a cloud setting like Amazon where you can add as many server instances as you need.

Please provide some details on what you want to accomplish.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
What Dave said. Also, it strikes me as odd to compare ASP.NET with Java. C# is a direct comparison with Java. ASP.NET would compare directly with Java Server Pages (JSP). I'm picking nits, perhaps, but just to keep it clear. JSP seems to me to be less in use these days, and so the comparison that would be of more value in my opinion would be ASP.NET vs. php, vs. perl, vs. RoR, vs. Python + framework, etc.
 

beginner99

Diamond Member
Jun 2, 2009
5,313
1,752
136
What technology is better for large scale web applications??
Java can run on every Server OS but asp.net can run only on Windows Server and Java is mostly common in enterprise world

for the back-end I would use Java mainly because you won't have to run it on Windows (= you won't run it on windows) and IMHO it has a larger amount of freely available, very useful libraries than .net.

Large scale and PHP, ruby IMHO don't work so well. If it really is large scale.
 

Munashiimaru

Junior Member
Jan 14, 2013
23
0
0
I've done both and much prefer C# over Java. The language is a little better designed and the IDE is far better; libraries are fine either way, but I had an easier time implementing them with C#'s. Only reasons to go Java in my opinion is if you can't be stuck to windows or you already have a large skill base/old project.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I've done both and much prefer C# over Java. The language is a little better designed and the IDE is far better; libraries are fine either way, but I had an easier time implementing them with C#'s. Only reasons to go Java in my opinion is if you can't be stuck to windows or you already have a large skill base/old project.

As a language comparison I couldn't agree more. I've had to do a lot of Java lately for Android projects, and I am not a fan. The language just has a lot of warts that C# fixed, or at least improved.
 

beginner99

Diamond Member
Jun 2, 2009
5,313
1,752
136
I've done both and much prefer C# over Java. The language is a little better designed and the IDE is far better; libraries are fine either way, but I had an easier time implementing them with C#'s. Only reasons to go Java in my opinion is if you can't be stuck to windows or you already have a large skill base/old project.

I disagree and with libraries I was not talking about the default language stuff but 3rd party libraries. I'm pretty sure you will find a lot more stuff in Java preventing the obvious reinvent the wheel much more often. IDE? What do you don't like about netbeans? have you ever used it?

As a language comparison I couldn't agree more. I've had to do a lot of Java lately for Android projects, and I am not a fan. The language just has a lot of warts that C# fixed, or at least improved.

I admit I don't know that much about .net, visual studio and possible plugins so what follows might be wrong. But Netbeans + maven + mercurial is just great. Yeah, maven is something you need to learn but I believe it is extremely helpful especially for dependency management but also other things.

A ot of stuff that sucks in Java can easily be avoided. A nice example is project lombok that handels property access, equals and hashcode and toString(). Or what were you referring to?
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I disagree and with libraries I was not talking about the default language stuff but 3rd party libraries. I'm pretty sure you will find a lot more stuff in Java preventing the obvious reinvent the wheel much more often. IDE? What do you don't like about netbeans? have you ever used it?



I admit I don't know that much about .net, visual studio and possible plugins so what follows might be wrong. But Netbeans + maven + mercurial is just great. Yeah, maven is something you need to learn but I believe it is extremely helpful especially for dependency management but also other things.

A ot of stuff that sucks in Java can easily be avoided. A nice example is project lombok that handels property access, equals and hashcode and toString(). Or what were you referring to?

Java works, and I have no problems using it. I'm currently using the ADT + Eclipse and can get what I need done, so that's all that counts. On a purely language vs. language comparison, there is a lot about Java that I find incredibly clunky. No support for properties, weird semantics of "protected", more than one kind of exception, checked exceptions, etc. It's like working with a language from ten years ago. When I jokingly made that comment to another Android dev he responded "Because you are!"
 

douglasb

Diamond Member
Apr 11, 2005
3,157
0
76
What do you don't like about netbeans? have you ever used it?

This makes me think you've never used Visual Studio. Netbeans (and Eclipse, for that matter) is a pretty good IDE in its own right. But Visual Studio absolutely blows it out of the water, IMO (and I think that most professional developers will agree that the VS IDE is far better than any other IDE right now).

As far as "language vs. language", C# does feel a little more polished to me, but in all fairness, I haven't really used Java in about 2 years.
 

sze5003

Lifer
Aug 18, 2012
14,297
672
126
I use java every day and jsp, XHTML. I'm not a fan of it as my previous job I did c# a little and .net.

Our company is pretty large scale and everything runs on java and usually jsp. We use Rad ide and its slow and clunky but works.

Although if I were to go back to c# I would need more examples and time to get back in the groove of it. I find it way easier to build a web app in .net than in java. But then again most industries won't have you doing what you know or like so you have to do it their way at least where I work.
 

Leros

Lifer
Jul 11, 2004
21,867
7
81
IntelliJ is the best Java IDE out there IMO. It's not free, but it's too expensive either ($200 for a personal license). There is a free version which is great, but it doesn't support web stuff. It beats the pants off of Eclipse and I can't think of a single person who uses NetBeans.

Going back to what Markbnj said about ASP.Net. I wanted to expand a bit:
ASP.Net is to C#
as
JSP is to Java

Just in case that wasn't clear.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
This makes me think you've never used Visual Studio. Netbeans (and Eclipse, for that matter) is a pretty good IDE in its own right. But Visual Studio absolutely blows it out of the water, IMO (and I think that most professional developers will agree that the VS IDE is far better than any other IDE right now).

As far as "language vs. language", C# does feel a little more polished to me, but in all fairness, I haven't really used Java in about 2 years.

People who haven't used VS don't really get how polished and powerful it is. I haven't used anything even remotely as good in a long time.
 

beginner99

Diamond Member
Jun 2, 2009
5,313
1,752
136
This makes me think you've never used Visual Studio. Netbeans (and Eclipse, for that matter) is a pretty good IDE in its own right. But Visual Studio absolutely blows it out of the water, IMO (and I think that most professional developers will agree that the VS IDE is far better than any other IDE right now).

As far as "language vs. language", C# does feel a little more polished to me, but in all fairness, I haven't really used Java in about 2 years.

Since I'm not a millionaire i have only tried express versions of visual studio and no did not really see what makes it that much better than netbeans. If you like wizards and visual GUI editors ok, but for actual coding?
 

douglasb

Diamond Member
Apr 11, 2005
3,157
0
76
Since I'm not a millionaire i have only tried express versions of visual studio and no did not really see what makes it that much better than netbeans. If you like wizards and visual GUI editors ok, but for actual coding?

Trust me, I am far from a millionaire. If you are a student, you can get free Visual Studio from Dreamspark.com. Otherwise, get your company to pay for it. If you're a freelancer, you might have to weight the pros and cons of biting the bullet and paying for it. I think it would pay for itself in increased productivity, but that's just me.

There's a lot to be said for the visual GUI editor. Technologies like WPF make it really easy to create beautiful, responsive layouts for desktop applications. I haven't used Java in a while, but I remember that creating any kind of layout with Swing was a nightmare in comparison. The Microsoft product just looks more polished, and that counts for a lot in the professional world.

It's great for actual coding, also. I do a fair amount of ASP .NET MVC web apps, and there is no visual GUI editor for that. You basically have to hand-code the HTML, but the IDE is pretty good about closing your tags for you, autocompleting, giving you lists of all CSS properties for a tag, etc. Again, I haven't used Java in a while, so I don't know if Java IDEs have this as well.

Beyond coding, though, it integrates really well with TFS (which is garbage for source control, but a great ALM product IMO). If you do TDD, then the Microsoft testing suite is built-in, and you can create tests pretty quickly, integrate them into your build process, etc.
 

beginner99

Diamond Member
Jun 2, 2009
5,313
1,752
136
Trust me, I am far from a millionaire. If you are a student, you can get free Visual Studio from Dreamspark.com. Otherwise, get your company to pay for it. If you're a freelancer, you might have to weight the pros and cons of biting the bullet and paying for it. I think it would pay for itself in increased productivity, but that's just me.

There's a lot to be said for the visual GUI editor. Technologies like WPF make it really easy to create beautiful, responsive layouts for desktop applications. I haven't used Java in a while, but I remember that creating any kind of layout with Swing was a nightmare in comparison. The Microsoft product just looks more polished, and that counts for a lot in the professional world.

It's great for actual coding, also. I do a fair amount of ASP .NET MVC web apps, and there is no visual GUI editor for that. You basically have to hand-code the HTML, but the IDE is pretty good about closing your tags for you, autocompleting, giving you lists of all CSS properties for a tag, etc. Again, I haven't used Java in a while, so I don't know if Java IDEs have this as well.

Beyond coding, though, it integrates really well with TFS (which is garbage for source control, but a great ALM product IMO). If you do TDD, then the Microsoft testing suite is built-in, and you can create tests pretty quickly, integrate them into your build process, etc.

Yes, for Windows Desktop applications it's a no brainer, if you never ned to be cross plaform but all other stuff you listed? Works in netbeans: autocomplete of html,js, css.

TDD -> JUnit integration in netbeans.
integration of source control in netbeans (git, mercurail, svn,...)
build process: maven (or ant)
continous integration: jenkins/hudson
issue tracking integration: bugzilla or JIRA
any database wih jdbc driver
"web debug" for java and php
...

I use it for PHP too.
 

douglasb

Diamond Member
Apr 11, 2005
3,157
0
76
I think part of what makes Visual Studio seem so much more polished is that it does all of the above "fresh out of the box". To do the same in Netbeans, you need at least half a dozen plugins.

I'm not saying that Netbeans is bad; I'm just saying that Visual Studio is better.
 

beginner99

Diamond Member
Jun 2, 2009
5,313
1,752
136
I think part of what makes Visual Studio seem so much more polished is that it does all of the above "fresh out of the box". To do the same in Netbeans, you need at least half a dozen plugins.

I'm not saying that Netbeans is bad; I'm just saying that Visual Studio is better.

no plugins needed (netbeans != eclipse). Maven comes bundled. For source control you must install it and point netbeans to the executable but then it works.
 

douglasb

Diamond Member
Apr 11, 2005
3,157
0
76
I should probably also point out how much easier it is to deploy an ASP .Net web app than it is to deploy a Java web app using your IDE of choice.

This link is an example. It takes this guy 150+ steps and over 8 hours to do a "Hello World" web app in Java. That is probably a bit exaggerated, but the underlying point is true. It is much easier to get up and running with ASP .Net than it is with Java. The flexibility of Java also adds layers of complexity that most people just don't want to deal with when the .Net equivalent "just works" right out of the box.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
We use tomcat for some Amazon cloud server apps at work (not me, other developers), and we've made a fix and re-deployed (including spinning up the new server instances) in well under half an hour.

The first time you set up any build and deployment environment is going to take effort. I've spent plenty of time hunting for MS SDKs, downloading service packs, installing .NET updates, etc. Not to mention doing Google searches to find the KBs for MS APIs since MSDN's own search is so bad.

Also, MS has always had push-button wizards that will generate a useless toy app. It's when you try to extend it to do something that MS wasn't expecting that the fun begins.

Visual Studio has a great IDE and I use it daily for C++, but if you actually know what you're doing then tomcat / jsp is just as usable as C# / ASP.
 
Last edited:

douglasb

Diamond Member
Apr 11, 2005
3,157
0
76
We use tomcat for some Amazon cloud server apps at work (not me, other developers), and we've made a fix and re-deployed (including spinning up the new server instances) in well under half an hour.

The first time you set up any build and deployment environment is going to take effort. I've spent plenty of time hunting for MS SDKs, downloading service packs, installing .NET updates, etc. Not to mention doing Google searches to find the KBs for MS APIs since MSDN's own search is so bad.

Also, MS has always had push-button wizards that will generate a useless toy app. It's when you try to extend it to do something that MS wasn't expecting that the fun begins.

Visual Studio has a great IDE and I use it daily for C++, but if you actually know what you're doing then tomcat / jsp is just as usable as C# / ASP.

My point was that it takes MUCH more effort in Java to set up deployment. And your point about .NET updates and service packs is ridiculous. How often does Java require updates compared to .NET Framework? Way more, in my experience. Especially in the last few months, with all of the security vulnerabilities turning up in Java (which I won't really hold against Java, although they do seem to have more than their fair share of problems). Lately, I have installed at least one Java update per week, and it often seems like there is an update every other day. If that's not annoying enough, the updates also don't run silently in the background like .NET Framework's do, and I have to remember to uncheck the box to install Ask or whatever browser toolbar Java is trying to push on me. Totally unprofessional.

FWIW, with Visual Studio's Click Once deployment, I've made fixes and re-deployed in less than 15 seconds, literally. "Well under half an hour" is an unacceptable amount of downtime for many of our clients.

The "push-button wizards" to create what you call a "useless toy app" are better than having no wizards. In Java, if I want to create a "useless toy app", I better set aside at least 3 times as much time as I would expect to do it in C#.

I'll agree with you that MSDN search (and MSDN in general) is pretty bad. That being said, the Java API documentation doesn't even have a search function, or if it does, it's buried away somewhere that's difficult to find. The Java API is bloated enough as it is, and the online documentation looks like it was created in 1996. Google is your only search option.

I don't want to call anybody a "fanboy", but it seems like a lot of proponents of Java (as well as Linux and open-source software in general) have the attitude that their way is absolutely the only correct way, and anyone who even questions it is an idiot. It defies logic and all objective statistics. There is a clear and obvious reason (to most of us) why Java has been declining in popularity over the last decade, while C# has been growing in popularity. To ignore this means that you probably have some sort of vested interest in the success of Java.

Look, I like Java. In my early Computer Science classes, Java was the language of choice and it was the first language I actually liked using. The problems are 1) that the language has stagnated quite a bit over the last few years, and 2) the IDE is nowhere near as good. You can't honestly say that a developer with equal knowledge of both languages will be even close to as productive when using Java. The tools available for each language are worlds apart.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
The decline in Java use is for desktop apps not Tomcat / JSP, and the security updates have also been to fix desktop exploits. If someone has root access to your server then they don't need to hack Java.

I agree Java is a bad choice for desktop apps. I'll also agree that setting up a Tomcat / JSP development stack has a much higher initial setup time than just running the Visual Studio install.

That doesn't matter for daily use though, once you're past the one-time setup.
 

Net

Golden Member
Aug 30, 2003
1,592
2
81
I'll throw another into the mix. Take a look at Node.js
I made a REST server in it. It's really nice to work with.
 

slugg

Diamond Member
Feb 17, 2002
4,723
80
91
For most typical enterprise requirements, Java/SE/EE is pretty much equivalent to C#/.NET/ASP.NET for all practical purposes. So what I'm saying is that you can do the same things in both stacks.

But it's HOW you do those things that makes a difference. Say you wanted to pick a DAL/ORM. Your main choice for Java is Hibernate, which is quite good. A lot of Java lovers ported it to .NET, called NHibernate. Then Microsoft really polished up Entity Framework. It's very nicely integrated with Visual Studio, so development is super duper easy. Using it is super duper easy. Start with code, a db schema, or diagrams/design first. Whatever you want. This is where Microsoft really excels; they make their developer tools as user-friendly to developers as Apple makes their end-user software for end-users.

Entity Framework is just one example in particular, but you get the point. Overall, C# and the whole .NET platform has been polished and improved one step ahead of Java. Last time I checked, Java still doesn't have class properties, when even the crappy Objective-C does. As far as IDE's go, nothing touches Visual Studio. And if you claim that you can't afford the real thing (uhh, $800/year for MSDN?), then the 2012 Express editions are almost fully featured, including Team Foundation Server support, among other things that weren't originally supported in the past.

I can guarantee you that task for task, I can shorten an 8 hour day to 7 or less if I get to use Visual Studio over other IDE's. I feel like I get pretty much double the throughput versus Xcode, and probably 1.5x of Eclipse. Spend more time developing and less time fiddling around with the stupid IDE.

By the way, .NET applications can run under Mono in *nix environments. As long as you don't need the latest .NET version, it's stable and quick.

But what if Java was fully supported, to the same depth as C#, in Visual Studio? Well then, I'd say we have a tie. So what I'm trying to say is that both technologies are the "same shit, different pile." One has a really nice pooper scooper, but the other one requires you to get your hands dirty.

I use both Java and C#/.NET. ;)

No comment (due to my lack of knowledge/experience) on: Node.js, Ruby

Quick opinion about PHP: good for quick and dirty things (proof of concept, etc). Bad for production code in enterprise.