Features of C#.NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I am New to this group and concept too.

Can anyone tell me about drawbacks of java overcomed by .NET
 
Which drawbacks?

--
Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 
Which drawbacks?
I think that was part of the question ;)

Personally (and I know I will create flame, but read the argument): Java is
bad, C# is good ^_^
It could be demonstrated with the simple following scenario.

write a Java program (which does something).
write the same program in C#.

- compare size of code (hence the time you will spend on it and the
potential quantity of bug), you will see C# is leaner.
- compare performance, you will see that the C# program has roughly the same
performance, but sometimes faster.

a couple of things I found GREAT! in C# over Java
1. Attributes! +++++
2. delegate & event, hypra cool. ++
3. direct interop, cool. ++
4. property, very neat. ++

Eaasy!

Anyway there is one area where (due to the library) C# kind of sucks compare
to Java.
It's GUI.

Write an heavily customized graphical interface. Java is a clear winner here
(amazing, no?)
Because WinForm is mostly a kind of sucking thin wrapper around win32
control, whereas Swing is an elegant modernly designed GUI API. However I'm
sure that would be fixed with Avalon!

However, it has to be say that C# GUI are more responsive (just looks at
NetBeans, this slooooow monster), however they had made steady progress and
1.5 perform well.
 
Hi Lloyd,
Anyway there is one area where (due to the library) C# kind of sucks
compare to Java.
It's GUI.

I'm an avid online reader and this is the very FIRST opinion I've ever seen
that the GUI features of Java Swing are somehow better than .Net.
Personally, I find that puzzling. I've seen dozens of whithering
denounciations of Swing from Java folks, but not one, until now, kind word.
I find this fascinating. I assume from your statements that you are a .Net
developer. Perhaps Swing is only good when you don't use it? ;-)

Here's a quote from an interesting article on Swing: (the link is below)
" The standard Swing component set hasn't changed for the last 4-5 years.
These components remain just barely good enough for the job: but as their
competitors get better, the Swing component set has become, like, so 1998."
http://www.softwarereality.com/soapbox/swing.jsp


--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
 
I am not sure there is a list of specific drawbacks that are overcome.
Overall, C# is leaner than Java. Some of this, however, is the Java mindset
and not an intregal part of the Java language.

Personally, I enjoy delegates over event classes. I find it easier to
maintain as well as a faster implementation. But, realize that fast is
overrated in a day where the difference between Java and C#, for a particular
routine, is in the nature of milliseconds.

Java, by its nature, abstracts nearly everything to a class (ala event
classes). This adds some unnecessary weight. This often forces one to create
an object where it might not otherwise make sense. But, this is rare.

I am not sure this is helpful, so I will end here and let someone else chime
in.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Lloyd Dupont said:
I think that was part of the question ;)

Personally (and I know I will create flame, but read the argument): Java is
bad, C# is good ^_^
It could be demonstrated with the simple following scenario.

write a Java program (which does something).
write the same program in C#.

- compare size of code (hence the time you will spend on it and the
potential quantity of bug), you will see C# is leaner.

Not in my experience. It all depends on whether there are libraries
available to do a lot of what you want - and there are *far* more free,
open source libraries for Java than for C#, in my experience. The .NET
standard libraries provide more than the Java ones do, but if there's
something you want that they don't provide, it's often hard to find a
high quality free component.
- compare performance, you will see that the C# program has roughly the same
performance, but sometimes faster.

And sometimes slower.
a couple of things I found GREAT! in C# over Java
1. Attributes! +++++

Available in Java 1.5.
2. delegate & event, hypra cool. ++
3. direct interop, cool. ++
4. property, very neat. ++

Agreed on all of those.

I wish C# had Java's enums though - and Eclipse :)
 
Nick Malik said:
I'm an avid online reader and this is the very FIRST opinion I've ever seen
that the GUI features of Java Swing are somehow better than .Net.

I've seen several people praising the concepts behind Swing over
WinForms - the cleaner MVC model, etc. Personally what irks me most
about WinForms compared with Swing is the layout management - roll on
Avalon!

Swing has improved a lot in the last few years, both in terms of
performance and the ability to look more like the native platform.
Undoubtedly there's still work to do though...
Personally, I find that puzzling. I've seen dozens of whithering
denounciations of Swing from Java folks, but not one, until now, kind word.
I find this fascinating. I assume from your statements that you are a .Net
developer. Perhaps Swing is only good when you don't use it? ;-)

Here's a quote from an interesting article on Swing: (the link is below)
" The standard Swing component set hasn't changed for the last 4-5 years.
These components remain just barely good enough for the job: but as their
competitors get better, the Swing component set has become, like, so 1998."
http://www.softwarereality.com/soapbox/swing.jsp

Quote from another article:
http://www.manageability.org/manageabilityWiki/BetterGUIFramework
"Java's two leading GUI frameworks Swing and SWT are better designed
than Windows.Forms. In fact both are designed with Java in mind and
designed to be portable, unlike Windows.Forms where its a thin wrapper
over a native library."

Just to show there are two sides to every story...
 
Hi Lloyd,
Hi Nick!
Answers below..
I'm an avid online reader and this is the very FIRST opinion I've ever
seen that the GUI features of Java Swing are somehow better than .Net.
Personally, I find that puzzling. I've seen dozens of whithering
denounciations of Swing from Java folks, but not one, until now, kind
word. I find this fascinating. I assume from your statements that you are
a .Net developer. Perhaps Swing is only good when you don't use it? ;-)
I'm surprised to be the first to say so!
Let it be know I once was a Java developper!
Swing is so good!
And I get so frustrated over and over again for the lack of advanced control
such as JTable, JTree, JTextComponent and JScrollPane in WinForm.
Sure there is DataGrid, TreeView, RichTextBox, ScrollableControl. but with
the later you can't basically do anything but their (limited) original
intend. Or you have to read heaps of documentation on interop, win32, etc...
and their so called 'model - view' behavior is such a joke (compare to
swing, anyway).

On the contrary, let's take for example the JScrollPane.
you could easily replace the scroll bar, put a control in the corner, add
headers, and set the internal view.
A very common scenario of such advanced use would to put side by side (with
a splitter in the middle) a JTree next to a JTable IN THE SAME
JScrollControl (hence sharing the same single scroll bar for both control!).
and maybe put a DateChooser in the corner and the table's headers in the
headers.
And all of that in maybe, uh.... 20 lines of code? (and working well!)
Try to do the same thing in WinForm, good luck!
Not to mention how easy it is to customize any single cell of your JTable or
JTree!

Also Swing uses REAL Model-View-Controller paradigm.
So it's very easy and not resource consuming at all (though a tad
unrealistic) to have a JTable with, lets say, 1.000.000.000 (1 billion)
rows.
Mhh.. tryed the same thing in WinForm?
Here's a quote from an interesting article on Swing: (the link is below)
" The standard Swing component set hasn't changed for the last 4-5 years.
These components remain just barely good enough for the job: but as their
competitors get better, the Swing component set has become, like, so
1998."
http://www.softwarereality.com/soapbox/swing.jsp
mmh... browsing that article rapidly... mmhh...

1st speed and ugliness. well, that was not to wrong. back in 1.2 it was not
top responsive and extremely good looking. but NOT THAT BAD!

2nd: browser integration compare to flash: hey, common, get real! does
WinForm integrate better than flash?
sure Avalon will do! in 2006! ho my god, it's so 1998!

3rd: Swing component should be more powerfull. mmh.. come on, learn to use
them 1st!
go there:
http://java.sun.com/docs/books/tutorial/uiswing/components/components.html

7th: Make swing simpler?!?!?! obviously he is a VB(6) guy who speak after a
2 day crash course on Java ^_^
again, go there:
http://java.sun.com/docs/books/tutorial/uiswing/components/components.html

9th: Improve the Layout Managers, gnn? no longer any doubt, this guy is a
moron!

admitedly GridBagLayout (for example) is a bit tricker to use in the IDE
than docking or anchoring. but provides so much more. and it's very behavior
makes it more difficult to integrate as smoothly as the laters. however try
it with JBuilder, it's quite easy in fact....
 
answer below
Not in my experience. It all depends on whether there are libraries
available to do a lot of what you want - and there are *far* more free,
open source libraries for Java than for C#, in my experience. The .NET
standard libraries provide more than the Java ones do, but if there's
something you want that they don't provide, it's often hard to find a
high quality free component.
well, ho... maybe.
let's just say I feel more comfortable, more productive in C# then ;)

BTW, just in case, let me point you in this direction:
http://www.codeproject.com
 
Additional thoughts....

after reading the comments.

1st: it's true that for simple GUI I get clearly more productive with
VS.NET, however, how many WinForm based application resized properly?
most which do have a very simple content!
With Swing layout manager it's a bit more complex but it alwasy resize
nicely

2nd: it's true with Swing in 1.2, 1.3 & 1.4 the look was also not very
appealing. Ocean in 1.5 is quite nice.

3rd: it's true that if I just wanted to fetch a couple of rows from the
database and display in a table a mix of DataSet & DataGrid are faster than
their Java counter part (where I have to write the model, etc...).
However for those of use who are disatisfied with default viewer/renderers,
they get much faster customization results with Swing.
 
I wish C# had Java's enums though - and Eclipse :)

hey, just read Java doc on new enum (never did before), hey, they are cool!
vote for that too!!

I don't know about eclipse, used it only 5 minutes and uninstalled it ^_^

how does it compare to #develop / VC# express?
 
Lloyd Dupont said:
well, ho... maybe.
let's just say I feel more comfortable, more productive in C# then ;)

Sure, there's nothing wrong with being more comfortable in one language
than another.
BTW, just in case, let me point you in this direction:
http://www.codeproject.com

In my experience, CodeProject is more about "snippets" than full
libraries. (Often those snippets and articles are of poor quality too.)

Look on SourceForge though - over 15,000 Java projects, just over 2500
C# projects.
 
Lloyd Dupont said:
hey, just read Java doc on new enum (never did before), hey, they are cool!
vote for that too!!

My appreciation for them has grown over time - in the project I'm
working on now, they've been insanely useful.

I wonder how feasible it might be to write a code generator that would
give the same effect in C#... you wouldn't be able to switch on the
enums without a bit of work wherever they're used, unfortunately.
I don't know about eclipse, used it only 5 minutes and uninstalled it ^_^

Then you didn't give it nearly long enough. Unfortunately it's also got
a lot of features you might not find out about unless you hear about
them - I can't imagine writing Java without Organise Imports now (I
can't remember the last time I wrote an import statement) but you could
easily not find out about it. The superb incremental compiler saves
rather a lot of compile time, too - the difference is noticeable when
we go back to our (fairly small) C# solution...
how does it compare to #develop / VC# express?

Not sure, but it beats the pants off VS.NET 2003. I really need to get
round to installing the beta of VS 2005 so I can see how many of my
favourite Eclipse features it's got.
 
Just to show there are two sides to every story...

Point taken

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
 
Lloyd Dupont said:
[OT], I'll bet you study Math at uni... (I mean you specialized in math)

Yes, my first degree was in maths - but I'm not sure how you got there
from my previous post!
 
well,.... let's say I study physics at uni, so I know the beast ;-)
I also read some other post you made on the net and.... well I had a strong
hunch!
they are recognizable the way they speak and explain things.

certainly a fan of..... I forget his name!
You know this virtual mathematician (who don't exist) but had a search group
named after him!
Who gave birth to modern mathematic with rigorous definition of such thing
as function limit, etc...
Nicolas Something I believe...

Jon Skeet said:
Lloyd Dupont said:
[OT], I'll bet you study Math at uni... (I mean you specialized in math)

Yes, my first degree was in maths - but I'm not sure how you got there
from my previous post!
 
I could not agree more with this post. C# features are grat and the
WinForm library sucks. They just didn't get it.
 
First you have to realize I think the Java community has a higher
standard on what a good GUI library is.

SWING is far better than WinForms. SWING's biggest complaint is
performance. I think and many others do as well that SWING it pretty
well designed, particularly if WinForms is on that scale.

SWING could be richer in it's components, but at least it has a better
methodology.
 
If I restrict deployment base only on Windows machines, then Java apps with
GUI are less stable, on different machines behaving differently (sometimes
not working at all, nobody knows why), slow and usually ugly. .NET apps using
GUI work always the same way - this is what I need. And with .NET 2.0 they
look quite nice I guess. Not mentiosning Java-runtime-verison hell (runtime
versions cooexistence is far better solved in .NET).
 
Back
Top