This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Why and How Java is better than C#?

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

sasank manohar wrote:But we have netbeans,eclipse are free of cost. But I suppose both are not as effective as vs IDE . you can download .NET FROM MICROSOFT WEBSITE and start programming using notepad. Nobody will say anything to you. I don't know Why oracle-Sun hasn't come up with Such a beautiful IDE...what's the problem ? Is there a rule that free tag should make the IDE look inferior.



I agree with your point that Java IDEs fails with performance miserably with respect to Visual Studio but feature wise i dis agree.
you have hundreds of the plugins available for java IDEs (specially Eclipse) which can do wonders with customized requirements which I think not possible with .net studio

the problem of performance is there because
All Java IDEs are written in Java.
Java GUI one of the worst GUI any prog lang can ever support.. but still this has been very much improved over the years from the initial versions.....

if some one comes with Java IDE in non Java lang, i am sure it would rock...
 
Marshal
Posts: 69805
277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

K Abhijit wrote: . . . the problem of performance is there because
All Java IDEs are written in Java. . . .

Really?

Does Java really run more slowly than C#?
There are Java IDEs (eg JCreator) which are not written in Java.
 
K Abhijit
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Does Java really run more slowly than C#?. Really?


well as per as GUI is concern , yes Java GUI definitely is more sluggish than C#

But overall, this would be a difficult statement to make that Java run more slowly that C#

more can be seen on http://forums.sun.com/thread.jspa?threadID=361311
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

K Abhijit wrote:well as per as GUI is concern , yes Java GUI definitely is more sluggish than C#


Rubbish. Well-written Swing applications are plenty fast.
 
K Abhijit
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:
There are Java IDEs (eg JCreator) which are not written in Java.



well, i was not aware of this... thanks for info... I was referring mainly Eclipse/Jdeveloper/ NetBeans /IntelliJ ....
 
author and jackaroo
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

sasank manohar wrote:I think .NET Is also open source.


Looking at the definition of open source, if you were right I should be able to get a copy of the .NET source code without purchasing anything from Microsoft. I don't believe that is that case.
 
K Abhijit
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

David Newton wrote:Rubbish. Well-written Swing applications are plenty fast.


yes, as I said earlier now they are pretty fast with compare to their old versions but still same /similar code (well-written optimized for .net) would run faster on .net platform..




 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

yes, as I said earlier now they are pretty fast with compare to their old versions but still same /similar code (well-written optimized for .net) would run faster on .net platform.


Prove it.
 
K Abhijit
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okies... will do that... gimme some time
 
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
people here are mentioning so many loop holes of .net and C#. Then how come microsoft is still able to give the best competition with its industry rivalries. what's the secret behind it?
 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

K Abhijit wrote:

David Newton wrote:Rubbish. Well-written Swing applications are plenty fast.


yes, as I said earlier now they are pretty fast with compare to their old versions but still same /similar code (well-written optimized for .net) would run faster on .net platform..






.NET is known to have some performance issues in the past but almost all of which have been fixed some by introducing optimization features in the OS s like windows 7. But even so, Java especially swing does have some very lightweight controls, which are really good and fast.

Eitherways, most of the performance issues are more attributed to the user and design than the language. ISaying Java GUI is slow is like saying internet works faster on an Intel I5 than on a celeron because the image rendering is faster.

On a personal note. I really dont like the Java gui too much.. feel its kinda old.... but again thats me.... Also, new controls can go around it. But their default controls seem a lil old fashioned to me.... like the JButton and Jframe... But again.... since most of the customers are enterprises who dont care too much of the design........

furthermore, GUI could happen to be just a small part of the whole application.
 
Gaurav Raje
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

sasank manohar wrote:people here are mentioning so many loop holes of .net and C#. Then how come microsoft is still able to give the best competition with its industry rivalries. what's the secret behind it?


C# is still a powerful language. some of the loopholes are not applicable for some type of programs... Most of the loopholes are specific in very specific contexts. Most of the other advantages are waay better to get down by the loopholes.

Furthermore, good design can help in avoiding most of these. Knowing a particular loophole is enough to avoid it in many cases
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Shouldn't this thread have retired by now? !!
There is no way you can possibly think that some technology is better than other, at least not when they are still co-existing, and competing well for that matter. Each has its own pros and cons. I have even heard of some projects using both technologies simultaneously, and why shouldn't they. As long as something can be done better in one technology than the other, there will always be scope for improvement as we could see from there lifeline.


P.S.: The page number link is not working with me, I have to use the arrow to navigate to the last page of the post. Any reason for this?
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ninad Kuchekar wrote:There is no way you can possibly think that some technology is better than other, at least not when they are still co-existing


Rubbish. Just because two technologies co-exist doesn't mean one isn't better than the other.

P.S.: The page number link is not working with me, I have to use the arrow to navigate to the last page of the post. Any reason for this?


Yes; a bug.
 
Campbell Ritchie
Marshal
Posts: 69805
277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ninad Kuchekar wrote:
Shouldn't this thread have retired by now? . . .

Why? If people are still writing on it, why can't it maintain its existence. It is hardly using lots of memory.

I think there is an error in the page links. Can't remember the details.
 
Ninad Kuchekar
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

"Campbell Ritchie" wrote: Why? If people are still writing on it, why can't it maintain its existence. It is hardly using lots of memory.


Just reading through it gave a feeling that there could be no one(or for that matter many) conclusion over this debate, although enlightening!


"David Newton" wrote: Rubbish. Just because two technologies co-exist doesn't mean one isn't better than the other.


That could have been a perfect punch line for "Pride and Prejudice"....I think you missed to quote my whole sentence...let me do that again...

"Ninad Kuchekar" wrote: ....., at least not when they are still co-existing, and competing well for that matter. .......
.... As long as something can be done better in one technology than the other, there will always be scope for improvement as we could see from there lifeline.



...I rest my case.
 
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow. What a long thread I see a lot of C# bashing here as expected in a Java forum If you look at C# as a language more objectively, the language itself has evolved into a much better language, e.g. closures, delegate, properties, LINQ, etc. whereas Java as a language has pretty much stagnant.
 
sasank manohar
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with freddy and i also want to put some light on the "garbage collection" of .NET , which has gen 0,1 and 2 concept . I am not saying this is better than java GC because i am not much knowledgeable about java GC. all i know about java GC is that it identifies null references and removes .

.NET garbage collection

Also i like msdn, it not only gives API but also gives Excellent examples. In this case i am sure our java 6 api , simply giving the class names doesn't go well with newbies.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Freddy Wong wrote:Wow. What a long thread I see a lot of C# bashing here as expected in a Java forum If you look at C# as a language more objectively, the language itself has evolved into a much better language, e.g. closures, delegate, properties, LINQ, etc. whereas Java as a language has pretty much stagnant.


I haven't really seen anyone bash C#-the-language at all, if anything I've said, and seen people say, that it's a stronger language than Java.

*Microsoft* bashing is a different issue.
 
K Abhijit
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@David Newton

Completely agree with you
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<rant>
I think any language that was designed by committee is a bad idea. Java is such a language..

Its the one I can think of that says you can leave a class variable null but a local variable must be declared.. why? Because one dood designed how class members are to be implemented and others decided how method local variables are to be implement.. It's the only reason I can see.

the other reason to make a language ridiculously convoluted and complicated is profit.. make a language hard to learn and very much in demand so that people will pay money to take classes and buy books and take stupid cert tests to learn it so that they can make money after giving money to us.

PERL is perfect for a web backend and javascript is great for the front end... Java as the best for webservice is a ridiculous statement, especially when most apps I've seen take up 500 MB or more just to start up.. Java is memory hog heaven. This combo is 1) free 2) not beholden to any coporate profit nor coporation 3) flexible, easy to learn and use (in fact php and groovy score higher in this department than PERL probably)

also any language that throws a compiler error for the the following code:



is absolutely retarded and probably should be avoided anyway.

I can understand if I said int why it might complain or even any other number type but a byte is a byte is a byte - that means , Sun and Oracle people, that it's just 8 damn bits and nothing else.. it's not negative... it's not positive... it's 8 stupid bits... So instead of make every damn expression an int.. maybe make octals and hexes... bytes.. and words... and what they were meant to be...

</rant>



 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

See Furst wrote:[...]make a language hard to learn


Java isn't particularly hard to learn, and relative to Perl, I'd think it debatable which is easier, depending on the problem space.

PERL is perfect for a web backend


Ew. Perl is *far* from perfect for a web back end, and as a language, leaves much to be desired. It has its place, but IMO that isn't it. Now, if you want to discuss things like HOP, we can begin having a reasonable discussion about Perl--otherwise you haven't brought much to the table here.

Java as the best for webservice is a ridiculous statement, especially when most apps I've seen take up 500 MB or more just to start up..


Depends on your needs, doesn't it? A lot of stuff I've worked on would be really difficult in other environments. (*Really* difficult.) Now that JVM languages are catching up speed-wise I can use way better languages, but the environment itself... tough to beat.

You're going to have to rant better than that: while this isn't LtU or anything, but still.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For me, Java is better than C# for one reason. My workplace is using Java, and AFAIK, has no plans to use C#.

I don't really know enough about C# to compare the languages objectively, but I like the fact that Java isn't from Microsoft. The language has its problems, but so does any other language I know of.
 
See Furst
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Java isn't particularly hard to learn, and relative to Perl, I'd think it debatable which is easier, depending on the problem space.


If you have a solid grounding in OOD, it makes it easier. Many people I know who grew up with more functional languages including C peruse Java, barf and leave. Never to touch the language again, and try instead to see if Scala or Jython or something like that can get done what they need.


Ew. Perl is *far* from perfect for a web back end, and as a language, leaves much to be desired. It has its place, but IMO that isn't it. Now, if you want to discuss things like HOP, we can begin having a reasonable discussion about Perl--



You forget that perl was once the glue of the internet, complete with cold fusion and jsp style markup language like HTML::Mason and TemplateToolkit. On a server with mod_perl or fastCGI you can fly. I've seen it, done it and usually for far far far less money than Java requries (Java = bloatware = more hardware = more money is the logic I'm using here) Most people who dis Perl are usually people who never used it or don't really understand it. Yes it lost popularity, but I believe that was mostly due to floundering when it came to perl 6... development stagnated, and because there was no Sun or Oracle to back it up.. it is the real open source about as open source as GNU tools itself.


Depends on your needs, doesn't it? A lot of stuff I've worked on would be really difficult in other environments. (*Really* difficult.) Now that JVM languages are catching up speed-wise I can use way better languages, but the environment itself... tough to beat.



If you have the server power to run it yes. I work for a Java house and well.. we have at least 2 datacenters running some very large clusters in order to get the site to do what it needs with Java. I used to believe that Perl didn't have as many capabilities that other technologies did, however the more I looked, the more I realized that I was wrong. Perl's tech isn't going to jump out at you and say "hey I'm here" like other techs. Its because other techs like Java depend on profit, their goal is profit. Oracle bought Java for profit, their goal is profit... Perl is just about the tech... it's goal is to make it run and run well. Sometimes it succeeds and sometimes it fails.

otherwise you haven't brought much to the table here.



I have, you just didn't like how it tasted and to that I say "you and your horse!"



 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

See Furst wrote:If you have a solid grounding in OOD


Both Scala and Jython are OO, and moreso than Java. Scala's syntax and type system are more complex than Java--moving to Scala is *substantially* more difficult for a C/C++ programmer. *Substantially*. That's why Java's syntax is what it is--to make moving from C++ *easier*.

[...] more functional languages including C


You must mean procedural, because C is not a functional language by any definition I'm aware of.

You forget that perl was once the glue of the internet


No, I actually don't.

Most people who dis Perl are usually people who never used it or don't really understand it.


Lol.

I believe that was mostly due to floundering when it came to perl 6...


No, Perl 6's issues weren't why people (largely) moved to other solutions--it was because people liked the other solutions better than Perl for this purpose.

I have, you just didn't like how it tasted and to that I say "you and your horse!"


No, I just think you're wrong. Rants have to have content. Mostly you said "Java is bloated" and "Perl is cheap". Not part of a discussion about languages, and doesn't really bring anything interesting to the table.
 
See Furst
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

David Newton wrote:

See Furst wrote:If you have a solid grounding in OOD


Both Scala and Jython are OO, and moreso than Java. Scala's syntax and type system are more complex than Java--moving to Scala is *substantially* more difficult for a C/C++ programmer. *Substantially*. That's why Java's syntax is what it is--to make moving from C++ *easier*.

[...] more functional languages including C


You must mean procedural, because C is not a functional language by any definition I'm aware of.

You forget that perl was once the glue of the internet


No, I actually don't.

Most people who dis Perl are usually people who never used it or don't really understand it.


Lol.

I believe that was mostly due to floundering when it came to perl 6...


No, Perl 6's issues weren't why people (largely) moved to other solutions--it was because people liked the other solutions better than Perl for this purpose.

I have, you just didn't like how it tasted and to that I say "you and your horse!"


No, I just think you're wrong. Rants have to have content. Mostly you said "Java is bloated" and "Perl is cheap". Not part of a discussion about languages, and doesn't really bring anything interesting to the table.



And again that's your opinion based on what you think it was I was trying to do... so we'll have to agree to disagree on that.

As to why perl 6 died I'm not so sure that the tools we're inadequate. I just think there were more resources available. What I mean by that is, if you got stuck or needed expert advice, you could pay for it and get plenty of it from the guys who built the technology. Perl unfortunately lacks this. I find Java's syntax very strict and time consuming build with and to get things done with while I find perl's and Scala's syntax not so. . and we can go on for days about the ROI on that.

However in the end I must side with Mr Peak, Java is better because my workplace is using it and I don't poop where I eat.



 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

See Furst wrote:I find Java's syntax very strict and time consuming build with and to get things done with while I find perl's and Scala's syntax not so. .


Of course it is--but you were originally talking about C programmers moving to Scala, which is essentially scaling several peaks simultaneously. You're not going to convince many people (if any) that Scala's syntax is easier to grok than Java's, though.
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I work for one of worlds biggest publishing compnay, they choosed Java for all Back end work and C# & ASP.NET for front end work. But after working of one year on this project, finally a collective decission ( Technical Architect, .NET & .JAV DEVELOPERS) NO TO JAVA AND YES TO C#.

Doing thing in c# is very quick easy and just done, in java it took ages to figure out things around.

Just imagine " configure HIBERNATE INTO WEBLOGICE DEPLOYED WEBSERVICES" - IT TOOK COUPLE OF DAYS FOR US TO FIND A solutions.

No one in weblogic were able to answer to our questions, finally gone through some blogs and some one suggested we need to drop the jar files not only in root folder on of the project but also in WEBLOGIC home folder ((( what a night mare for all of us.

Finally ....after 1yrs of the project..., all java developers starging working c# development and all going VERY VERY HAPPY.

THOUGH i AM STILL WORKING ON JAVA AND MY VOTE FOR JAVA ONLY.javascript:emoticon('');

CHEERS, VJ
 
Campbell Ritchie
Marshal
Posts: 69805
277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please avoid LOTS OF UPPERCASE writing.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Vijay Gadde wrote:Doing thing in c# is very quick easy and just done, in java it took ages to figure out things around.


Also not a language issue.

Just imagine " configure HIBERNATE INTO WEBLOGICE DEPLOYED WEBSERVICES" - IT TOOK COUPLE OF DAYS FOR US TO FIND A solutions.


And "configuring NHibernate into IIS and deploy as a webservice" took less than a couple of days?
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Jimmy

Can COBOL be used for web applications development ..?


Regards,

Aalok
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Aalok Singh wrote:Can COBOL be used for web applications development ..?


Of course.
 
Ranch Hand
Posts: 331
Python Ruby Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"IT TOOK COUPLE OF DAYS FOR US TO FIND A solutions"
Try porting your current solution to any other .NET platform like mono.
Though I agree that java in general tends to be more difficult, but it gives you freedom from a particular server/IDE/platform/OS. Also, all the issues like logging, building,etc have to be taken care of by yourself instead of some fancy tool. In longer run, this would give you better control as a developer.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all:
i am a chinese,there is a ppt that shows something about java and c# come from
a Chinese programmer,I think it's very interesting.。

http://www.slideshare.net/jeffz/why-java-sucks-and-c-rocks-final

excuse me ,My English is not very well。
thanks!

 
Greenhorn
Posts: 24
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question: Why and How Java is better than C#?

Answer: Java is the #1 language on the planet, C#is the 6th. End of. http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
 
Baichuan Huang
Greenhorn
Posts: 19
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i dont think java is better than c#,because Each language has its own platform for adaptation
such as java is more applicable to b/s,and c# is more applicable to c/s. so i cant say which language is better than other language.
thanks!
 
Ranch Hand
Posts: 73
BSD C++ Fedora
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well said Baichuan Huang,
please check this link for more details....... Java Vs C#
 
Baichuan Huang
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
many people think java is better than c#,just because:
1.cross-platform(windows,linux...)
2.open source
3.more secure

Clear,The above three points is ok,but it cant make me think java is better than c#.c# also can list some points shows c# is better than java.
thanks!
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic