Generic question

O

One More Try

Not to start a flame war here, but I really would like to know if someone
did a comparison of Java to dotnet, and what the benefits (pros and cons)
each development environment has. Since I have gotten back into Java, it
surprises me how far Java has advanced from the dark days of 1.0-1.2.

My preferred programming language is C++, so I get frustrated with Java's
"trying to protect the programmer" mentality, which makes it much harder to
code slick routines.

I am looking at comparisons for
1) E-Commerce
2) Online Game development (for this I am looking for best practices for
items like card games)

Thanks
 
J

Jon Skeet [C# MVP]

One More Try said:
Not to start a flame war here, but I really would like to know if someone
did a comparison of Java to dotnet, and what the benefits (pros and cons)
each development environment has. Since I have gotten back into Java, it
surprises me how far Java has advanced from the dark days of 1.0-1.2.

My preferred programming language is C++, so I get frustrated with Java's
"trying to protect the programmer" mentality, which makes it much harder to
code slick routines.

In my experience, trying to "code slick routines" is almost always a
bad idea. It suggests to me the kind of thinking which leads to
unmaintainable code or code which tries to do tricks to be thread safe
quickly, and fails to be safe.

Note that there's a big difference between development environment and
platform. Personally, my favourite development environment is Eclipse,
developing Java. I prefer the .NET platform and the C# language though.
Which are you actually interested in?
 
C

Cor Ligthert

One More Try,

Without telling anything about the language itself because after 1.2 Java
felt out of my scope and that is already a long time ago.
2) Online Game development (for this I am looking for best practices for
items like card games)

AFAIK can you not make "applets" with C# which don't need a lot of security
settings and the framework on every client (the last is the same as Java
however the framework is a little big huger) . Which has nothing to do with
the language itself of course however the effect is the same.

Cor
 
P

Patrick A

I agree. "Slick routines" is code for "job security" or "impossible to
maintain" I'd bet the slick routines don't have any comments in them
either.
 
O

One More Try

In my experience, trying to "code slick routines" is almost always a
bad idea. It suggests to me the kind of thinking which leads to
unmaintainable code or code which tries to do tricks to be thread safe
quickly, and fails to be safe.

Note that there's a big difference between development environment and
platform. Personally, my favourite development environment is Eclipse,
developing Java. I prefer the .NET platform and the C# language
though. Which are you actually interested in?

I have Java experience - looking to see what dotnet is all about, and more
importantly:

1) Is it truly scaleable (check out grid computing with Sun)
2) Is it easier to code and maintain?
3) Is it faster to develop in dotnet over Java
4) Since ASP.NET is slow (but easy to develop), my preference would be
first C# then VB.NeT. How do those languages compare


For slick routines, in Java, if you have a two byte character and try to
assign it an int plus an int of type short (also two bytes), even with type
casting, you get a precision error (when there isn't). I can do this in
any other language (slick, common, and practical)

Thanks
 
O

One More Try

One More Try,

Without telling anything about the language itself because after 1.2
Java felt out of my scope and that is already a long time ago.


AFAIK can you not make "applets" with C# which don't need a lot of
security settings and the framework on every client (the last is the
same as Java however the framework is a little big huger) . Which has
nothing to do with the language itself of course however the effect is
the same.

Cor

My only concern is that dotnet is limited to MS O/S at this time. I am
aware there is a Linux development effort (I don't really care), but not
one for IBM or Sun machines (which I do care). I was looking to venture
into online gaming, setting up a free server, where people can chat and
play various card games, including several that were taught to me by my
grandparents that not many people know (such as spite and malice - an UNO
pre-cursor).

So this begs the question on scalability and security, which is better, and
more importantly, can I develop in dotnet faster, once I tackle the
learning curve, where the code is easier to maintain?

Any thoughts are appreciated....
 
J

Jon Skeet [C# MVP]

One More Try said:
I have Java experience - looking to see what dotnet is all about, and more
importantly:

1) Is it truly scaleable (check out grid computing with Sun)

Scaleable is more about architecture than language, I believe. I don't
think there are many general distributed computing projects in .NET
yet, but I don't think there's anything stopping you from writing one.
2) Is it easier to code and maintain?

Personally, I find C# easier to write and read than Java. Things like
properties, the using statement, events and delegates all add to the
elegance of the language. It's also easy to interoperate with native
code, should you need to.
3) Is it faster to develop in dotnet over Java

Rougly the same, I'd say - except that the lack of refactoring in
VS.NET slows me down compared with developing in Eclipse.
4) Since ASP.NET is slow (but easy to develop), my preference would be
first C# then VB.NeT. How do those languages compare

What makes you think that ASP.NET is slow?
For slick routines, in Java, if you have a two byte character and try to
assign it an int plus an int of type short (also two bytes), even with type
casting, you get a precision error (when there isn't).

I don't think that's true. This program seems to do what you're saying,
with no errors or warnings:

public class Test
{
public static void main (String[] args)
{
int i = 5;
short j = 48;
char c = (char)(i+j);
System.out.println (c);
}
}
I can do this in any other language (slick, common, and practical)

You shouldn't be doing this often, to be honest - characters should
usually be treated as characters, not as ints.
 
J

Jon Skeet [C# MVP]

One More Try said:
My only concern is that dotnet is limited to MS O/S at this time. I am
aware there is a Linux development effort (I don't really care), but not
one for IBM or Sun machines (which I do care). I was looking to venture
into online gaming, setting up a free server, where people can chat and
play various card games, including several that were taught to me by my
grandparents that not many people know (such as spite and malice - an UNO
pre-cursor).

I don't see why you'd need an IBM or Sun machine for that though - why
not just use a Linux box, or even a Windows box?

Of course, I'm sure the Mono project would welcome any input into
getting it to work well on Solaris (which it may already - there are no
binary downloads on the Mono home page for Solaris, but you may well
find it builds and runs fine).
So this begs the question on scalability and security, which is better, and
more importantly, can I develop in dotnet faster, once I tackle the
learning curve, where the code is easier to maintain?

Any thoughts are appreciated....

Security can certainly be achieved reasonably easily for this kind of
scenario on either platform.

Are you really expecting so much traffic that scalability to multiple
machines (as you implied before) is likely to be an issue? Write the
app so that it will scale within a single box (which you can do on
either platform) and it should be fine for non-enterprise apps.
 
C

Cor Ligthert

One More Try,

I told you about my current expirience with Java, that is to few to answer
you seriously except about the applet part, that when you need that, can be
in my opinion not replaced by C#.

About your OS part.

What would it be when you would make your programs exclusively for *non*
Microsoft computers of course inclusive clients.

Just my thought,

Cor
 

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