GNU Christmas Gift: Free Eclipse
Mark Wielaard writes "Your friendly neighbourhood GNU did
it again. A year ago IBM made much noise
about placing $40 million of its software tools under a free software
license. Technically these tools, called Eclipse, are great for developing
(java) software. There was only one catch, it was build on top of the
proprietary java platform. This made it useless for the Free
Software community. Luckily the GNU project has two projects that come
to the rescue. GNU
Classpath, core libraries for java, and gcj, the GNU Compiler for Java.
We are now able to run Eclipse on a completely free platform! It is
not yet complete, but you can already edit, compile and browse CVS
with it. And since Eclipse uses GTK+ it also looks very nice. I setup
a page with
instructions on how to get this working so you can help us make
it work even better or just so you can view a couple of nice screenshots."
... that Eclipse is getting more "air time" on Slashdot. It's an outstanding IDE in its own right; the tools used to build it that you can use yourself (like SWT) are mere icing on the cake.
"Times have not become more violent. They have just become more televised."
-Marilyn Manson
I wish sun would just open up the java libraries, that would make open source java developement even easier.
X(7): A program for managing terminal windows. See also screen(1).
A development tool that is built upon a non-open architecture is "useless" for the free software community? But a sort-of-working substitution remedies the problem?
Hmm.
This is great. Hopefully Microsoft will succesfully be forced to integrate Java. The combination could help Java smother .net
FoundNews.com - get paid to blog.,
People authoritively claim that Microsoft will use patents to kill these efforts if they become competitive, but there is no evidence to support this paranoia, and in-fact Microsoft does not have a histroy of abusing patents in this manner (unlike another company I could mention).
I am not sure I understand the "Not Quite Ready" comment. I have been using Eclipse as my main IDE for nearly a year and I love it. Eclipse is just the framework to build the IDE you desire. Eclipse is complete, there are just some pluggins that aren't ready yet, however they are comming along very fast. Just last night I started using the Lomboz J2EE pluggin and so far I have been pretty impressed. http://www.objectlearn.com/ Also, I get all my plugins from: http://eclipse-plugins.2y.net/eclipse/ I might not be up on all the politics of programming, but I know I didn't pay for Eclipse and no one has asked me for anything to use it. So it appears pretty damn free to me. I recommend Eclipse to everyone.
As someone who has written several Swing based applications, I can say that Java sorely needs this kind of a shot in the arm for the client-side to be even remotely feasible.
Up to this point, Sun has ignored the client-side, and rightly so. Because Microsoft and MFC rules on the client side (on Win32). Sun exploited the server-side breach that Microsoft had ignored.
But now, Java needs to become a viable alternative to C++ based programming on the client-side. And the only way this is going to happen is for Java to have some kind of a native GUI presence on each platform it runs on. This is where IBM and the SWT libraries come in.
Currently, the SWT libraries are still immature. The Eclipse platform itself is still immature. But they will get better and better. I predict that the SWT libraries will not only get quite expansive... but include things other than GUI widgets/toolkits.
If IBM plays their cards right (and so far they have)... I can see them actually introducing more Java extension libraries for other things that Sun did a terrible job on. Collections. Better native threading model. Better I/O model. The list goes on and on.
Personally, I would have no problem with writing a Java application that only imported IBM extension libraries. As long as they were well-written, and performed well.
Sun really needs to get on the ball here. The time has come to open-source Java. Let the developers do with the language what needs to be done to bring it to the next level.
Otherwise... companies like IBM are going to do it anyways. Just using extension libraries. If Microsoft was smart, they'd have done five years ago what IBM is doing now. Microsoft would own Java on the client-side if they would have played it right.
Well, why do you use Emacs instead of vi? Or ed? Or writing to disk using very, very small magnets?
War is one of the most horrible things a human can be exposed to. And one of the worlds largest industries.
Why is there a big deal about this, other than the promise by IBM and making good that promise? Anjuta DevStudio, which is one of the best GUI IDE's on Linux IMHO, supports Java. I personally havean't gotten into Java, so I could care less about this, but Anjuta is fully GPL'd already.
-- DuckWing
I think that the Java libraries will be very difficult to control fully by Sun, because they do not have IBM and Oracle to push around. IBM will absolutely not be backed into a corner by one of their main competitors in hardware, Sun. Because of that, I'm not worried about the Java APIs turning into a controlled arena, as Microsoft has done with Windows.
Basically, I think the effort of the Open Source community, of those that like Java, would be much pretty spent on making GCJ integrate seemlessly with a compliant Java VM using JNI. GCJ could used to make a just-of-time optimizer. With C# and dotNet, I think there's an ahead-of-time compiler instead of a just-in-time compiler that can optimize the byte code for the target machine. Using GCJ/GCC, one could get that sort of performance boost, almost for free, if it were plugged into a compliant Java VM, meaning that it could integrate with DLL/DSOs using the Java Native Interface.
Anyway, I, for one, would probably not waste my time using a slightly out-of-date API, on a slightly behind-the-curve VM or compiler. (BTW, I'm a heavy user of emacs, perl, mozilla, etc.) The java API, language and VM still has a LOT of room for improvement. I hope developers would rather innovate and improve the java standard than to fork off a clone.
Sorry guys, but this is seriously old news.. You can't call this a Christmass gift or anything. Our company's been using it for a year already (with a free license) and I personally have developed couple of plugins for it.
Nevertheless, this is the best tool I've used, and really, thanks IBM for doing such a great and generous job. My point is - this is not really news, and have nothing to do with Christmass.
Cheers.
http://dtum.livejournal.com
Eclipse is an IDE without all the crap you usually associate with an IDE. JDE isn't bad, but it's nothing like Eclipse. Eclipse's debugging support in particular is way better than JDEs (which took me some hours to configure properly). Not to mention that Eclipse let's you do really neat things, like stop the debugger right before an exception was thrown, fix the bug, and continue with the debugging as if nothing had happened!
IBM was the one who released Eclipse source. GNU and certainly not that wacko crackpot RMS had nothing to do with it. Very misleading topic!!
Whoa! Whoa! and Whoa! there buddy. Speaking of crackpots, you've been smoking from yours a little too heavily.
This post has nothing to do with the fine work the folks at IBM have done on Eclipse. That's old news.
This article is about the GNU components that have been released to allow Eclipse to run with all Free components.
I know it's trendy to bash RMS, and the Slashdot editors, but let's save that for when they are actually doing stupid stuff.
Ok, because, we don't agree with your stance we're zealots now? Whatever happened to free software advocates?
I have lots of doubts with .NET because it's from Microsoft. I don't think my concerns are unfounded. They've done enough in the past, now they arouse my suspicion just by them twitching.
How many times does a person have to screw you over before you stop trusting them? Similarly how many times does a company have to resort to shady tactics before you decide that it's probably in their corporate culture to do so.
My arguements against .NET are not technical, other than I don't think it brings enough to the table to warrant much of interest. It's mostly that sooner or later MS will find a way to screw open source interest with it.
Based on upvotes, Ageism is the only "-ism" Slashdotters care about and think isn't SJW
What's the difference between using GCC to compile ones Java apps, and using GCJ?
C - A language that combines the speed of assembly with the ease of use of assembly.
If you define the "Free Software community" as the zealotous 5% of free software users who refuse to use software that hasn't been blessed by RMS, you're right.
For the rest of us, Eclipse has been useful (and free and open source) for over a year.
Not to mention that Eclipse let's you do really neat things, like stop the debugger right before an exception was thrown, fix the bug, and continue with the debugging as if nothing had happened!
Heck, even Visual Basic has this. I got used to it, and I've been disappointed that I couldn't get it elsewhere. It's quite nice.
"There was only one catch, it was build on top of the proprietary java platform. This made it useless for the Free Software community."
There is plenty of java code that has been released under the GPL and BSD licenses. The only way that java would be useless to someone is if they turned their nose up at it. Turning one's nose up at something for non-technical reasons is usually a bad idea.
Lee
Muslim community leaders warn of backlash from tomorrow morning's terrorist attack.
"Could one, for instance, now compile a Java program using the SWT library to a native binary using GCJ, so it could be run without using a JVM?"
n apshot.tar.gz
Yes, absolutely. Get ftp://sources.redhat.com/pub/rhug/swt-gcj-green-s
Run configure/make/make install, and you'll en up with lib-org-eclipse-swt.so.
People are also building for Win32 using gcj for Windows (or a cross compiler from Linux)
AG
I've been following both of these projects for years.
The point that so many have missed is that this shows how close the GNU implementations are to be being a complete JDK replacement. Eclipse is a very complex beast that uses nearly all of the Java APIs. This achievement shows the quality of the years of work that has gone into these free projects. All of this work is now finally ready to pay off.
Congratulations to the whole ClassPath and GCJ teams!
-Avery Regier
I predict that the SWT libraries will not only get quite expansive... but include things other than GUI widgets/toolkits
;)
SWT library already does include GUI widgets/toolkit.
You are right though, saying that it is immature. We've been doing some serious development on SWT trying to convert full featured application from AWT to SWT. So far it's been going great.
However, here's a warning for all of you Java developers: there's quite a few things you still can't do. All Table work is a terrible hassle, there's no easy way of changing colors in single table cells and table functionality is very, very limited. We were able to improve some of that, but that actually ment implementing our own widgets for table. Anyways, it is pretty bad. Hopefully in 2.2 version (next year) they will solve some of the problems.
If anyone from Eclipse development community is reading, please, focus more not on the new features (cheat lists, wizards and stuff), but try to actually make SWT a reacher platform, there's a lot of work that needs to be done.
At the end, I wanted to summarize my opinion of SWT, which is not really what this topic is about. But here it goes: it is a great platform and a great concept (using native libraries and not drawing everything like Swing does). And you are correct - this will/could be Java's savior on the client. But anyone who would want to write a serious application in SWT should think twice before that, wheigh down all pros/cons and also try writing a prototype to make sure that it you can implement anything that you want.
One of the biggest innovations of SWT is a library called JFace, which hides a lot of basic/low level GUI functionality under an interface that is sort of a Model-View-Controller framework. This idea is brilliant, and this framework is just a pleasure to work with.
Anyways, enough with the rambling.. Happy Christmass, everybody!
http://dtum.livejournal.com
Could one, for instance, now compile a Java program using the SWT library to a native binary using GCJ, so it could be run without using a JVM?
Yes.
SWT takes a middle ground between the extremes of AWT and Swing, and abandons a sacred cow of Sun's- the idea that the same binary must run on all platforms without any modifications. This attitude has really been an albatross around Java's neck and is the reason everyone thinks that Java applications have to be cheesy- because Sun demands that they must be equally cheesy everywhere!
AWT takes the approach that ALL widgets are drawn by the native layer. This isn't a bad idea, except that if no native widget is available (like a slider, or tree), AWT refuses to improvise one at the Java level. This is why there are no sliders or trees in AWT, even on platforms like Windows where native widgets for both are present, because there's some platform out there somewhere that doesn't have them. Maybe AIX or something, who knows. AWT is strictly lowest-common-denominator and that's why everyone hates it.
People bitched and moaned. So Sun went straight to the opposite extreme with Swing, which refuses to even consider the native widgets. Instead, it uses Java level methods to draw pictures of them to fool you. This means that Swing can offer you a "pluggable look and feel", so you can have Motif buttons on Windows, or "Metal" buttons on the Mac! Except nobody cares. Microsoft promptly kicked Swing in the nuts by introducing skins with XP, so it becomes obvious what is really Windows and what is pretending to look like Windows but can't keep up. And Swing suffers greatly from the second system effect- it's overengineered as hell. A Hello World in Swing gobbles up 20 MB of overhead- mostly classes loading and initializing themselves. In fact, Swing is why AWT is still alive. AWT sucks, but you can run a program that lasts for more than a couple minutes with it. Writing stable applications with Swing is a real art. (It is in AWT too, but only because Sun has pretty much left AWT flapping in the wind with minimal improvements, maintenance, or bug fixes. Since Swing came along, AWT has been treated like a red-headed stepchild by Sun.)
SWT is much more like AWT than Swing, except that it takes a practical middle ground- something Sun doesn't seem capable of doing at all! It offers you a nice set of native widgets. If a slider or a tree isn't available on some platform, they draw a picture of one for you. This might make sliders and trees look funny on platforms that lack sliders and trees, but you would expect things to look funny on those platforms. People using Windows (i.e. most of them) aren't bothered by any of this.
This sacrifices binary compatibility. Each platform has its own version of the SWT library. For example, there is a Windows specific swt.jar and a swt.dll that goes with it, and there is a Solaris version of swt.jar and a native swt.so library that it uses. Even though the libraries are implemented completely differently, the public interfaces are the same. So if you develop a program against the Windows version of the SWT library, you won't have any problem compiling against the Linux version. (Although I've heard that SWT blows on Linux, but that was a while ago and I don't know what the current state is.)
SWT doesn't abstract much away from you, unlike AWT, where you are separated from the low level GUI details by a leaky abstraction. In SWT you have to write the frigging event loop yourself! (Which is not a big deal- it's a while loop, usually two lines.) There are a few other gotchas, and you absolutely have to test a SWT program on all platforms you're releasing for, but in practical terms the same was always true for AWT because of the leakiness of its abstraction. SWT at least doesn't pretend that you don't have to worry about this stuff.
This means you have to compile and test a program three times before releasing it, once for Windows, once for Linux, once for Mac. This violates Sun's sacred cow of binary compatibility. But when you're releasing a Java application, you're going to make separate installers for each platform anyway, because you have to bundle a JVM for everybody. So it's not really a big deal, unless you're writing an applet- and applets went the way of the dodo long ago in no small part because of AWT and Swing!
With SWT, you can make really nice, professional looking programs. The layer between you and the OS is very thin (JNI). If your program looks silly or stupid, it's YOUR fault. When the user changes the skin in XP, your SWT programs will pick up the change right away. In fact, it isn't even obvious that you're not using C! You can write your stuff in Java and actually get away with it! So that's why I think SWT is the future (if there is any future left anymore) of Java on the client, and why I will be junking AWT/Swing completely when starting new projects.
For more info see the SWT FAQ. There is some GCJ and SWT info available here.
1) SWT seems like a cool idea, but with its close coupling to Windows (Windows is the farthest along -- the other bindings seem to be "under construction"), how is this different than (gasp, choke, gag) J++? 2) Can someone point me at how to get started in Eclipse? The menu and dialogs seem completely non-standard -- where do I begin with this thing?
I guess not many people have looked at J++, but if you have a chance, you will come away with a strong, strong sense of deja vu with regard to Visual Studio .NET.
I've written quite a few Swing & server-side applications myself.
.NET. And Visual Basic rules on the client Win32 side, and has for quite some time.
.NET first. WinForms.NET is effectively the next iteration of what was out in Visual J++ 6.0's WFC libraries.
"Microsoft and MFC rules on the client side (on Win32)".
MFC is dead, long live
"But now, Java needs to become a viable alternative to C++ based programming on the client-side."
Absolutely not. Java's only main competitor for Win32 client-side supremacy is VB.NET and C#.NET. C++/MFC is a dead-end.
On UNIX, I would suggest it's a toss-up between C++/Qt and C/GTK, and IMHO I think Java's more productive than either (though pre-1.4 X-windows Swing performance was unacceptable).
Sadly, this doesn't seem to be a battle that Java will win on Win32, even with SWT, for a couple of reasons. Microsoft has the industry's talent in developing high-performance Win32 GUI framewords, which will come out for
They also have the tools support with Visual Studio. The Java world currently has only *ONE* usable GUI building tool -- JBuilder. And that's not saying much. Eclipse won't have one for some time. The second major problem with Swing (besides performance) was this lack of tools support. I don't forsee a groundswell of tools support for SWT from multiple vendors.
Thirdly, there isn't a whole lot of impetus behind client-side "thick" GUIs in the industry. I don't foresee IBM throwing lots of money at making SWT general-use... the open source community will probably assist in this area, but I'm somewhat skeptical about how much adoption this will generate.
On the bright side, I'm not sure it really "matters". Windows peeps will write stuff with VB like they've always done, the C++'ers will switch to C# (they've really not much choice -- I worked at an MS shop as the Java junkie for 2 years, most C++/Windows programmers there took what MS has given them... there's a lot of shock and dismay when Borland/OWL is on one's resume). The 2nd most widely used GUI framework family will be (gasp) Carbon/Cocoa on Mac OS X. ANd rounding out the list, *nix peeps will continue head-butting between Qt and GTK+ (both of which are still gawdawfully ugly IMHO, quite apparent actually if you run a GTK+ app side-by-side with a Mac OS X application. But I digress).
"I can see them actually introducing more Java extension libraries for other things that Sun did a terrible job on. Collections. Better native threading model. Better I/O model. The list goes on and on."
Whoa, whoa! I disagree with each one of these. We are talking about J2SE 1.4, are we not? I'm quite happy with the collections framework (and I compare this to both stdc++ and the Smalltalk collections library), the java.nio.* package is very sophisticated, and IMHO the threading model is a matter of taste, not stemming from any particular technical disadvantage.
-Stu
I thought they were giving me a car :(
.cig - what you do after winning a good flame war
The GNU folks had no hope of recreating a cleanroom AWT and Swing - it was just too bloody big and complicated. It would have taken at least 4 years to create a cleanroom Swing. Then along comes Eclipse/SWT which did all the hard bits for them in C. The result - a portable and very fast Java GUI. Now folks have a very good reason to work on GCJ because they can finally see some concrete results. Success breeds further success. .exe if you will) is a HUGE advantage for distributing applications. That 20 meg JRE is a complete pain in the butt for a client to download. It's much better to simply run a 5 megabyte GCJ-compiled application.
Compiling your application to a single binary (or
Java doesn't suck. Java's GUIs need not be slow. It was Swing that sucked. Finally people realize where to lay blame.
Sun - get rid of Swing once and for all! Swing is a poorly designed GUI tookit and a complete embarassment to Java.
So another GNU team has almost managed to replicate the work done by the Blackdown team 4-5 years ago.
Meanwhile the GNU team has almost managed to release a kernel.
On the sidelines, Wine has almost enabled cross-platform execution, provided you don't want to do something so uncommon as opening a file picker!!! (I mean, come on! I can play video games, but I can't pick an input file to open with a utility program?)
Lately I see a lot of "almost" me-too projects, but I'd be a lot more impressed if they didn't start celebrating until the damned things worked.
Eclipse is free and pretty nice (need to try it again -- it was rough when I first looked almost a year ago.) Sun's SunONE Studio 4 is ok, too.
My favourite remains JBuilder, but I just can't afford to upgrade anymore (paid full price for 3.0, paid for the 3.5 upgrade, the 4.0 upgrade, and realized I'd spent over $2000 with no end in site.)
Despite all the fancy IDEs out there, I still do the bulk of my editing with vi(m), emacs, and text tools, then debug and fix in an IDE. I've yet to find a Java (or C++) IDE whose editor is more than barely usable. But that is another rant...
I do not fail; I succeed at finding out what does not work.
Uh that's EXACTLY what Microsoft did! Extentions for COM, the WTL, delegation event model, etc. And what'd they get for their trouble? A lawsuit from Sun!
No, I think VB should be cast out into the depths of hell from whenst it was created.
.NET, it is much, much, better than Microsoft's prior technology platform (DNA, "we put the COM in COMplex"). They've created a high quality framework and platform. I wouldn't say it's vastly superior to Java, but it's certainly competitve in some areas (not in others).
But it still is the most popular client-side language in the world.
Regardless of the politcial debates surrounding
-Stu
AWT/Swing doesn't have or need bindings because 1) they are 100% Java or 2) to the extent that they are not 100% Java and need to JNI down to something, that something is distributed with the Java VM that appears on each machine, so you don't need to distribute any platform specific AWT/Swing bindings with your app.
SWT needs separate bindings for each target platform -- it becomes like wxWindows or Qt in that regard. If you want to distribute an SWT app, you need to distribute those bindings, or tell your users how to install the right binding on their machine. But then you are into a bindings model rather than a true "write once, run everywhere" model.
My remark about J++ may not be completely off the mark. To the extent that C# is in reality J++, and that WFC was transformed to System.Windows.Forms, and to the extent the Mono is going down the bindings road to port System.Windows.Forms (to answer your question, 2002 - 1997 = 5 years to get Linux and Solaris versions of WFC), and to the extent that Miguel gets lambasted for doing what he is doing, why should Eclipse/SWT get a free pass for doing a similar thing with Java?
SWT [...] abandons [...] the idea that the same binary must run on all platforms. [...] Even though the libraries are implemented completely differently, the public interfaces are the same.
Hmm, I can't get the first statement from the second. In Java, you shouldn't ever need to recompile code unless the interface it uses is changed. So a jar you make that uses swt.jar shouldn't need to be recompiled unless it uses JNI itself. No different than AWT.
SWT and AWT both use JNI, so both (the libraries themselves, not consumers thereof) need to be compiled for the appropriate platform. The only difference is that Sun makes AWT, so you can assume that it came with the JVM and avoid distributing your own copy. Probably not a reasonable assumption for SWT.
Hmm, I can't get the first statement from the second. In Java, you shouldn't ever need to recompile code unless the interface it uses is changed. So a jar you make that uses swt.jar shouldn't need to be recompiled unless it uses JNI itself. No different than AWT.
Yeah, I misspoke, sort of. Strictly speaking, you don't really need to recompile, or you shouldn't, since IBM is careful to keep the public methods of each SWT implementation the same on each platform.
If you want to sleep well at night, however, I recommend doing the recompile anyway to make sure they didn't miss anything! Practically speaking, for other reasons you may be running a separate build script for each version of your program anyway, so it's probably just easier to do it in each build script instead of separating it out into a separate step.
Code once, debug everywhere. Although, to be fair, is that still the situation or has it improved since I last dabbled?
To make laws that man cannot, and will not obey, serves to bring all law into contempt.
--E.C. Stanton
Hmm, I can't get the first statement from the second. In Java, you shouldn't ever need to recompile code unless the interface it uses is changed. So a jar you make that uses swt.jar shouldn't need to be recompiled unless it uses JNI itself. No different than AWT.
Actually (after thinking about it a little more) it's really a matter of whether you consider the SWT libs to be part of the JVM, or part of the distributed binary for your program.
If it's part of the JVM, then your code that's compiled against it is a 100% portable. But unless Sun incorporates the SWT libs into the JVM (as has been suggested to them by many people) then you have to distribute it yourself, which means each platform gets a different binary distribution, differing only in the SWT implementation. Hence my misleading comment about portable binaries.
Most Java apps I've seen bundle their own JRE instead of trusting whatever's on the target machine anyway, so different binaries are going out the door anyway and the point is largely moot.
Saying Eclipse is useless for free development is like saying Linux is useless on the Intel platform because the Intel microcode isn't free.
;-)
Shush, you'll start giving them ideas...
Seriously though, you seem to be forgetting that you're talking about people who believe that all code should be free. It doesn't matter to these people that the free and proprietary JVMs will be indistinguishable (at least to Eclipse), they know that there's a difference.
Personally, I don't care; I've been developing in Java for a little over two years now, and have never had a problem that could've been solved by it being Free. You get the source to the core APIs with the SDK, and I don't do anything that would require the source to the JVM. If they care enough to spend their time developing something like this, though, good on them. I won't be using it myself, but I certainly have to give them credit for actually living by their principles.
As for the hardware, if it weren't so expensive and difficult to make, you can bet there'd be a Free x86 compatible processor available. As long as manufacturing costs are as high as they are, though, we're not going to see one. Again, I don't care - my P4 works just fine. Then again, I'm a little more pragmatic; I'm a professional coder, working on closed-source code (unless the client pays for the source too), so I can't afford not to be.
It's official. Most of you are morons.
I really hope that the gcj effort manages to implement all the classes of the standard Java API and above all that the compilation to binary becomes a reality for all Java developers. The implied importance of it being GPL is not that important to most of us who actually do use Java, the limitations, lack of AWT, Swing or a full SWT, memory consumption and speed are much more important. I wish I had the time so that I could work on this myself, because this would provide Java Developers the possibility of finally writing GUI code on Windows, Linux and Mac that could compete on a level ground with C# and .NET.
.NET and C# might be easy to use and very powerful, thereby providing the "carrot"for many developers, but I think it is naive and irresponsible to think that MS will play fair. Have they ever done so before?
I can already see problems arising with Mono in that I simply don't trust MS not to try and kick it in the balls with a patent suit after it has started to become widely used.
Java is easy to use and secure, and at the moment, on cellphones which have Java bytecode instruction sets in their CPU's, is anexcellent opportunity for expansion. Cellphones are a booming market and present a real chance for Java on the client side with J2ME. Being able to compile to native code would make it even better suited for that purpose. MS knows how important the Cellphone market is which is why they are up to their tricks and abuse there again (Sendo) and which is why almost all Cellphone makers are giving MS a wide berth and are using Symbian, which brings the story back to Java...
.NET is one of many things, depending who you talk to in Microsoft's marketing dept. First I'll define that. Forgive me if it's review.
.NET: C#, VB.NET, C++.NET, and JScript.NET. C# is first among equals, but VB.NET can do anything C# can do, again because the CTS/CLS is "the language". .NET just gives you a syntactical skin on top of this abstract language.
.NET good at?
.NET could be seen as the next step in evolving binary interop. I.e. in DOS, it was TSR's and interrupts, in Win 3.1/*nix it was DLL's and pointer-tables, in Win95+/Gnome/KDE it was COM or CORBA components, and in .NET, interop is at the CLASS level. They've basically learned the Java/JAR model of interoperability, then abstracted it to multi-languages (they just call JAR files "assemblies")
.NET makes all languages equal. This was painfully NOT TRUE in COM programming! Almost all of the plumbing underneath COM was to support Visual Basic's interoperability with C/C++ components. .NET levels the playing field here, and people can't pick on VB anymore (other than its cheesy syntax). Anyone can throw an exception in C# and catch it in VB, or define a class in C++ and inherit from it in C#. And debug across all these languages in a single session, if need be. Quite liberating for system architects dealing with a large, multi-team project with reusable components and potentially different skill-sets (hence different languages).
.NET DLL's that are better than traditional Win32 COM DLL's: .NET uses it, sing the praises!
.NET is CHILD'S PLAY compared to some other platforms. Especially with Visual Studio. They've really made distributed interoperability easy -- though of course none of this will scale or be bulletproof without real engineering work, but that's never been Microsoft's game -- let J2EE vendors do the dirty guinea pig work, they'll copy it into Windows/IIS eventually.
.NET really is about making Windows developer's lives A LOT EASIER. Which really was all that Visual J++ 6.0 was about before they decided to "break" features for political reasons. .NET is appropriate as a new standard for dynamic languages like Smalltalk, Lisp, Haskell, ML, etc.
.NET but you have to contort it into classes & methods if you want to interoperate with any other .NET language... this is what the C++ people have to do too! (i.e. no more templates, multiple inheritance, at least until .NET 2.0 :) .NET isn't the second coming, though many Missy-followers think it is because their intranet is locked to http://msdn.microsoft.com and really don't have a lot of exposure to the alternatives out there (i.e. J2EE or perhaps PHP, Python, Ruby, etc.)
Here's the things that it isn't (in reality):
- A new server platform (MIcrosoft marketed it as such, even though there really isn't anything new in their Windows 2000 lines of servers yet).
- A some new magic technology (i.e. the marketing idea that MS Passport became Passport.NET and thus was embued with a +6 long-sword)
Here's what it is:
- The common type system, language spec, and language interface. (CTS, CLS, and CLI). It's a way of getting several languages to interoperate through a virtual machine.
- The Common Language Runtime (CLR) for Win32. This is the Virtual Machine. It's as fast as Java 1.4 in some ways, slower in some ways, and over 2x faster at certain operations like object creation. Ya gatta hand it to Microsoft's x86 team, they know their stuff.
- The following languages are released by Microsoft for
- The Base Class Libraries (BCL), ASP.NET, COM+ (aka Managed Components), and ADO.NET are included.
- The ECMA standards body has been submitted the CLI, CTS, CLS, BCL, and C#. Mainly for show, but maybe something good may come from Miguel et al.
What's
- It's a much better way for binary module interoperability than COM was. Viewed this way,
The language-interop issue at first glance seems like a red herring feature, but in fact it's rather important from a programmer's sociological perspective. VB and C++ programmers are naturally opposed to each other in philosophy - their means and ends do not peacefully coexist.
Things you can do with
- The Windows Registry is NO LONGER NEEDED. Nothing in
- Easy and Flexible Side by side versioning. An app that links against a version stays with that version unless updated or a sysadmin coerces it to use a newer DLL version.
- No filename conflicts (i.e. no 2 vendors with MYSILLYLIBRARY.DLL overwriting each other -- each DLL has a public key stamp)
Other things... Making web services in
So -- you see,
The jury's still out as to whether
I say it's more about "syntax skin" than "flexibility". Certainly you can write Lisp onto
-Stu
Maybe you have books to recommend. Please provide any helpfull info you got (libraries to suggest, tricks, etc...) that would help a newbie to jump start quickly on this platform.
Remember the year 2000? They promised us flying cars. They delivered the PT Cruiser...
It's a software tool!?!? Dang... And here I thought I would be getting a free Japanese sports-coupe!
May you be touched by His Noodly Appendage. RAmen.
I guess their next goal would be to have GCC not target that proprietary platform, Windows...
Get busy with SWT then. SWT is designed to do exactly that (bind native widgets to Java), and is open source.
Have fun!
Galileo: "The Earth revolves around the Sun!"
Score: -1 100% Flamebait
Thanks!
Galileo: "The Earth revolves around the Sun!"
Score: -1 100% Flamebait
Most of the time, when you free native resources owned by a Java object, you do so in the "finalizer" that the GC calls when it's about to free your object. A finalizer is analogous to a C++ destructor and is called ClassName.finalize().
Never rely on finalizers for reclaiming resources or your program's behavior is undefined. You can't control when the garbage collector will run the finalizer, and if there's plenty of memory it may never run. Scroll down to the middle of this page for more details on why you shouldn't release any sort of limited system resource in finalizers. (Except for memory.)
I would say that writing complex and high-performance apps with Swing takes some experience, but is not required for many apps. Like all Swing defenders, I'll point to JBuilder as a beautiful Swing-based application that works well. Yes it requires a fairly recent machine.
I use IntelliJ IDEA at work and I love it even though it's Swing based. However everything about the thing is a memory hog (this isn't all Swing's fault). Having used Swing, I'm impressed at how well they did with it. But it's really hard on your computer. And Java developers are more willing than most people to put up with Swing because they're sympathetic to the technology- in sort of the same way that Mozilla users are willing to forgive XUL for looking so weird.
You didn't mention that you also have to manage memory and native resources in your program, which is one of those major gotchas that can cause memory leaks and crashes. Now instead of relying on the garbage collector you have to step way back to the dark ages and tediously manage UI memory. Ugh!
Yep, SWT is a lower level library, there's no doubt about that. To a lesser extent, you have to worry about resources in AWT and Swing too. People forget to call Graphics.dispose() all the time. And it's not like you're completely back in C++. You just have to unload your SWT resources, not every single object you create in the entire program. That's a big difference.