[quote] Howabout start a new topic on this? IMHO it’s relevant to games, given the number of times consider one or the other for doing online games here…
[/quote]
edit and;
So how do they compare? Java vs C#? How do Java games api’s stack up to managed DX 9?
I think they’re roughly on a par, performance-wise, and language-wise, there’s very little in it. DX9 is pretty much LWJGL or JO*L/Jinput, plus a ton of other stuff which is mostly not-so-useful. DX9 even has a CoCreateKitchenSink method
.NET and DX9 probably have a bigger deployment problem than java. When you have to download both, you’ll have a hard time with dial-up!
And of course no webstart…
I wonder if .NET has the same ‘JNI overhead’ problem though, and if I understand correctly, C# does have structs.
Oh, and does anybody know what the portability status is like nowadays? I understand there is MONO on Linux and Mac, but are they fully compatible? Of course there’s no DX on those, but does .NET perform as good on non-windows platforms?
Mono doesn’t have windows forms yet (I really don’t know what that means). Mono pushes gtk# so I think you’d have to use a gtk opengl widget. Maybe you can use sdl thru a wrapper of some sort. Good question.
C# is designed to be even more appealing to C/C++ programmers, but otherwise it and Java-the-language are very similar both in performance and functionality.
Java-the-platform and .NET are again very similar, the only real difference being in the way they are distributed - Microsoft can easily pimp .NET to people because it already controls distribution channels that can automatically install it unless the user says otherwise. Java-the-platform is still catching up here, although things are getting better all the time.
.NET versus MONO is a battle still to be fought. While the CLR is a “standard”, that doesn’t mean anyone can just copy it - Microsoft holds a massive patent portfolio relating to it, and I’m sure they could shut MONO down on a whim. Whether they’d want to or not is the question - does the availability of the CLR on UNIX platforms increase application sales more or less than it decreases sales of Windows licences?
The really big difference is the toolchain - Microsoft provide the entire toolchain for .NET applications, and by reputation they are usually very good. Apart from the compiler, the runtime and NetBeans, there is no such toolchain provided by Sun for Java, so the community is left to provide anything they want. Which of these processes is the better one is again a battle still to be fought, but my money’s on the community.
And as for APIs, it looks like Microsoft will be the dominant developer providing APIs for .NET developers. Sun again tend to take the community approach, which means we have a multitude of GUI toolkits, MVC web application frameworks, OO data access libraries etc. Again it’s a case of “who knows?” but again I think the community will outcode Microsoft.
I’ve used C# for a pretty big project. It was my first experience with C# and I don’t recommend jumping in with this much to handle at one time! In essence it was the following -
Simulation server (emulates a flight line)
Graphics server (talks to the simulation and draws whatever needs to be shown)
20 student consoles, talking to the server via UDP using .NETs remoting capabilities.
Loaded serialized objects from disk
Used a wrapper from C# to openGL
Used DirectX9 for audio
In my view, C# and Java are just brothers. C# is nearly a hijacking of the entire Java syntax, which makes switching between the two a tad confusing at times. After doing the above, I’d say lessons learned -
You know Java, you know C# (MS wants to ‘steal’ all the Java people)
Playing audio is much easier in C#. Of course that’s only true after you sort out the mess that is installing the DirectX9 SDK and getting the proper libraries for use on the DirectX9 runtime environment.
Never used RMI in Java, so I can’t compare the two. You can do A LOT of object serialization stuff via .NET.
The GUI toolset is what makes whipping out an APP in C# much easier. There is still alot of MS ‘sneaking around’ behind the scenes and marks in the code which say - No Touchy Touchy!
They are a bit dumb in that some things can’t be compared to NULL. I almost had a heartattack when I discovered this. There is also some issues with Time objects, but unless doing weird stuff like I was, you probably wouldn’t notice.
Its nice that the apps end up with an executable.
My personal take is that I’d rather do Java, even if its just because I hate MS. There is also a lot less Voodo when using Java. You pretty much have what you see in front of you. Once you enter the MS world of .NET and especially Visual Studio - beware! :o
Interesting to read some real world experience from a java developer.
I always have the feeling that .NET is more closed and proprietary than java. Sure, CLR and C# may be open standards, but I can’t look in the sources of MS’s implementation, or can I? I’ve always found that very nice and useful of Sun’s java.
[quote] Never used RMI in Java, so I can’t compare the two. You can do A LOT of object serialization stuff via .NET.
[/quote]
Creating a working client/server app using RMI is so easy, it’s not even funny ;D
erikD - You’re right about not seeing the source for the classes. The docs are ok, but having the source sometimes is a real benefit.
They have a thing built into the Visual Studio called Crystal Reports. I believe CR is its own standalone project as well. Either way I think its junk compared to Javadoc or DOxygen. The ‘reports’ it produces don’t even look like the online help stuff. At least with Java, Sun and all the ‘regular’ developers end up with the same look for their API documentation.
.NET didn’t seem to do as good a job at upgrades either. We had used 1.0 of the CLR and it wasn’t compatible with 1.1 for the object serialization. It had to do with security stuff. I’m sure there are similiar things in java, but I haven’t run across them in my personal experience.
The only thing the .NET environment might have over Java is the ability to be cross language. For example, a Visual Basic programmer can write some library, while the C# programmer does some graphics stuff. Either programmer can access the functions from the other language pretty easily. The reason is that both VB and C# compile down to the same byte code in essence. This can make larger projects easier as your whole team doesn’t have to know the same language and you can maximize the strengths of each one. Of course I think VB is for weenies, but thats a subject for another post.
Of course, MS never gets anything right first time - but they learn well from their mistakes and version 2 - despite being equally shoddy, buggy, and insecure - always ticks all the boxes to make it just enough better than the competition that it blows them out of the water.
Which is extremely powerful and seductive - like WORA on steroids. Despite a decade of working with MS tools, systems, apps and OS’s commercially and their corporate-level support (i.e. I know exactly how much pain any large MS deployment will cause you…), I’m still tempted by .NET just because of that x-lang development. Just think of all the time you’d save not having to write your own scripting languages!
They certainly know how to market… IBM’s been learning a few lessons from them there in the last decade, but Sun still seems to be at the bottom of the class :(.
[quote]I’m still tempted by .NET just because of that x-lang development. Just think of all the time you’d save not having to write your own scripting languages!
[/quote]
There is even a Cobol.net iirc. It would be cool if you could access the java gui tookits from scheme/lisp/pascal/basic/whateverlanguage that targeted the jvm.
I guess in reality jython, rhino, beanshell, and groovy do this by letting the user create instances of java classes.
To me the abundance of languages, tools, and libs available to application developers is bewildering.
Why doesn’t sun do the same thing and create a BASIC like language for the java platform, it could be almost exactly like java, except for different syntax. The source files could be compiled into java bytecodes. And It might even attract a large amount of new programmers to the java platform, which would be very good for sun. If they learn the java platform, they can more easily learn the java programming language.
[quote]Why doesn’t sun do the same thing and create a BASIC like language for the java platform, it could be almost exactly like java, except for different syntax.
[/quote]
So why bother?
Although neat, I think the usability of the cross language thing of .NET is a bit exaggerated. VB.NET, C#, J#, Delphi.NET, all those languages are pretty much the same, except for syntax.
When you have a team of developers, all of them developing in different languages is more like a burden than an accomplishment.
There are different languages for the JVM too (although admittedly, most of them are not really mature), yet nobody uses them and simply go for java. Why would you think that is? Why is almost nobody developing in JPython on the JVM?
My bet is that those languages are not marketed while the fact that .NET supports multiple languages is touted as one the great benefits of .NET. Other than that, I see no important technical reason.
And let’s not forget that MS just had to support multiple languages for .NET because they didn’t want to alienate all VB programmers out there for example (which they did anyway; VB.NET is a different language than VB, they only cleverly named them the same).
For example, Sun developing a C# compiler for the JVM would be mostly a marketing trick IMHO.
[quote]Why doesn’t sun do the same thing and create a BASIC like language for the java platform
[/quote]
Because Sun is a company that has never been able to show much vision or leadership for java - so much so that when I started java development, IBM had more people working on java in my UK lab than Sun did worldwide, and Sun didn’t seem to care - Sun was still treating it like a skunkworks project, whilst IBM was going “Hey, this is REALLY powerful - stop ****ing about and do something BIG with this!”. Can anyone remember Sun spending big money on anything since the Network Computer (which blew up in their faces)?
Sun has more than $6 billion (cash!) in the bank but won’t spend it. Why? (seriously, I’d like to know). Obviously, you don’t leave the cupboard bare, but you have to speculate to accumulate…
And then you look at how extra much money they could make out of a mere million dollars more thrown at java game development, and sometimes you just want to cry…it’s so depressing being tied to a platform when the platform vendor (as an organization) lacks the vision/leadership/willpower/manpower to push it at more than a mediocre pace. e.g. why the heck is the number of engineers working on java so low at Sun? Why is it currently taking > 9 weeks to even review bug reports? Because they’re not spending anywhere near enough cash on java? 3 years ago all I kept hearing on the corporate grapevine was how many more senior Sun staff were quitting the company, fed up for one reason or another :(. What about the engineers whose brilliant hard work is slowly being eroded by MS?
Contrast with MS: they have plenty of staff who SUCK at their jobs, yet their executives at least understand how to commit to a technology, and what their role is - so even though the people on the ground appear to be less smart than their counterparts at Sun, their product in the long run is likely to do better.
/me is fed up of Sun lazing about on the basis “oh, IBM and Oracle will do all the work with Java. Hehe that will save us some money! Let’s not bother.”
To small indie teams, it’s a neat feature they won’t use much.
To contract developers, it’s a huge great feature that enables them to pitch for contracts and use java in at least 10 times as many projects as they would otherwise.
To medium and large (>20 devs) developers it’s usually a huge saving in time and money, as well as enabling them to work effectively and efficiently with their heterogeneous legacy systems. I’ve seen plenty of organizations refuse to use java because it was so utterly crap at legacy-system interaction on the client side (nb: it is probably the best option for server-side heterogeneous legacy systems). MS’s trick seems to have been largely to realise that Java had already won the battle on the server, but that Sun was still stuck in the 1980’s and not really even trying to make the client do the same (when .NET started, java still wouldn’t even WORA very well).
…and except for the vast numbers of people who only know * one of those languages, usually the wrong one. And the vaster number of legacy systems using an old version of the first or last of those listed.
point taken that what they knew may not seem so similar to the .NET version once they get programming, but perception is 2/3 of reality ;).
For small teams, couldn’t agree more. But, for large teams - where the team will be divided into separate largely independent groups, with their own leader etc - it’s OK so long as the languages interact well. .NET is designed for this use case (since it describes the kind of customer who MS wants to make most of their sales to for the next decade).
To say nobody uses them is an outright fallacy. To only count the number of exclusive users of them is misleading: there are many people I know who have adopted Python or Java outright because Jython existed, and they knew they had a migration path to/from their original language, and wouldn’t be cast afloat having to re-learn a new language AND rewrite all their code.
Beanshell seems to have a huge userbase at the moment - sometimes it seems you can’t go anywhere without tripping over it. If it didn’t have it’s infamous loop-execution performance bug (that caused so much pain for survivor) then it would be wonderful.
I think you need to check some figures on who is using these things and why. Also to look at their age - Delphi is, I think, older than I am (!), whereas some of the jvm-languages are the same sort of age as JGO.
EDIT: that wasn’t intended to be patronising, although it sounds it on re-reading. I just meant that perhaps you were looking in slightly the wrong places to see the value of .NET.
I could really do with a Java BASIC IDE. It was one of my “serious” software considerations when I was thinking about Puppygames. But it’s a little too much work for one man to do without any money.
I wish I could blag $2m of VC from ChrisM to showcase Java games. You know we’d shine…
Precisely. I’m sure even just you and I between us could come up with 5 different things where a million dollars from Sun would have a good IRR (say, 60%) for a risk factor less than a quarter of what you’d normally expect for that IRR, doing Java a whole world of good into the bargain.
But then, I can make such claims with impunity, since it’s never going to happen, so I could never be proved wrong ;D :P.
[quote]EDIT: that wasn’t intended to be patronising, although it sounds it on re-reading. I just meant that perhaps you were looking in slightly the wrong places to see the value of .NET.
[/quote]
I didn’t read your post as patronising and you have some valid points. When I said that nobody uses non-java languages on a JVM, I knew I was being b/w but compared to the number of java programmers, the Jython devs are a small minority.
Having a choice of languages to interact is a nice feature but I still think only useful in just a few cases. In in many of those cases I think the reasons are mostly tactical and political so that more programmers can participate in certain projects (at least seemingly) and to attract more people to MS.NET.
Having Sun to introduce Basic to the JVM would IMO be not such a great idea. How many BASIC devs are there out there? (Discounting VB, VB being something wildly different IMO)
I’d rather see them stay focused on improving java and have other companies introduce other languages if there’s demand for it.
having many languages compiled down to same bytecode and being able to interact is a funny idea. As most funny idea, i think it turns to be the worst idea for industry, whatever industry you might think of.
Sure, being able to take programmers from any language, tune them to use the hacked versions of their.net sibling and make them all work on same projects might look like a good idea.
What happens when people that coded in weirdest languages leave the company? You’ll have to find people that will have the same competence. That might turn out to be a hard task, if not impossible as time goes by. Any of you ever worked in a big company where some old farts did retain information about legacy -and key factor- code? When those persons leave, you mostly go bankrupt or have to restart from scratch. simply because you can’t maintain, That will be the same, but in a shorter timeframe.
Me says that in a very few years, people that jumped to .net because of that ‘feature’ will learn that using one language is safer.
In a group large enough to really want or need multiple integrated languages you will never entirely lose all the devs for one sector except via a deliberate planned migration. To have all the language-knowledge concentrated in one or two irreplaceable people in one of those groups means that the project manager is irreprievably incompetent and should be blamed for everything :P.
IMHO your concerns are accurate for a small group - but then, I’ve been suggesting that a small group isn’t going to get much benefit anyway.
I do a lot of .net stuff in the day job- our company was certainly seduced from java to .net, particularly at a management level.
C# is a pleasure to use, but the many languages thing is annoying because clients keep saying “We have some vb developers and so we’d like you to use vb.net so they can maintain it ourselves.” Firstly, they are vb developers and vb.net is very different from vb. Secondly, they may as well maintain the C# stuff since the only differences between vb.net and C# are linguistic sugaring and thirdly they are vb developers so they won’t understand well written object oriented code if it came up and kicked them in the nuts, so why bother?
Things like Lisp.net might be interesting, but I don’t think the runtime is really capable of running languages that don’t behave like C#.
I haven’t really used the managed directX stuff- I downloaded the beta and it killed all my dx games and then couldn’t be uninstalled and they all got fixed by patches but the patches are rubbish because in many cases the kill the save games and so I got pissed off and gave up on managed direct X and on Jedi Knight 3…