Java vs .NET
CHaN_316 writes "Yahoo is running a story called 'Is Java Finished?' It provides a brief overview of the strengths and weaknesses of J2EE and contrasts them with .NET. Classic arguments are brought up like Java being great for portability while .NET ties you down to Microsoft products, etc. It's interesting that they bring up the Java Community Process, and how it is a rather slow moving procedure that is causing Java to become stagnant."
Of course we all know that we aren't tied to MS products with .NET! That's what the Mono project is for. I believe that having one standardized framework is an excellent concept. That way you can maintain one set of source files and portability issues are left to the developers of the framework. This is what Java is, but it runs on a virtual machine, and I think it's slow. I also hear that C# has a runtime environment. Any insight on that is much appreciated. But I still think that compiled source is the best, just one framework for writing applications would be nice.
Check out SWT for a better Java GUI option.
SWT
Fast, easy to understand if you already understand AWT or Swing. Not perfect, but what is?
Eclipse is very nice. Maybe have a look at the NetBeans thing from Sun. It's forte, but it seems to run faster (for me at least).
Both written in Java -> RH9 applicable.
I hate to suggest it, but a lot of people also like BlueJ. I can't stand it, but it's your choice.
>>>".Net only works on Microsoft"
Somewhat incorrect. The MS.NET runtime is Microsoft's implementation of the CLR/CLI specification which is owned by ECMA. The Mono project is an example of a development effort to put together another implementation of the CLR specifically targeted at *nix OS's.
Now that doesn't mean that ANYONE at all (other than MS) is going to actually build and deploy an implementation of the spec.
I know you're trolling but, How is java related open sourced? I can not get the javac.exe source code.
Please follow along carefully:
1) Go to http://java.sun.com.
2) Click the button labelled "J2SE - Core Java Software". It's the big blue button in the middle.
3) On the next page, click "Source Licensing". It's in the links on the left-hand side of the page.
4) On the Source Licensing page, click "Download".
5) Follow the directions to download the entire J2SDK source code.
Now, what was that about the source code not being available?
ZFS: because love is never having to say fsck
http://www.microsoft.com/mobile/smartphone/
blam... I wonder what kind of java developper you are to even argue about java portability. Java IS portable. You can just download tomcat binaries and KNOW it will work on any OS with the proper jre.... I'm developping java applications for AIX, DIGITAL UNIX, Tru64, Solaris, LINUX I'm doing this on Netbeans (a java ide) on windows and executing them on their target os without any problem. So stop talking of what you don't know trying to be funny...
Most good apps have no trouble crossing platforms. The only major sticking point is Swing or (especially) AWT, which are implemented with varying degrees of quality across platforms.
In most cases it's not the quality of the implementation that makes Swing/AWT a "sticking point". This problem will occur with ANY environment that tries to be platform independent and do anything outside of its VM (like draw things on the screen).
Why? Because there is no 1-to-1 mapping between the event models of different platforms. If you stay inside the VM, yes, you can be completely platform independent. But once you want to do something useful like, oh I don't know, actually interact with the user, you must enter into the event model of the host operating system. Reading mouse clicks. Drawing windows. Responding to system events, etc.
So any environment that claims to be platform independent and present a unified language/API to programmers has to invent its own event model, and somehow map it to the event models of all the target systems as best it can. Since there is no 1-to-1 mapping between the event models of all the OSes it wants to support, the best it can do is an approximation. It will ALWAYS break down somewhere. The irritating thing about Java is that you don't know where. Most Java apps with GUIs are simple enough that you never really encounter a problem like this, but try to make something complex enough with a GUI that interacts with the user in all sorts of interesting ways and eventually you'll come up against these kinds of problems.
This explains more than anything why Java has thrived as a server-side environment.. because for the most part such applications don't interact with the user and can (usually) avoid these problems.
Microsoft of course won't have this problem because they don't have to dream up an API and event model that is all things to all OSes. They can pander to Windows and if it causes problems and ugly approximations on other OSes then they're not going to lose any sleep over it.
> On the other hand, there's no such thing as
> embedded dot Net just yet.
Then what the hell is this supposed to be?
You've got your runtimes mixed up.
The Dotnet runtime consists of approximately 1200 classes, including Windows Forms, ASP.NET etc.
The CLR/CLI standard only covers core language-related classes - approx 120 in all.
Dotnet is therefore mostly proprietary and there is no spec. to implement. Mono is having to reverse-engineer, with dubious consequences.
Granted, you don't give up much portability if you write in C++, provided you know how to write portable code. (Don't use system-specific API's, or if you do, at least wrap them in another layer...).
And then there's the problem of Java not supporting the feature set of embedded devices. Is there really a setToastTimer method in Java? So I guess if was to use Java to write an app for my toaster, I'd have to settle for something that couldn't use the key functionality of the device?
Quite frankly, due to the specialized nature of embedded devices, portability is pretty much a moot issue. You do need to access the platform-specific features. Yes, I suppose if you like playing tic-tac-toe on a cell phone you'd write in Java. But the chances that you'll be able to write program in Java which utilizes a cell phone's camera and microphone as a realtime video recorder are pretty small. Any software that's non-trivial will need to access the device-specific features.
Java versus .NET is becoming a ubiquitous topic. It's been the subject of debate since .NET beta 1. Microsoft and Sun both have "independent" studies conducted to prove that their platform (J2EE/.NET) is better and both have convincing arguments. There is no perfect language or platform to solve every programming problem - sometimes it's C++, sometimes it's Python, sometimes it's something else - it really depends on the problem.
It's no secret that one reason Microsoft created C# is to compete directly with Java. It's pure ignorance to say that C# is proprietary and that you're locked-in to Windows. C# and the CLI (.NET) is an approved ECMA standard. This is something SUN was unwilling to do with Java. For this reason, in a sense, Java remains far more proprietary than C#. It's too early in C#'s life to say that it won't be ported to other platforms - look at Mono. There is a lot of FUD being disseminated about "Microsof is going to sue Ximian, et al. for Mono" blah,blah,blah. That's not going to happen. Microsoft has already released the source code to the CLI with one intention of "People developing their own CLI implementations will find the Shared Source CLI an indispensable guide and adjunct to the ECMA standards.". So, for the argument that C# and the CLI are proprietary and one is bound to Windows is just plain ridiculous.
Syntactically, C# and Java are extremely similar. They both derive from C++. Structurally, they are very similar as well. They are both OO languages, everything is a class, etc. Side-by-side they look very similar. There are numerous small details which make C# "friendlier" than Java, ie. C# has no requirement that the file be named after the class. However, C# has a lot of other advantages over Java. C# can make use of pointers. Java has no option on parameter passing - Objects are passed by reference, value types are passed by value. While C# has the same limit on objects, you are able to use pointers and it also supports boxing. C# supports operator overloading as well. On the merits of the languages alone, C# is stronger than Java. It should be expected since it was developed from scratch nearly 7 years after Java arrived.
As far as performance, Java leaves a lot to be desired. I won't belabor this issue. If you'd like a demonstration of the difference between the run-time execution of .NET vs Java, pick your favorite VM and run Forte, then run Visual Studio .NET (it's written in C#) and decide for yourself. Java run-time performance alone is enough to dissuade some developers.
Java does come as close to a RAD language as can be. Java applications can be developed quickly with far fewer bugs and errors as a comparable C/C++ application with the benefit of garbage collection as well. For this Java gets an "A". It greatly simplifies the process of rapidly developing database and other applications.
Is Java going away? Hardly. But like it or not, C# and the CLI are here to stay as well. It's only a matter of time before the CLI is ported to other platforms and environments just like the JVM.
If you do what you always did, you get what you always got.
My favorite tool for the integration is JuggerNET, which transparently starts up a JVM in the CLR process and the developer simply codes against generated .NET classes. I am affiliated with Codemesh, so I'm somewhat biased (take a look at Stu Halloway's great website for alternatives) but working with both platforms for a living, I just can't get excited about controversial this or that is dying statements. Both platforms have their strong and their weak points.
I love the platform portability of Java, but I think Java is too closed in terns of language integration. Doing JNI by hand is an abomination, and most people at Sun admit it.
I love the language portability of .NET (it's not perfect, but then, neither is Java's platform portability) but I hate the exception model.
So, there you have it. Neither will kill each other, they will just coexist uncomfortably until they both get replaced with something new.
psxndc
The emacs religion: to be saved, control excess.
Um, define bloated.
.NET 2003 IDE takes up 17 meg of disc space. With 20 projects open, and debugging it's eating 80 meg of memory. It uses 0 processor time in idle mode, less than 1% when typing, less than 20% when searching with regular expressions. It doesn't peg the CPU when compiling. Starting it up, and reading all of my files, takes 20 seconds. Starting a brand new project takes 3 or 4.
The
On this same machine, NetBeans takes over 70 meg of space, 180 meg of memory for only 10 classes, pegs the cpu if you stare at it hard enough, and it just slow as hell. Starting it can take close to a minute.
Please don't compare Studio 6, a piece of crap, and VB3, which is so old that it shits doilies, with a modern on-demand IDE liek Studio.NET. When I did Java, I used to use textpad for the bredth of my typing and editing because the IDE was so slow. Now I do it all in Studio. It's just better.
Hey freaks: now you're ju
When I encounter a problem, I can submit a bug report at developer.java.sun.com. Of course, I would first search the bug database to see if the bug has already been reported. Some bugs have sat around for a long time without getting attention, but for each of those, a hundred have been fixed. At least two of the bugs I reported have been fixed.
If there is a public C# or VB bug database, I have not heard of it.
Oh, and the JDK comes with the source to all of Java's classes, and I believe even the native (C) source code is available somewhere. You shouldn't ever need it, but it's there just in case.
The Internet is full. Go away.
JBuilder is at version 9, so it couldn't have been that recently. A lot has changed since then.
Regardless, you're probably still better off using something free like eclipse, which has become a great ide, or if you feel like paying, I agree with the other person that suggested IntelliJ. The only argument for JBuilder is that they include the optimizeit suite for free now and you get some other libraries that you might not get elsewhere. Eclipse's IDE is pretty good though and comparable.
The IDE support in my opinion is fine for both languages, it's just the language itself. I think 1.5 will make a difference though. I still agree with the other poster that SWING needs an overhaul. Other than that, it's a good language.
Just use whatever works for that particular project. None of the languages are the best solution all the time.
#1) Java was NOT originally developed for embedded systems.
I think you might be mistaken here.
Before the language was called 'Java', it was called 'Oak'. It was a language for building embedded applications on smart consumer electronics. However, Oak was way ahead of its time in terms of product targeting.
I've been using JBuilder9 on a pIV 1.2g with 1 gig and never had a problem. Visual Designer, Refactoring, Visual EJB Design, ANT support (including writing a lot of the Ant script for you), Webservices support. It does more than touch VS... read on0 0.as p0 .as p0 .as p
http://www.eweek.com/article2/0,4149,1115160,
http://www.pcmag.com/article2/0,4149,1191813,0
http://www.pcmag.com/article2/0,4149,1191819,0
This Yahoo article is just more typical Microsoft propoganda....... Java today is way ahead of .NET. Java has more than 250 million users, There is more Java chips sold then x86 chips last year. Most of the big .NET claims are MS shops switching over VB .NET.
On the otherhand there is some ease of development issues. But these problems are being solved by Eclipse and Sun's recent involvement.
I fear nobody has mentioned the simple yet profound fact that will drive many towards .NET & Java/J2EE. It's Linux! It's free, it's stable, it's secure (relative to MS OS's). Put it together with Apache Open Source products such as Tomcat & Apache httpd, or JBoss if you are into EJBs and you can't go wrong.
.NET and Java/J2EE more irrelevant than most will admit. They are both very well designed development languages, and can accomplish most projects in a similar amount of time, with similar numbers of developers.
.NET add-in dev libraries aren't available, they just aren't provided in an FREE manner as frequently as they are in the Java world.
I feel that the technical debate between
Just one problem, most businesses wish to make $$$, and if you haven't noticed the tech sector barely able to keep it's head above water right now. Thus, all things equal I'd bet most businesses will probably opt for a Java (or J2EE)/Linux solution as the overall price can't be beat, and you don't have to waste you development time creating valueless libraries that others must have had to create already. Not to say
Anyhow, my 2 cents.
One question: did you write this application in java? I can't imagine what you described happening in Java with JDBC. I've worked on numerous databases and though they have subtle incompatibilties, they are usually not a big hassle to work around.
.net, if there's a fatal flaw in the implementation, that's it, you are screwed. No othe vendor can help you.
Also, it seems that your development strategy here was flawed. You write a whole compatibility layer before testing it at all? Why didn't you go through and write some test code and just make sure some things worked before doing the whole thing and finding you had a problem?
What Java brings you is the immense potential for agility. You don't have to plan for agility, it just comes with it. When you decide that you want to change platforms, make a few tweaks, do some intensive testing, and blammo, new platform. With
As for people being locked into wintel, as long as there are web browsers, there's no such thing as lock in. When your clients eventually decide that they are sick of viruses, and licensing extortion, they'll be thankful that your system provides the flexibility to get them out of that mess.
Openess is never a setback for writing good software. Precisely the opposite in fact. Openess allows you to be flexible and adjust for changing market conditions, software bugs, etc.
For example I wrote a system using a 3rd party data abstraction layer. Now, what you are professing suggests that I just write to that layer. Instead I wrote wrappers that could work with any abstraction layer. It turned out that this abstraction layer was buggy as hell. After another week of work, I had implemented an entirely different layer that worked much better. If I had not written an abstraction to maintain that openess, I'd still be rewriting code.
This sig has been temporarily disconnected or is no longer in service
"The adoption of Java was based on Web development"
.NET dirty little secret of: if you want to do anything meaningful you still have to use COM/COM+) .NET is neither.
What? Adoption of Java is based on platform portability and scalable distributed enterprise computing. (With the
Pish-tosh. Now, the adoption of Perl WAS based on web development.
*ducks*
I have a second sig, I call it sig#2.
> How many IDE's are there to develop .net applications? One.
Actually, there are 3 that I know of:
- VS.NET (MS)
- Sharp Develop (free)
- C# Builder (Borland)
and more coming (Delphi 8).
Dan
I recently posted a series of entries on the relative strengths of Java vs. .NET and make some suggestions on how Java might avoid being crushed by .NET.
If I could mod you up, I would. Just today, I attempted to rename the project namespace for a .NET application. It took me about two hours to get everything fixed, the namespace is tied to the directory, and therefore references get hidden in various non-class files. The hidden references may not be necessary to straight programming, notepad/editplus style, but when they are wrong, they break the debugger in VS.NET.
If VS.NET had a good way to rename classes and namespaces, it would be a Godsend. Sometimes, you just realize that you were stupid in naming a class what you did, and that it would be so much more clear if it had a different name. I've worked with Eclipse refactoring, and I remember the first time... my jaw dropped, and I was like "This is fucking awesome!"
Refactoring is an excellent tool that should not be ignored, and is definitely not replaced by code outlining/regions. Those, OTOH, are really good for getting an overview of your code, and instant grokking after not touching for 5 months.
You need to restart your computer. Hold down the Power button for several seconds or press the Restart button.
Hi.
.NET runtime, and the user needs to regasm your managed dll for COM interop.
I work in the developer tools division at Microsoft. Current plans say that my team will be supporting VB6 until the year 2012, longer than any other Microsoft product, and a notable rare exception to the stanard 7years-post-FCS policy that we just adopted.
VB is the most widely sold microsoft development product. AFAIK, It's got more users than the rest of Visual Studio combined. It is the bread and butter of millions of programmers out there.
VB6 isn't going anywhere because there is lots of legacy code out there, and lots of satisfied customers.
I have written several new applications with VB6, even though I was using VB.NET since before you had any idea it would ever exist and prefer it in generally all ways to VB6. I decided to use VB6 because the component would only be called via cscript.exe using COM latebinding. Making a COM DLL in VB6 is free, doing it in Managed code requires checking a box in your project, but the deployment scenario requires the
My team internally developed a major peice of VB6 code over the period of several years. It was re-written from scratch in VB.NET in several months, and roughly 1/3rd to 1/2 the lines of code. It's certainly faster and less awkward to refactor, as well.
In summary
1) VB6 was great, but VB.NET is better for almost everything
2) VB6 has a huge installed base and is incredibly critical to microsoft's target development audience. As much as we sometimes want to, we cant just "shut it off".
3) As someone who ported over 500 small VB programs to VB.NET _before_ there was the in-box migration tool, I feel qualified to speak on the portability and learning curve issues. Yes, there are issues, but going from VB6 -> VB.NET is less obtuse than going from say, VB -> Java.
4) As long as windows executes native Win32 PE executables (even via WOW64), VB6 isn't "dead". Apps will continue to work, and the same VB6 compiler will continue to run.
6) VB6 first shipped in 1998 on NT4. It has been tested against every subsequent Microsoft OS. I am friends with the people that do this testing. W2k3 wasn't allowed to ship until we verified that thousands of scenarios ran on it identically to how they ran in 1998.
My opinions are my own, and do not necessarily represent those of my employer.
Oh, I think you missed the Custom Control. What you want to do is go to Project, add new item, and then choose "Custom Control" from the dialog that pops up. Easy to miss if you are new to .NET
If you need to create a composite control (i.e. a control, you choose the user control.
You also have the option of simply inheriting from a TextBox or a Button for the simplier options, of course.