Coffeehouse Thread

91 posts

.Net(C#) vs Java

Back to Forum: Coffeehouse
  • User profile image
    NETVOR

    Can anyone please tell me the differences between C# on .Net platform and Java on JVM platform? I just started to learn C# and realized that syntax is almost the same, class structure too (almost), both languages compiles into some sort of semi-code, which is then interpreted......

    So.... the question of the day is: Why should I take care about C# and .Net, when multi-platform lanuguage already exist and I'm satisfied with it?




  • User profile image
    W3bbo

    I've been disenchanted by Java Applets over t'intarweb....

    Remind me again... is the "new" Java JIT-Compiled just DotNet? Or is it still interpreted a la JavaScript?

  • User profile image
    gman

    Come on beer28, here you go again, always on these forums bashing MS and C#. Why are you here exactly? Some kind of dimented astroturfing nutcase with too much free time? Here's a bulletin for you : You aren't helping your cause any.

    Beer28 wrote:
    Here is one major difference, click here and scroll down to the part where it says you can download the source code


    I guess you never heard of Rotor or Mono.. the C# compiler is free... The SDKs are free. what was your point again?

    As a matter of fact, I take you one further. Microsoft has submitted C# to the ECMA for standardization. Has Sun done that with Java? Nope. Ya know why? Cause Sun wants to control Java and everything about it. Which company is more open?

    Beer28 wrote:
    The other major difference, is that you can code anything from a console chat server application to a full blown 3d video game and it will work exactly the same on windows, linux and macintosh. A 3d modeler, a media player, a hello world application. With Java, it's all good.


    Blah blah, yeah and it looks and acts like total crap just the same on all those platforms. And it also runs slow as a dog. Who wants to write apps for Linux anyway? For all 3 people who run it?

    Beer28 wrote:
    Another major difference is that java has been extended for Sun's new 3d X server desktop platform called project looking glass


    Huh, nice vaporware, I think this should be better than Duke Nukem Forever.

    Beer28 wrote:
    If you have a linux compatible desktop you can use java to interface it


    Huh, I thought you said it runs on any platform, or are you just repeating yourself again, I notice that trolls do that alot.

    Beer28 wrote:
    Another plus with java, is that possibly the very best IDE to code java is completely free in netbeans


    Hahah, now you are just being silly, Java IDE's are pathetic... And I guess you never heard of the Visual Studio 2005 Express products... compeletely FREE.

    Beer28 wrote:
    Blah blah blah.. SNIP


    I see you still have that ridiculous penguin even though I told you to dump it. You get NO credibility with that crazy avatar man.

  • User profile image
    gman

    Beer28 wrote:
    gman, way to turn this into a flame war, btw :/


    Anytime!

  • User profile image
    NETVOR

    gman: nice work.... but it can be shorter next time.....
    1. The SDKs are free
             So C# core code is open source?

    2. Who wants to write apps for Linux anyway?
             We do. Our target custostomer is IT Developer, so we try to cover as most of platforms as possible...

    3. or are you just repeating yourself again, I notice that trolls do that alot.
            that said MUCH about you..... Smiley

           

  • User profile image
    Sampy

    .Net isn't free as in freedom it's free as in beer. But you can see code that is very very similar at http://www.microsoft.com/resources/sharedsource/Licensing/CSharp_JScript_CLI.mspx. It also runs on BSD and MacOS.

    One thing that I think .Net does a lot better than java is generics. Have you looked at the "type erasure" method that java uses to implement your generics? It's basically just doing all the casting for you while .Net provides real runtime support for them. No casting under the hood here.

  • User profile image
    Sven Groot

    Rotor supports Windows, MacOS and FreeBSD. Not Linux though. I think if you Google around you should be able to find some Linux ports of Rotor though.

  • User profile image
    wkempf

    gman wrote:

    Beer28 wrote:Here is one major difference, click here and scroll down to the part where it says you can download the source code


    I guess you never heard of Rotor or Mono.. the C# compiler is free... The SDKs are free. what was your point again?


    Not to mention Portable.NET and DotGNU.

    gman wrote:

    As a matter of fact, I take you one further. Microsoft has submitted C# to the ECMA for standardization. Has Sun done that with Java? Nope. Ya know why? Cause Sun wants to control Java and everything about it. Which company is more open?


    Not only submitted, but the standard was ratified. I'm not sure of the current status with the ISO... they may have ratified it as well.  And it's not just C#, but also the CLI.

     Sun has an interesting history in regards to the standardizing Java, actually.  Been in the process of proposing on more than one occasion with both major committees, and pulled out every single time.

    gman wrote:

    Beer28 wrote:The other major difference, is that you can code anything from a console chat server application to a full blown 3d video game and it will work exactly the same on windows, linux and macintosh. A 3d modeler, a media player, a hello world application. With Java, it's all good.


    Blah blah, yeah and it looks and acts like total crap just the same on all those platforms. And it also runs slow as a dog. Who wants to write apps for Linux anyway? For all 3 people who run it?


    Now you're being as bad as Beer28.  MANY people running Linux, and MANY companies care deeply about portable applications.  It's in everyone's best interest that MS remembers this and not only allows for it, but promotes it.

    That said, there are numerous portable applications written using C#.  Most of your big ASP.NET applications run on Mono, for instance.  So, Beer28 is spreading FUD.

    gman wrote:

    Beer28 wrote:Another plus with java, is that possibly the very best IDE to code java is completely free in netbeans


    Hahah, now you are just being silly, Java IDE's are pathetic... And I guess you never heard of the Visual Studio 2005 Express products... compeletely FREE.


    Actually, the best Java IDE is arguably Eclipse (I know this is a heated debate among some).  And MS can (and in some cases has) learn a lot from features available in that IDE.  I personally dislike the Java language, but when I had to develop in it for my employer, Eclipse was something of a wonder.  There are things I like better about VS, but for productivity, Eclipse wins hands down.

  • User profile image
    MotoMan045

    I personally break the Java vs .Net debate into two separate categories.

    1. Language. java vs c#,
    2. Platform. java vs .net.


    From a language perspective, as you point out, they are very similar.  When c# was originally released it contained a number of enhancements over java, like enums, properties, ect. Some of these have since been added to Java, but in my opinion, c# is still a slightly more powerfull language over java. For example C# has a better generics, and delegate/event story then java. Still, theres nothing earth shattering in the languages themselves to go one way or the other.


    The platform debate is a much more interesting, and controversial question, and the whether .net is of interests, to you depends on your particular circumstances.

    If you are primarily a windows shop, and work on small, to medium sized projects, or RAD type deployments, then .net would be of huge interest to you. For these types of projects, I believe you will find .net has a significant productivity advantage over Java.  The 1.1 release of .net was good, the 2.0 (Whidbey) release of .net will be simply great. 

    Now say your primary interest is large, enterprise scale,  projects across numerous architectures, Java will ofcourse be of more interest to you, especially if your staff already has Java expertise. 

    I'm not suggesting Java doesn't support RAD, nor that .net doesn't scale, I'm just pointing out relevant strengths compared to the other. 

    Just to be clear, and open, I have personally worked on the .net team, so naturally I like .net, but to be honest .net will never have the open platform story that java has, so if require open platforms, then your answer is pretty obvious. 

    If your starting a new project, and want to get that project to market reaching the maximum number of end users, with a high level of features, in a minimal amount of team, then I truly believe .Net has an advantage over Java in the majority of circumstances.

  • User profile image
    manickernel

    It's rumored that a Java based web app that is both functional and FAST exists. Some people claim to have seen it. It does exist.

    I put my bet on Area 51.

    (steps back to watch....)

  • User profile image
    MotoMan045

    One more point, with the upcoming release of the .Net 2.0, Express suite of tools, Microsoft will finally have a verify strong story on the free software front.  Unlike past attempts like WebMatrix,
    these freely available tools, are very powerfull, and support strong integration with upcoming Sql Express engine.


    For more info check out:
    http://lab.msdn.microsoft.com/express/

  • User profile image
    wkempf

    MotoMan045 wrote:

    Just to be clear, and open, I have personally worked on the .net team, so naturally I like .net, but to be honest .net will never have the open platform story that java has, so if require open platforms, then your answer is pretty obvious. 



    That's disturbing. And it's comments like this that make many folks wonder about MS.

    First, the claim is most likely wrong. .NET has a standard, and thus can be implemented by anyone on any platform.  Further, there's a huge momentum right now to do just that, with no fewer than 3 initiatives in varying stages of development, but all viable.  Futher, in Mono there's a huge push for adoption of .NET within Gnome, one of the biggest desktops in terms of user base on the Linux platform, not to mention the commercial backing of Novelle. It may be a little controversial amongst some zealots, but it's got the momentum and push from the core developers, so it's gonna happen.

    Second, the attitude won't do anyone any good. Especially considering the claim is likely to be wrong. .NET will be adopted on other platforms, and MS can't stop that. The attitude can therefore only lead to MS losing customer base and bad consequences for everyone involved as the language and CLI are severely fractured by the very creators.  Developers aren't like your typical end users.  Market share means little to us.  We'll choose the tools that best solve our needs, and a MS specific solution won't be the tool.  We'll still choose .NET, but we'll use APIs from other vendors to achieve the portability that gives us the most revenue.

    MS has matured recently with regards to standards. I appreciate that. But in this case I see an awful lot of attitude from MS developers that they are looking for lock-in in areas they shouldn't be.  The cat's out of the bag. C# and CLI are standardized, and the IL is portable.  That's a cat you can't put back in the bag, no matter how much you may want to.  The best way to increase MS's revenue at this point is NOT to try and restrict usage, but to go for MORE usage. Promote heavily the cross platform nature of your creation!

    For instance, I've read rumblings on MS blogs about the issue of Mono's implementing several APIs that were not included in the standard, such as WinForms and ASP.NET.  Attacking Mono on these grounds won't help MS... they'll implement competing APIs that MS can't touch (such as the gtk# stuff that already exists and runs on all supported platforms and can be used as a replacement for WinForms).  Developers that care about cross platform deployments will abandon MS for these alternative APIs.  MS loses market share this way, and in a manner that even Java could never quite accomplish for political and technical reasons.  Leave them alone, or better yet, include these APIs (or alternatives... WinForms is a bit too MS specific) in new proposals to the ECMA and ISO.  Then compete on the basis of quality of your offering and you'll not only not lose that market share, you might possibly even gain some.

    I fully understand MS's stance on OpenSource.  It's not a bad model, but not necessarily the best for most businesses.  Especially with licenses such as the GPL.  But when it comes to developer tools, it's in MS best interest to get them out, make them affordable, consider open sourcing and adhering to or proposing standards for them.  Making the tools open is a good thing for MS's bottom line.  Vendor lock-in is not.

  • User profile image
    wkempf

    Beer28 wrote:

    There are SO MANY scripting engines for console apps in unix and linux and mac that you don't need mono. There's perl, php, python, bash, ect... X infinity.

    People want portability on stuff like forms, media, database, rich UI, ect...
    None of those things are working correctly or at all on mono. Everything you can do with mono, you can do more easily with another runtime that that has been around longer.


    Spoken like a zealot that's not familiar with what he's decrying.  There are several very nice GUI apps running on Mono on the Linux platform.  There are also a few command line programs as well.  As I've stated before, most of the more popular ASP.NET OpenSource applications have been ported to Mono and are running very well on Linux.  These apps generally make heavy use of Database access, to just about any Database source you'd care to use, including PostgreSQL and MySQL running on Linux boxes.  So you're just spreading FUD here.

    Beer28 wrote:

    The real power of mono would have been to be able to make something like a WMP SDK, forms, or a Managed directX app and run it everywhere. But that's not going to happen in the next couple years or so.


    There are portable GUI applications running on both Windows and Linux.  Mono supports OpenGL, so no need for the MS specific DirectX.  So, this is more FUD.

    Beer28 wrote:

    I USE eclipse every day to code my LFC library, it's intellisense is too slow, no matter what the setting, you're talking to somebody that posts on the eclipse newsgroups regularly in the cdt section.


    Which makes you an expert, yes?  I've posted to the newsgroups a lot myself.  And I used WebSphere on a daily basis for more than 2 years, so I'm quite experienced with it.  Never had any issues with the speed of Intellisense.  The only speed annoyances I had were related to the Java VM and garbage collector, but even that happened infrequently enough to not change the overall productivety I experienced with the IDE.

    Beer28 wrote:

    Eclipse is good for CDT for C++ but netbeans is better for java because it's faster under linux.


    1)  I don't develop under Linux, even if I deploy there.
    2)  The CDT, frankly, sucks.  You lose most of the productivity benefits of Eclipse while developing for C++.
    3)  You once again are arguing just to be arguing. I gave my opinion and clearly stated that it was a hotly debated opinion.  Both IDEs have their following, with VERY large numbers of users for both.  I was not trying to argue with you about which of these IDEs was better.  I brought up Eclipse to point out that VS isn't necessarily the best IDE available, and that MS was learning from competitors.

  • User profile image
    Jorgie

    I found this if you want a more feature by feature comparison not just some sniping...

    C# and Java: Comparing Programming Languages

    If anyone was a similar one from a non MS source, please post it!

    Jorgie

  • User profile image
    Cider

    Jorgie wrote:
    I found this if you want a more feature by feature comparison not just some sniping...

    C# and Java: Comparing Programming Languages

    If anyone was a similar one from a non MS source, please post it!

    Jorgie


    Do you really need one when you have the "OMG OMG OMG I Knoes M0re tHAN EVRY1111, MVPs ARE ALL RUBBISH" Beer28 posts?

  • User profile image
    manickernel

    Rima Patel wrote:

    My response is always: .NET is immature, very proprietary, and lacks community.


    Yep, this is pretty unbiased. Immature? It took the errors of Sun and corrected them. Proprietary? Well, one platform does allow one to optimize. Community?

    Nuff' said.

  • User profile image
    MotoMan045

    Very interesting response to my last post kempf.

    First I misspoke when implied .net doesn't have an open platform story, and I'm certainly not of any authority to speak for Microsoft even though I work there.

    I personally agree with you that theres alot of momentum behind multiple platform support for .net, but will companies comment their mission critical apps to this strategy? For the short term, the answer I think would be no.  So until Microsoft clearly states their long term plan concerning porting, or supporting, .net to other platforms, Java will have a better open platform story then .Net. 



  • User profile image
    Jorgie

    LOL.. yep unbiased just like my link to MS Smiley

    But do you have anything that is not 3 years old or older?

    One of those was from 2002 and the other had the comment *but .Net wont be available util at least 2001* ...  Smiley

    Jorgie

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.