Keep it serious please... Java or .Net

Node_Pointer

Limp Gawd
Joined
Mar 26, 2002
Messages
313
Just looking for some discussion on this topic. It is a very big topic, even before last Fridays announcement.

Do not give me that "DEPENDS ON WHAT YOU WANT TO ACHIEVE" statement.

Which one would you rather use 100% of the time?
Which do you feel will beat out the other? why? how?
Likes and dislikes of both.


Any serious comment should be posted.
 
I'd have to say that it depends on what you want to achieve. ;)

In some respects, that statement is completely true. However, I'd still use Java in almost all projects over .Net for one simple reason: portability.

I can't run .Net programs on OS X, or Linux, or *BSD. Well, perhaps someone has constructed some method to do so, but it'll be cobbled together and not exactly "official."

Ignoring language differences and the fact that .Net isn't even a "language" so much as it's a "framework," I still think that Java is generally the better choice.

Of course, this all comes with a disclaimer: I don't do general programming. I do almost 100% Web programming, and when I do other jobs, I use Perl.
 
I'm gonna agree with Node_Pointer on one thing.

I could not, for the life of me, imagine coding something that would be usable only on a specific platform.

Maybe I'm just a claustrophobe :D

So my vote goes to Java.
 
Originally posted by carl67lp

In some respects, that statement is completely true. However, I'd still use Java in almost all projects over .Net for one simple reason: portability.

I ask then, how often in your personal (non web based) programming do you really need it to be cross platform? How often in the business world are clientside apps written cross platform?

Just the thought of having to program Swing GUI's all day long makes me shudder.

Of course I'm a bit biased...as I hate everything I've ever seen about Java. But my vote goes for .NET ( C# ).
 
I avoid Java like the plague, I find the two are closely related.... :)

Since I target windows with my apps, I mainly use C#, though I occasionally use VB or C++. Most of my work is with web apps, so I don't need to worry about platfom support, I just use ASPX. If I had to write a client side app that was cross platform I'd probably go to C++ since I don't thing there's a good winforms story for .NET on *nix.

I've used Java before, I just really don't like the model.
 
I've always hated Java from day 1. It was far too restrictive for me. Java's lack of operator overloading is a huge inconvenience, since ==, !=, etc, just compair references, and not objects. You can't modify a reference in a method, so you can't even write a simple swap function. The only reason I would use Java is if I needed to write a cross-platform application (rare).

I simply LOVE C#, .NET. It is everything Java should have been, and more. It may not be cross-platform, but it is the best programming language I've used since C++. It supports operator overloading, which is extremely usefull, since I can now overload ==,!= to compair OBJECTS, not just references. With the ref and out keywords, I can now modify references within my methods, allowing me to write that pesky swap method. =) Properties are a brilliant idea, that allow transparent data encapsulation, without having to have an army of getX(), setX() methods

The event system is far more sophisticated with the addition of delegates, allowing you to specify what method to use for a specific event, rather than telling you that you have to use a generic method to handle all events of a certain type. For example, no more switch statements inside actionPerformed() to call the proper method for a button push, and no more having a bunch of blank methods just to fill out a MouseListener interface so you know when the mouse moved somewhere. Now you just attach an event to that one action; far cleaner.

Also, are the C# generics that are being introduced in .NET 1.2 The C# generics are far superior to Java's generics. All Java's generics do is cast things down to Object for you, and then cast them back when you need them; no type saftey at all. In .NET, there is a bit of a kludge factor to ensure type saftey, but it's not just a bunch of casts. The code is reused as much as is possible, with methods being generated at run-time if and when they are needed. Reflection also works properly on the generated objects, so you don't just get an ArrayList of Objects, but an Arraylist of whatever type you declaired it as. Unfortunately, it still falls way short of C++'s templates, but it's better than Java.

I hope you took notes, because there is going to be a test tomorow :p
 
You'd have to pay me at least 1.5-2x as much for doing fucked.NET/C-hash than for Java.

Hmm... no, that's not it... throw in some heavenly virgins too.
 
I do mainly web programming, but I have a background in desktop apps in VB and C++. Comming from that background I prefer to use .net as it's intuitive for me to use either VB or C# for a particular project, and I can use VS.net for all my work.

I can't say i've had much experience with java other than simple javascript form validation, etc (which can be done much easier in .net).

Unfortunately I have to code in this hideous mess of what could be called asp at my current position. Future programmers will be lucky that they don't have to deal with it.
 
> can't say i've had much experience with java other than simple javascript

Javascript and Java are two completely different languages.

That's like saying "can't say i've had much experience with C# other than C-Robots"
 
Actually, the Mono project (free/open etc. .net and C# support) is doing quite well.
Still, It's not official. Thus, I choose java, since it's at least supported on the operating systems I use.
I will have to say that I hate Sun's silly restrictions on redistributing the JDK, though. (You have to download all the source and binary files by hand on my OSes of choice, because they won't let people automate it. Idiots.)

Honestly, I see java as a mess, and .net as a luring lockin to an OS I want to avoid, so I would have prefered "neither".
 
I sincerely wish for the ultimate downfall and marginalization of both. :)
 
Originally posted by STL
I sincerely wish for the ultimate downfall and marginalization of both. :)

I expected you to say something to that effect :D
(C and C++, then?)
 
I also sincerely wish for the ultimate marginalization of C.

Unfortunately, I think I'll only get two of my three wishes.
 
Originally posted by STL
I also sincerely wish for the ultimate marginalization of C.
Unfortunately, I think I'll only get two of my three wishes.

I would be overjoyed if the worst we had to contend with was the continued use of C.
 
Well, I'm going to assume that you're talking about web (or network-aware) projects, simply because I can't see a viable reason for using either in a client-side environment. In that, I'll grant STL that C++ is the choice (at least for high-performing applications).

My vote goes for both, if you're interested in earning money. The fad at the moment (particularly in government contracts) is to go Java, because of it's cross-platform nature. With that in mind, though, I can't see any future except the one where .NET wipes out everything in its path. Therefore, I say Java for now, Java and .NET for the mid-term (because the migration projects will happen), and .NET for the future, until Bill does something new that the rest of the world will adopt (and so the cycle begins again).
 
[:LJ:]
> I can't see a viable reason for using either in a client-side
> environment.

WOOT.

(I only think about the client-side environment, modulo my forum.)

> until Bill does something new that the rest of the world will adopt
> (and so the cycle begins again).

Bill didn't do C++; that other B guy did. And despite Bill's best efforts, Bill doesn't own C++. :)
 
.Net is better than Java but they both suck in my opinion. .Net will win out in the end if only because Micro$oft has the market cornered.

Give me C++ and Qt any day.
 
Honestly, choosing whether to use .NET or J2EE should be based on what you are trying to accomplish. If you are just doing a personal project then using either is going to work out. However, if you are working for a paying client then ultimately THEY are going to choose what you program in. To be more specific, you may have to integrate with an existing application or be limited to their hosting environment.

The problem is, unless they have the means to host their site at their company location, trying to find adequate providers to run J2EE applications can be hard. As where the majority of hosting providers out there offer the ability to run .NET applications at a reasonable price-point compared to J2EE Hosts.

.NET can interface with a lot of different languages and platforms also with the use of Web Services. I think that unless a person has really got their hands into .NET they can't immediately write it off as a bad Framework to work with.

These are just my opinions on the matter.
 
I have done production projects in Java and .Net. And as much as you hate to hear it, it depends :)

I haven't used Java in a few revisions so i may be working on old data here, BUT

I would say platform interoperability only matters if you plan on using multiple platforms. And since it was mntioned earlier, yes there is a CLR for BSD, MS wrote it and published it. If your programming for the Windows environment I would definately go with .Net. As it is an MS product i is going to work more smoothly with the OS than most other products (in my opinion).

I understand that for many people anything that comes out of MS is inherently evil, but I have to admit that C#.Net is one of my favorite languages. They have done wonders with the IDE, which is a stretch for me becaue I have never liked anything more complex than my EditPlus for programming because IDE's usually take to much time to learn and end up writing poor quality code (ie, low performance or extraneous details that will just hurt memory).

Now, Java does have the adantage of having ben out longer, so you will find a lot more documentation, custom classes, libraries, and such for it. You will also find a lot more tutorials and if you run into a problem the numer of other people that have run into that problem is going to be much higher.

I have little respect for ither company's business methods so that doesn't enter into the equation here.

For the record, my favorite interprted language is Python, but Iave done enterprise development (and releases) in Java and .Net (not Python).
 
Originally posted by STL
[:LJ:]
> I can't see a viable reason for using either in a client-side
> environment.

WOOT.

(I only think about the client-side environment, modulo my forum.)

Might I suggest that this is probably why you are so averse to languages/platforms like Java/.NET? They are expressly designed with the network-aware, large-scale server oriented system in mind. They weren't designed to compete with, or replace C++. They fill in the gaps which are too long-winded (or otherwise unattractive) with C++.

Originally posted by STL
[:LJ:]

Bill didn't do C++; that other B guy did. And despite Bill's best efforts, Bill doesn't own C++. :)

I wasn't suggesting that he did; however, the point is that in the current world, there are more opportunities for monetary compensation with stuff that Bill supports, and so more people are likely to go that way. Maybe it's just my materialistic view, but that's the way I see it, at least in the UK (just take a look at www.jobserve.co.uk).

Personally I prefer Java, because there's more freedom than with .NET, and my clients like flexibility (and cheap infrastructures).
 
[:LJ:]
> Might I suggest that this is probably why you are so averse to
> languages/platforms like Java/.NET? They are expressly designed
> with the network-aware, large-scale server oriented system in mind.
> They weren't designed to compete with, or replace C++.

Their proponents sure sound like they want to carve C++'s gravestone.

I'm basically against Java and C# because they take the wrong god damned approach. The C++ Core Language and Standard Library are wonderful and powerful. Trying to reinvent them doesn't work, because people keep wanting to rip out goodies, and then put back lame-ass versions of them. There's nothing really seriously wrong with the Core Language or Standard Library that prevents network or GUI programming. Network and GUI support should take the form of robust C++ libraries that Don't Suck.

The most common complaint with C++ is wrt memory management. And as you know, I say that's bullshit now.

> They fill in the gaps which are too long-winded (or otherwise
> unattractive) with C++.

I wrote a small abstraction of a select()-based server. Its interface is wonderfully simplistic, and only the power of C++ let me design it that way. When I imagine the same thing, but 1000x more general, and for GUIs too, and see that it doesn't exist, with thousands of programmers instead wasting their time with Java and what have you, I want to cry. For about a second - then I want to go bash something in with a baseball bat.

> I wasn't suggesting that he did; however, the point is that in the
> current world, there are more opportunities for monetary
> compensation with stuff that Bill supports

[Common, Shitty] C++ is still very, very, very big. You're probably thinking of it from the IT end.
 
> Trying to reinvent them doesn't work, because people keep wanting to rip out goodies.

And replace them with things that are much better. :p

One example? CAS. Learn it, live it, love it. I won't run programs from the internet unless I can run them in a partial trust loader. It's not exactly easy to write a verifiable app in C++, in fact it's downright obscene unless you're doing something trivial though it is possible. And no, I'm not discounting C/C++, it's still very useful.


However this thread isn't about C++. If you want to compare the two languages, do so, but don't bash them both when the original poster explicitly stated he wanted to keep the discussion to the .NET and JVM platforms.

For my part in the discussion, it's been 4 years since I did anything in Java, so I'm probably behind the times. However, from what I've heard the security model has not improved. The CAS model in .NET is on of the primary things I like about the platform.
 
Back
Top