473,387 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Generic question

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
Jul 21 '05 #1
8 1258
One More Try <jd@aol.com> wrote:
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?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2
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

Jul 21 '05 #3
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.

Jul 21 '05 #4
Jon Skeet [C# MVP] <sk***@pobox.com> wrote in
news:MP************************@msnews.microsoft.c om:
One More Try <jd@aol.com> wrote:
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?


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

Jul 21 '05 #5
"Cor Ligthert" <no************@planet.nl> wrote in
news:#C**************@TK2MSFTNGP12.phx.gbl:
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


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....
Jul 21 '05 #6
One More Try <jd@aol.com> wrote:
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)


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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #7
One More Try <jd@aol.com> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #8
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
Jul 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Richard Brown | last post by:
Ok, I've been looking through the .NET SDK docs and stuff. I'm wondering if you can provide a control extender that does generic validation or functionality just by dropping it on the form. For...
25
by: Lars | last post by:
Hi, I have a base class holding a generic list that needs to be accessed by both the base class and its subclasses. What is the best solution to this? I am fairly new to generics, but I am...
4
by: Charles Churchill | last post by:
I apologize if this question has been asked before, but after about half an hour of searching I haven't been able to find an answer online. My code is beloiw, with comments pertaining to my...
1
by: interX | last post by:
Hi I'm new in VC++ and have a question to generics. I have a generic class, which contains an array of the generic type. This array I can pin and then I would like to get an unmanaged pointer to...
1
by: Suds | last post by:
Hi, I'm having an issue with invoking a Generic method that takes Generic Arguments. My method signature is public void GenericMethodWithGenericArguments<E, V>(List<EtheFirstList,...
7
by: Dave | last post by:
I've got these declarations: public delegate void FormDisplayResultsDelegate<Type>(Type displayResultsValue); public FormDisplayResultsDelegate<stringdisplayMsgDelegate; instantiation:...
9
by: tadmill | last post by:
Is it possible to pass a generic parameter of the same class to to its constructor, where the "T" type passed in the constructor is different than the "T" type of the instanced class? ie, ...
4
by: Tony | last post by:
Hello! Below I have a complete working program.with some simple classes one of these is a generic class. The question is about this method GetCows() {...} which is a member in the generic...
15
by: Lloyd Dupont | last post by:
Don't mistake generic type for what you would like them to be!! IFoo<Ahas nothing in common with IFoo<B>! They are completely different type create dynamically at runtime. What you ask is a...
11
by: Scott Stark | last post by:
Hello, The code below represents a singly-linked list that accepts any type of object. You can see I'm represting the Data variable a System.Object. How would I update this code to use...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.