Java and .NET (no Flames Pls)

  • Thread starter Tarundeep Singh Kalra
  • Start date
M

Mike Newton

Right click on the project in the solution explorer, and choose
"Properties." Go to the "Configuration Properties" folder, and select
"Advanced."

Incremental Build is the first item on the list.
 
J

Jon Skeet [C# MVP]

Mike Newton said:
Right click on the project in the solution explorer, and choose
"Properties." Go to the "Configuration Properties" folder, and select
"Advanced."

Incremental Build is the first item on the list.

Ah, cheers - the reason I hadn't seen it before was that it's not
enabled for Compact Framework projects, and the project I was looking
for it in was a CF project. (It's still there, but greyed out, which
makes it much less obvious...)
 
D

Daniel Billingsley

Jeez, this civil discussion almost makes me miss the entertaining troll days
of a year or so ago when this kind of thread would have spun off into a
bunch of crossposts to java.advocacy.whatever and included all kinds of
silliness like "java is better because c# is just a clone" or "C# is better
because I worked on a java project and had to make code changes to switch
hardware platforms so they lied." Almost. :)
 
J

Jon Skeet [C# MVP]

Daniel Billingsley said:
Jeez, this civil discussion almost makes me miss the entertaining troll days
of a year or so ago when this kind of thread would have spun off into a
bunch of crossposts to java.advocacy.whatever and included all kinds of
silliness like "java is better because c# is just a clone" or "C# is better
because I worked on a java project and had to make code changes to switch
hardware platforms so they lied." Almost. :)

Don't worry, I'm sure there are plenty of bigots around who believe
it's only possible to support one development platform...
 
G

Guest

I like .NET over Java for a couple of reasons. The primary thing is the
wealth of libraries that all the languages individually (VB, C++, etc) used
to have that you can now access from any of the .NET languages. I like C#
because I think the performance is great (primarily as a result of an
excellently well written compiler).

Finally I think Visual Studio is still unmatched. I haven't used Eclipse,
but I have used JBuilder and NetBeans and both are really slow (mainly
because they are built on Swing). Swing was/is a really bad idea, they
finally got it right when they started implementing UI features in the native
API's of the respective OS.

I think the biggest obstacle for .NET and MS as a whole to overcome is the
ingrained concept in some developers mind that all MS products suck (not
true), and that MS has lots of security issues (somewhat true), and most of
all the general hatred because they have a monopoly on the desktop/office
market. They also get a bad rap for being "proprietary" when in actuality
they are pushing the envelope and just not waiting for a panel of "experts"
to "standardize" the API they happen to be working on. And for this reason
Visual Studio has superior support for Web Services.

My $.02 (more like $5) :)
 
J

Jon Skeet [C# MVP]

I like .NET over Java for a couple of reasons. The primary thing is the
wealth of libraries that all the languages individually (VB, C++, etc) used
to have that you can now access from any of the .NET languages.

Well, Java has a pretty huge wealth of libraries too. (And it's not
just Java that targets the JVM, although that's easily the biggest
language using it, of course.)
I like C#
because I think the performance is great (primarily as a result of an
excellently well written compiler).

The C# compiler has little to do with performance - it's fairly simple,
I believe. The JIT and the libraries are what really drive performance
in .NET.
Finally I think Visual Studio is still unmatched. I haven't used Eclipse,
but I have used JBuilder and NetBeans and both are really slow (mainly
because they are built on Swing).

If you haven't used Eclipse you can't sensibly claim that Visual Studio
is unmatched. Consider what your opinion of an Eclipse fan would be if
they said that Eclipse is unmatched but that they hadn't used Visual
Studio.
Swing was/is a really bad idea, they
finally got it right when they started implementing UI features in the native
API's of the respective OS.

Have you used Swing recently? It's come on in leaps and bounds in the
last couple of releases, and I gather the new release due soon is even
better in this sense. Swing can be very slow when written badly, but
can perform well if properly handled.
I think the biggest obstacle for .NET and MS as a whole to overcome is the
ingrained concept in some developers mind that all MS products suck (not
true), and that MS has lots of security issues (somewhat true), and most of
all the general hatred because they have a monopoly on the desktop/office
market. They also get a bad rap for being "proprietary" when in actuality
they are pushing the envelope and just not waiting for a panel of "experts"
to "standardize" the API they happen to be working on. And for this reason
Visual Studio has superior support for Web Services.

Interesting - I thought one of the criticisms levelled at Microsoft's
version of web services was that it went beyond the standard, thus
making it impossible for some standard web service consumers to consume
all .NET web services. I'm not sure I consider that superior support.
 
G

Guest

Jon, it seems you are much in favor of java. Why then, I ask, are you a C#
MVP?

I agree with all your statements. Except the last one where a consumer of a
..NET webservice might not be able to. I haven't seen this, unless perhaps
you're talking about returning a DataSet, in which case I have to argue that
the benefits outweigh the consumption downfalls. Even a DataSet can be
consumed tho I believe.

I will download Eclipse and give it a try next time I'm doing some Java code
(likely next month) just on your recommendations alone. Some things I will
look for: Does it contain a WYSIWYG HTML editor? Does it have an integrated
WS proxy generator? Interactive debugging, with a built in web server? Good
debugging features: watches, etc.

One other thing, and this is strictly a preference nothing to do really with
support (although you could argue perhaps some sense of abstraction) is
Properties of a class instead of getters and setters. I was having a funny
conversation with a Java programmer and he mistakenly thought that Properties
were a violation of encapsulation, until I told him that they weren't
internal data being accessed directly. (eg: Java: getThisProp{}
setThisProp{}, C#: ThisProp{ get: set: };
 
J

Jon Skeet [C# MVP]

Jon, it seems you are much in favor of java. Why then, I ask, are you a C#
MVP?

Because I'm also very much in favour of C#. There's no reason why any
one person can't think they're both great languages on great platforms.
Currently I'm involved in writing C#. I may well go back to Java in my
job, whereupon I'll spend a little less time in these newsgroups and
more time back in the Java groups.
I agree with all your statements. Except the last one where a consumer of a
.NET webservice might not be able to. I haven't seen this, unless perhaps
you're talking about returning a DataSet, in which case I have to argue that
the benefits outweigh the consumption downfalls. Even a DataSet can be
consumed tho I believe.

I *think* there are some things that a .NET web-service can produce
which aren't in the standard, but I don't have any examples to hand.
(IIRC, they're things which really should have been in the standard,
but aren't.)
I will download Eclipse and give it a try next time I'm doing some Java code
(likely next month) just on your recommendations alone. Some things I will
look for: Does it contain a WYSIWYG HTML editor? Does it have an integrated
WS proxy generator? Interactive debugging, with a built in web server? Good
debugging features: watches, etc.

Interactive debugging, certainly. The web server isn't built-in, so
much as there are Tomcat plugins to make it easy. (The debugging is
actually better in Eclipse than current VS.NET, IMO. Things like
generic conditional breakpoints which I don't *think* are supported in
VS.NET.)

WYSIWYG HTML editor - I don't believe so, but there may well be a plug-
in somewhere.

WS proxy generator - again, I don't know, but I'd be very surprised if
a plug-in didn't exist. (In fact, have a look at
http://www.eclipse-plugins.info/eclipse/search.jsp?query=wsdl - it
looks like you should be fine.)

The number of plug-ins for Eclipse is enormous.
One other thing, and this is strictly a preference nothing to do really with
support (although you could argue perhaps some sense of abstraction) is
Properties of a class instead of getters and setters. I was having a funny
conversation with a Java programmer and he mistakenly thought that Properties
were a violation of encapsulation, until I told him that they weren't
internal data being accessed directly. (eg: Java: getThisProp{}
setThisProp{}, C#: ThisProp{ get: set: };

That's one of the things I prefer about C#, along with delegates,
events, and the "using" statement.
 
M

Mike Newton

It's not a matter of sides. You can be proficient in C#, but also
understand that it isn't always the best tool for the job. You can also
be good at C#, and be a bigger fan of java.

I think this bit here is the biggest poison that infects MS loonies:

"I think the biggest obstacle for .NET and MS as a whole to overcome is
the ingrained concept in some developers mind that all MS products suck
(not true), and that MS has lots of security issues (somewhat true), and
most of all the general hatred because they have a monopoly on the
desktop/office market. They also get a bad rap for being "proprietary"
when in actuality they are pushing the envelope and just not waiting for
a panel of "experts" to "standardize" the API they happen to be working
on. And for this reason Visual Studio has superior support for Web
Services."

Open standards are what drive technology. Take TCP/IP for example, or
HTTP, HTML, CSS, PNG, etc. These are things that have a set format or
API, and are *not going to change.* This basically means that we can
stop worrying about how such and such is supposed to be implemented at
this point in time, and start worrying about making the existing
implementation more efficient, or start worrying about more important
things.

MS is not pushing the envelope by any means when it comes to open
standards. They've submitted the C# language and got it ISO certified,
but now C# 2.0 is out. They didn't standardize the framework libraries,
many of which contain patented material (I'm not going to even approach
the validity of software patents). When you patent something, you're
trying to make sure that you have a legal monopoly on selling that item
for a set amount of time. It is a version of "proprietary."

The panel of "experts" that you refer to is what you rely on every day.
If it weren't for these "experts," then you'd have a number of
different servers that speak in different languages, and may or may not
understand each other. You'd be able to talk to IIS, for instance, but
maybe not access Hotmail (which, I believe, is still based on BSD).
Then again, these "experts" were around when the industry started, or
they built the infrastructure for the industry themselves. Let's just
call them "experts," because they don't deserve any more respect than
that. </sarcasm>

Visual Studio is a good tool, no doubt about it. Does it, however, work
in the same way with mono? Apache? The problem of creating an end-all
tool like Visual Studio, as easy to use as it is, is that you've got
platform lock. Someone else is making the decision for you, as to what
web server you're going to use, or what operating system you are going
to run. That is, if you really really want to use visual studio. For
those who don't want to be confined to an extremely small set of
platforms, they choose to go with a tool that promises to work with many.

Eclipse, for instance, is open sourced. It has a board-standardized
plugin API, and a number of plugins exist for it. Eclipse, in effect,
has much more flexibility and extensibility than Visual Studio does. It
doesn't have an embedded WYSIWYG HTML editor, nor does it seamlessly
integrate with web servers by default. It does have a java debugger,
though. Everything else is handled by plugins, and I'm certain that
there are HTML plugins, web service plugins, visual form editing tools,
UML, etc.

One last thing, just an FYI, to tell the truth. It isn't the web server
that has debugging built in. When you're debugging a web service in
..NET, or ASP.NET, you're interacting with the .NET runtime, not the web
server. When the web server sees that you're requesting a .NET type
page, it passes the request off to the runtime, which processes the
request itself. In this respect, yes, you can debug java web servlets
and services, since you can debug through the virtual machine.

Sorry... this is a bit of a rant, but astroturfing without knowing both
sides of the equation is rather frustrating.
 
G

Guest

Not sure what astroturfing is but I apologize for my ignorance or offending
if I did. =) Your points are well made and thanks for the info.

I don't consider myself an MS loonie, I'm just expressing an opinion based
on what I have seen and experienced. I have done both Java and C#
development and I think it's amazing the short time-frame .NET has been able
to come up to speed and be a legitimate contender for enterprise level
applications (web in my experience).

I don't think I said there shouldn't be standards, particularly with respect
to communication protocols (HTTP, SOAP, etc). I am just saying it takes more
time for a large group of individuals from different organizations with
different priorities to agree on a common API. I think it should be
commended instead of condemned that C#/ASP.NET 2.0 has come out in such a
short period of time. Much can be said in the opposite for Sun with Java.
Who is being pressured from all angles to either make it open source or sell
it to IBM because of it's slow progression between versions. More often than
not they are just bundling libraries with the SDK that were already available
for download before (security libs, etc.).

Clearly MS has an agenda to make money and making their products first and
foremost work on Windows Servers is a big profit gain for them. They have
always been in the business of business but that doesn't really bother me as
long as their tools and products work.
 
G

Guest

The only real advantage Java seems to offer is its platform independence. As
a language, it seems so inferior because of how unnatural it is to write in.
If you're looking to write programs that require a lot of maintenance, you
should probably stick with .NET. Unless you need GUI Remoting, mono provides
a fine alternative for all but the most complex of data transfer for a UNIX
system.

Java feels to artificial. The libraries are not laid out with any form of
obvious logic, you'll find yourself spending longer searching for what you
want than you will spend actually using it ... .NET is just cleaner..
seriously.

Also, with .NET, you'll gain the ability to incorporate the Windows API,
whereas you cannot do a p/invoke with Java.
 
J

Jon Skeet [C# MVP]

<"=?Utf-8?B?RGVyZWsgVGhvcm50b24=?=" <Derek
The only real advantage Java seems to offer is its platform independence. As
a language, it seems so inferior because of how unnatural it is to write in.

It seems fairly natural to me, although C#/.NET has a lot of nice
features which are missing in Java - delegates, events and properties
being the principal ones for me.
If you're looking to write programs that require a lot of maintenance, you
should probably stick with .NET. Unless you need GUI Remoting, mono provides
a fine alternative for all but the most complex of data transfer for a UNIX
system.

I don't think it's that cut and dried. It's quite possible to maintain
large Java programs - I've done it with no significant problems. (At
least, the problems I've encountered aren't fixed by anything that .NET
adds.)
Java feels to artificial. The libraries are not laid out with any form of
obvious logic, you'll find yourself spending longer searching for what you
want than you will spend actually using it ... .NET is just cleaner..
seriously.

..NET is indeed cleaner - although I suspect that's mostly due to having
been through fewer iterations. There are some problems in terms of Java
library layout, but I don't think it's nearly as bad as you're
suggesting.
Also, with .NET, you'll gain the ability to incorporate the Windows API,
whereas you cannot do a p/invoke with Java.

True - this is a big advantage of .NET for many apps, although I rarely
found myself wanting to do it when I was writing Java code (mostly
servlets).
 
G

Guest

Java and .Net both have their strengths and weaknesses but I always like to
look at what problem I'm trying to solve and then I choose the platform based
on that.

If I'm looking at implementing a solution in a predominatly windows based
enviornment .Net is the obvious winner, while in a linux, unix enviornment
Java is the obvious choice. Sometimes a mix of the two is appropriate.

just my two cents!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top