Java is a great technology for servers, personal computers, and mobile devices. Java is successful on servers and mobile devices because these environments need Java’s cross-platform support. The situation is different on personal computers, but this could change sooner than you might think. In this article, Andrei analyzes how Java can improve the desktop world and then present the three major Java GUI toolkits: AWT, Swing, and SWT.
Best way to do desktop Java development IMHO is to use the GNU toolchain, ie compile the code to native binaries using GCJ and use the GTK+ toolkit rather than SWT. It’s native *enough* that you achieve your target of cross platform portability while not sacrificing speed or good looks.
SWT is OK but I can see there being lots of portability related bugs due to the toolkits not working in quite the same way on each platform. I’d be interested to be proven wrong.
Good article (though I don’t care for Java much). I seem to recall a lot of predictions in the past about the end of desktop computing, NC’s, Java…But what we have here is probably the language’s most useful purpose — the desktop.
This could be a good idea for larger projects, but personnally I like the ability to download a single jar file & have it work on my PC & mac easily (if a bit slower ๐ )
Using Java with GTK+ does seem interesting though.
Nice to see another Durham student on here ๐
I think the reasons that we don’t hava more Java desktop development today is because of historical perceptions and some reality. Java was(especially Swing) slow and swing didn’t look native. I consider the biggest blunder that Sun ever made was thinking that a common look-n-feel was a good thing. Sun’s marketing seem to have convinced a lot of people too back in say 1999 or so. I always thought it was crap. Back then, you could goto Slashdork and the groupthink over there was that a common look-n-feel was a good thing, but that the performance sucked(which was true at the time). Now everybody basically agrees that native is better, but the perception that swing is slow still exists.
I believe that had Sun started on something like SWT back in say ’98,’99 then things would have turned out differently, but it seems that McNealy’s fascination with beating MS(back then he kept on spewing the same “the os doesn’t matter”) and thinking that the thin-client would rule screwed things for java on the desktop.
I like java even though I do c# and c++ mostly these days. Eclipse and IDEA are very nice development environments. I do think that Sun stalled on some language enhancements until MS started giving them competition in the managed world. For most people that will be targetting windows on the desktop for future applications, I think java is pretty much dead. Longhorn will be basically at .NET based and hopefully SP2 will contain the .NET runtime. Unless java is included by OEM it won’t be included in windows – a big minus.
Maybe if McNealy had not tried to take MS head-on and was willing to compromise with MS a little then things could have turned out differently. On the server java still rules, so at least Sun still has that.
I think mono will have a bigger impact on desktop open source apps than java ever had, but only time will tell.
From the article
>> There are misconceptions surrounding Java/Swing, such as “Java/Swing is too slow,” or “Java/Swing requires too much memory.” Swing might be slow on an old Pentium with 32MB of RAM running JDK 1.2, but it’s fast enough on a modest Pentium III with 256MB of RAM running JDK 1.4. It doesn’t really matter if the application responds in one or 10 milliseconds to a mouse click; the user sees no difference.
Sorry, but that is entirely incorrect. Maybe with a simple listbox test there is no difference. But look no further than NetBeans vs Eclipse. NetBeans is SLOW! Eclipse is FAST!
Whenever I run Swing apps there is a slight slowness to react and it is very frustrating. Sun should drop Swing and use SWT.
I was going to post how Swing is great and all, but I hardly use Java apps. I can’t be that hypocrite.
For my own developments I use Ruby-GTK+2 bindings. I have a little IRC client of mine that I carry from Windows to Linux and vice-versa without problems and of course that I use it.
I once coded one IRC client in Java/Swing, but even though it worked, I halted any improvements for it (except one that used regular expressions when they were added to Java in one of its versions. I was able to reduce 100 lines of code to 5).
From the article:
“Today, Java has the features you need for building large desktop applications and the bugs were fixed.”
Where are these large desktop applications? Could you write an Office equivalent in Java (and no, Think Office doesn’t count), how about a Web browser like Mozilla? Why aren’t companies with large cross-platform desktop applications using Java for their programs? I’ve seen plenty of corporate Java desktop apps that provide a GUI front-end for a database, or small, simple editing widgets for content-management systems. But where are the full-blown Dreamweaver or Frontpage equivalents in Java? The answer is simple – Java still has performance issues for large desktop applications.
I think the whole idea of cross-platform development has been overhyped. Many years ago, programmers would spend the time and effort to extract as much performance from the underlying hardware – today the attitude is so different: hardware is cheap – if your PC runs certain apps slow, upgrade. To me, this seems like such a lazy and wasteful attitude. The fact is, hardware is often fast enough for many tasks; it’s the software that’s poorly optimized. Anyone who has run BeOS will know just how fast software can be if it’s fine-tuned to the underlying hardware. Give me a small, fast, natively-compiled executable any day.
I hardly use any swing/java apps these days either. I had my new system for about a month and a half before I even downloaded the runtime for a swing app that was pretty much useless anyway. When I ran it I decided that I hate the swing look even more than before.
As far as performance goes, it looks like you can make Swing apps that are fast(still a big footprint I guess), but you have to be basically a wizard to do it. Swing seems to be a complex beast. The Intellij guys did it, but they seem to be the exception and not the rule.
Also, write once run anywhere seems to be way over-hyped. I’d rather have write once, compile everywhere if its going to give me better performance, better features. Another thing I like about c# is that you have a built-in preprocessor, so if you want a little conditional code then go at it. C# allows you to manipulate pointers directly if need be. The one thing I’m dissapointed in about java 1.5, IIRC, is that since the runtime wasn’t changed to deal with generics, you still get a a lot of boxing/unboxing done by the compiler under the hood which is can be a big performance hit in a tight loop.
Have you seen Evermore Office, http://www.evermoresw.com/weben/product/eio_overview.jsp ?
>> Could you write an Office equivalent in Java (and no, Think Office doesn’t count)
Here you go, EIOffice:
http://www.evermoresw.com/weben/product/eio_overview.jsp
Besides the normal apps that have already been listed, how about ThinkFree Office? It was written in Java and is supported on Windows, Linux and Mac OS X (I’m currently running it on OS X).
True, it’s not as fast as Office XP, nor does it have anywhere near the features, but it does work, and it will edit Office .doc, .xls and .ppt files.
http://www.thinkfree.com/
Where are these large desktop applications? Could you write an Office equivalent in Java (and no, Think Office doesn’t count), how about a Web browser like Mozilla? Why aren’t companies with large cross-platform desktop applications using Java for their programs? I’ve seen plenty of corporate Java desktop apps that provide a GUI front-end for a database, or small, simple editing widgets for content-management systems. But where are the full-blown Dreamweaver or Frontpage equivalents in Java? The answer is simple – Java still has performance issues for large desktop applications.
——————–
Office is a very large application. It has taken years for Office to get where its at, with a lot of investments from MS. It would take a lot of effort to write something equivalent to Office, regardless of programming language used. Others have pointed out office suites that compete with Office, but don’t have the equivalent features. Its got nothing to do with Java, because OpenOffice is written in C++, yet it’s still slow, and doesn’t support all the features Office does.
Frontpage and Dreamweaver are already existing applications that have already been developed for years. There is nothing to be gained from porting it to Java (or .NET for that matter). No one write an equivalent app because its hard to do, and it doesn’t make financial sense to. Again, nothing to do with Java.
I think the whole idea of cross-platform development has been overhyped.
Cross-platform programs don’t have to be slow. Just to prove the point, Linux runs on many architectures, and its anything but slow. Cross-platform development is as important as ever.
As long as they don’t fix the performance issue, I dont think they have a chance at all. It’s nice to program in Java, but not nice to run it in Java. It’s just wasting computing resources. Plus Sun has a too restricted licensing policy, I see the future that Java will be replaced by C#.
a nic exapmle with swing,
http://columba.sourceforge.net/downloads_webstart.php
and for more,
http://www.javadesktop.org/tsc/sightings/S20.html
and a fine and popular SWT example,
http://sourceforge.net/projects/azureus/
i say java, especially after 1.5 is the way to go in desktop applications, when there is a need for real cross platform. usually there is no need for changing one line of source code, one bnary, and one click install with webstart.
i say people are very unfair to java, especially the ones who praise .net. i sugest people to look at java again.
It is almost contradictory to state that something is “portable” because it runs on all “relevant operating systems”. Portable means it can be ported to niche operating systems if needed, not only to those “relevant”.
Would it be only for Suns 3 intended operatings systems, java program portability would be pathetic.
Also, as it was stated “java is not platform independent, it IS the platform”.
Fortunately, there are free java implementations coming along, and even more fortunately “catch-all” C++ libraries as comprehensive as that distributed with suns java environment are there. All said with portability in mind, I do not want to offend you if you like the language, that is fine with me.
You are crazy if you think that Eclipse is fast. It may be fast with no project open or with a small project, but it is unbearably slow when dealing with an enterprise level application. We use it at work, on P4 2.6 Ghz machines, and sometimes it really crawls.
-G
and i am shocked with peoples ignorance about java’s performance. They have nothng solid in their hand but talking. maybe they are reading some micrisift brochure or microsoft funded stupid benchmarks? java is now almost as fast as C++ native applications in many cases, and forget about the .Net. And by the passing years, performance lost its prority to the managebiltiy. if you really want to tune your applications for performance use, there are many ways to do in java too. Such as
http://jade.dautelle.com/
You may be right that,java licensing is too restrictive to fit well on open source platformas like linux. But c# is even worse. It’s true that the language is an ECMA standard, but most of the things that is needed to make real world applications is not part of that standard. Instead it is Microsoft intellectual property manly in the form of patents.
i do not think java licencing issues is related with open source comunity, there are high quality thousands of java applications and libraries (just check java.net, apache jakarta, codehaus, opensymphony sourceforge etc.), and several open sourece Java virtual machines. There is JCP if you want to participate java’s future development. Maybe distribution of java could be more free but even today’s situation java is only one click away. And there are open source crossplatform IDE tools. i still dont understand why java is the odd one out. i see no drawbac of java in any case. if you do not develop system level software or hardware drivers, java is the logical choice. for a developer, “there is no Os, only java”
“Sorry, but that is entirely incorrect. Maybe with a simple listbox test there is no difference. But look no further than NetBeans vs Eclipse. NetBeans is SLOW! Eclipse is FAST!”
I wouldn’t agree with you. On my old 500 MHz Pentium III laptop there is very little, if any, difference in speed of execution between Eclips and Netbeans. Windows open in about the same time scroll list scroll about equally fast etc.
But there is a world of difference between development speed between the two applications. But that is a difference in usability not in application speed. So I would say that Netbeans feels slow because it does things the wrong way, not because it’s written in java.
And the main reason there are no big desktop applications written in Java is that Sun havn’t supported the desktop stuff like swing very well.
E.g. up until the latest jdk1.5beta it was not possible to use a non US keyboard on other platforms than windows and still be able to write special characters used in Europe. So the cross platform benefit was really lost.You were better off using e.g. Trolltech QT if you had that kind of needs.
Now that it seams that Sun have decided to support the desktop again, I think we will see more java desktop applications.
and i am shocked with peoples ignorance about java’s performance. They have nothng solid in their hand but talking. maybe they are reading some micrisift brochure or microsoft funded stupid benchmarks?
Dude, many of us use Java applications on a day-to-day basis at work – some of us because we are forced too
My perception that java GUI is slow is based on my use of Eclipse and the benchmark here:
http://www.osnews.com/story.php?news_id=5602
Java performs almost as well as C++ except in trigonometry. But this flaw could kill java, as it contributes a lot to its slowness.
“E.g. up until the latest jdk1.5beta it was not possible to use a non US keyboard on other platforms than windows and still be able to write special characters used in Europe.”
I didn’t know that. I couldn’t use some accented letters in Swing on Linux before. I should give that a whirl. I even participated in a bug report on it (it was a huuuuge report ).
Hm. Still problems. No problem with X, KDE or GNOME, but Swing doesn’t let me accent my letters like รฉรฃ. I could probably mess around to try to make Java recognize my locale/keyboard, but I doubt that it would work 100% flawlessly. At least Java integration with the system sucks and at most it is still broken.
java version “1.5.0-beta”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)
Tested it on jEdit.
You just reminded me of one of the problems I have with Java. lol
Could you write an Office equivalent in Java?
Yes, you can, and yes, comeone just has written a very good, fast, and capable full-featured Office in Java Swing. See here:
http://www.evermoresw.com/weben/product/eio_overview.jsp
Damn, why do Java-haters keep churning out the same old lies instead of trying current applications? Evermore Office is new, and targetted at the Chinese market, where cross platform abilities are needed so you can run it on Red Flag Linux & Windows. Its pretty damned sweet, looks just like Office XP, and makes the “Swing/Java is too slow for desktop apps!” crowd shut up.
The problem with Java GUIs and graphics is that java doesn’t have structs (lightweight objects, by value classes) that are created on the stack instead of the heap. Also Sun doesn’t really care about Java. Think about it, the java programmers have been bitching about templates, enums and other language features since 96/97, they have just been added because of competition from C#. The templates in java are eye candy, they aren’t real. Everything is still cast to ojbect, the compiler is adding the cast code for you. And since stuff is boxed, it is slow as hell; they just didn’t want to change the VM. Sun called upon a few companies to create a new intermediate language, because they know how much java and its byte code sucks. I never touch an app written in swing. I do use azureus, while better, its performance still lags to .net written/C++ (native) app.
I’ve developed with Java and Swing and it’s alright once you get used to it, but still not as powerful as WinForms and C#. Personally I think it is a good idea with an average implementation and a poor delivery.
Sun fumbled the ball far too many times and I’m sick of apologizing for Java. Applets got killed by Flash, Desktop apps never really took off for various reasons.
I do think that if Mono gets anywhere it will put a serious hurt to Java, not only on the desktop but also on the server side of things. Anyone who has used ASP.NET will tell you that it is a very productive environment for web apps.
Java on the desktop sucks…all there is to it…and even as far as portability is concerned…wooohooo Solaris, Windows, Linux, and Mac OS X…big fat hairy deal. I realize that other platforms suport Java as well, but almost never the latest version. So for your app to be *truly* portable you have to code at least one version behind the latest spec. Of course that sometimes makes you incompatible with the latest version because what was once the only way to do it has been deprecated in the latest version.
Personally, I think a language like Python would be a better choice (it is far more portable and powerful), or perhaps Perl, or C++ code compiled against a cross-platform library like Qt/wxWidgets(used to be wxWindows)/GTK+/FOX/FLTK/etc.
is for the JVM to compile the program down to platform spesific code when you “install it”
that would give the ability for a tool to be cross platform from the source, but have the performace of platform spesific code.
You are so wrong. Take a long at Netbeans 3.6 it is on par with Eclipse. SWT has its place and SWING has its place.
has anybody gotten it to work on their linux machines?
I am running Fedora Core 1 and can’t seem to get it run.
Though i am running a many other java apps just fine.
For what it is worth: I use magic draw a lot for my job and it performs very well. On my 450 laptop its gui is more responsive then ms office 2000.
Personally I think it is all perception. People used old versions of java, saw that gui apps were slow and decided that java==slow. Modern java is much faster, but people still think it is slow because they expect it to be slow. I know I suffered from this, but my job forced me to use some huge java gui apps and it slowly began to click in that it wasn’t slow. The java apps were in many cases out performing the non java apps.
I have run Java >1.4 virtual machines on both HP-UX 11i and Irix 6.5, and without paying any more money for either.
A single .jar file targeted at JVM1.4 can run on Windows, Linux (x86 and SPARC), Solaris, HP-UX and Irix, and I do so quite frequently. This is considerably better portability than I’ve experienced with almost any application or program to which source code has even been available for me. Any of those that run in X and not just a terminal window are scarcely more responsive. Java runs perfectly fast for GUI applications on almost any hardware that’s less than 5 years old.
As concerns c-hash, I would suppose competition in the space would be good, excepting that it comes from the corporation that invented platform lock-in and attempted to sabotage Java portability in the first place. However, I’m sure they’re much better behaved now, oh yes. I fear the mono project is misguided.
I find this very hard to believe, I’ve never ever seen a Java GUI app out perform a native GUI. Could you give us an example of such an app?
>The java apps were in many cases out performing the non >java apps.
I run netbeans fine on my 2.6 p4 w/ 1gb of ram so i’m guessing that java is fast enough for the future. java is also a nice language and a lot freer than c#. python is nice but its documentation isn’t as good and having sun and ibm in java’s corner helps too. will it ever be as fast a native? no. will c ever be as fast as assembler? no. every year we have more clock clycles to burn so we might as well use java use those as using java can get rid of some headaches that clock cycles can’t.
I am an IT Manager and developer for a small company which builds some of its own internal applications. We have several programs written in Java (including some early servlets). However, in deciding what platform we should use for future desktop applications, we chose C#/.Net.
Java Swing is over-engineered and too difficult for a small group of developers to build the needed expertise. Even with a GUI tool like JBuilder, it is still too hard. And Swing apps w/o tremendous expertise still look clunky on Win 2K. Other parts of Java also demonstrate that over-engineering (Dates and Calendars come to mind).
I really don’t like Microsoft or most of their products. However, we are stuck with Windows clients b/c of vendor software for which there are no Linux alternatives. Web apps are too clunky for good, fast user interaction. Winforms and .Net seems to be the best game in town for building rich client, Windows apps.
So there we are. Linux on our servers. Windows on the desktop. C# as our primary language tool. That’s how the rubber is meeting the road.
(FYI – in learning C#, it is prety clear that the languages are converging on features. Some differences in philosophy, but very similar. C# has several improvements over Java, I think, but Java 1.5 addresses many of those. The competition will be a good thing for both!)
ok, with java it is possible to create a swing applet inside a browser with a rich GUI and all the functionality of a desktop application that will work in most platforms the same.
it is possible to do something similar with a .NET and internet explorer?
ok, with java it is possible to create a swing applet inside a browser with a rich GUI and all the functionality of a desktop application that will work in most platforms the same.
I haven’t seen such an applet yet. All the applets I’ve seen border on painful to look at and to use. Some functionality, yes. All the functionality of a desktop app? Ummmmmm …. no.
“All the functionality of a desktop app? Ummmmmm …. no.”
Ummmmm … yes. A Java application can be an applet at the same time, you don’t loose functionality (except that you need to sign your applet for disk access).
But even better : use Webstart.
Java’s still slow. The JVM increases overhead, and Swing apps hog memory like there’s no end in sight. I can’t believe some of the crap people here are spewing about Java’s amazing speed, Swing’s superior responsiveness, the Java Virtual Machine curing AIDS, etc.
I use Java, but if platform-neutrality wasn’t an issue, I’d stick with C++ and forget about Java bloat altogether.
One more thing: Eclipse is the most bloated IDE I’d ever used, until I tried NetBeans. Anybody who thinks either one is fast probably has 4GB of RAM and 500 processors.
As vehicles advanced, they got more powerful, faster, comfortable and better. As jet planes advanced they got faster, more efficient, lighter and better. As computer hardware technology advanced, they got faster, more powerful, smaller and generally better.
As programming languages advance, they get less efficient, complex, sluggish and bloated. Wake me up when the next mordern language is faster than C, more efficient than C, lighter than C, more secure than C and more powerful than C.
Until then, mordern programming languages are a regression and hardly an advancement.
>Until then, mordern programming languages are a >regression and hardly an advancement.
Agreed.
There is now tremendous computational power at the heart of modern PCs but we hardly use it for the users’ benefit. The only people who seem to explit the hardware to it’s fullest are the games writers. Instead we create bloated tools like .NET and Java, neither of which seem to increase the user experience (note: User experience, sure one may argue that the programing experience is better). Java, if anything seems to takes us backwards, giving us slow, inferior looking interfaces.
I concur. Game and graphics programmers are some of the most creative, efficient and extreme programmers I respect. As well as embedded device programmers. They are all about squizing out the last drop of electronic power from any given hardware.
It saddens me to see the direction the software industry is heading. I thought we’d be heading towards programming for nano and micro devices. Apparently, it’s all about corporations, time and money.
Java’s still slow. The JVM increases overhead, and Swing apps hog memory like there’s no end in sight.
Yep, my experience with Java 1.3x was that just-in-compilation brought a boost to performance, it is often seen as the cause for Java’s slowness but the real evil IMHO is not byte code execution, but unbelievable waste of memory and memory conversion overhead.
While garbage collection saves you from hairy to catch sitations where memory is not freed, it grabs time to collect at random points, which some see as a major flaw.
But again the real problem with gc IMHO seems elsewhere.
In my old company we create a huge Java client, where every developer just grabbed as much memory as he needed and relied on gc to clean things up. Summing over all sub systems this accumulated waste of memory resulted in an app that required more than 350 megs of memory.
What was needed and hard to bolt in afterwards was a central memory mangement, or more careful allocation of memory in the subsystems. (e.g. setting references to null, if one knows he object isn’t needed anymore, to mark it for gc sweeping).
Anoter important issues is i/o power.
Our client needed to shovel large chunks of data in and out of the database and had visualize things.
Java is not good for all these purposes.
My explanation for it is that e.g. grabbing some bit from a database will trigger a database driver to grab that object over the net and store it in local memory. The memory layout of that object is usually according to C/C++ layout.
So there must be an additional step to copy that C/C++ layouted data into the memory space of the JVM.
Same way backwards for writing stuff.
This means that data shovling needs the double effort than a C/C++ app and therefore must be slower.
Or one would need Java native database drivers.
A similiar argument holds for hardware accelerated graphics and shoveling data between OpenGL cards (C/C++ layout) and the JVM.
I use Java, but if platform-neutrality wasn’t an issue, I’d stick with C++ and forget about Java bloat altogether.
Gimme C++ every day over Java. Java’s lead in large utility libs seems to have shrunken as well.
One more thing: Eclipse is the most bloated IDE I’d ever used, until I tried NetBeans. Anybody who thinks either one is fast probably has 4GB of RAM and 500 processors.
I am quite impressed with eclipse.
It is something like the GUI equivalent of Emacs (Emacs seen as Meta IDE).
BTW I tend to use LISP only today to do a bit of Emacs hacking. So in a way Emacs is an ecological nice for LISP.
I wouldn’t be surprised, if we mostly use Java only for the purpose to maintain Eclipse based IDEs in 5 to 10 years.
Regards,
Marc
As programming languages advance, they get less efficient, complex, sluggish and bloated. Wake me up when the next mordern language is faster than C, more efficient than C, lighter than C, more secure than C and more powerful than C.
…sounds like a few jobless assembly language programmers I know. It’s called assembly, except there’s few programmers these days who’s handcode can outdo a good optimizing compiler globally and if you intend to write assembly code until the next ice age before your program is ready for primetime then go for it. C is probably the worst modern language for security.
That said, the real power behind java and c# over something like c++ is not some higher-level of abstraction at the source level, which it doesn’t have, but the libraries. I don’t buy binary cross-platformness. I favor write-once compile everywhere.
At some point in time though, you’ve got to ditch that pentium 133, 32 meg ram machine and move into the 21st century. C isn’t going anywhere, but you’ll see smaller parts of programs written in straight c. The great thing about c# is that its trivial to hook into c libs, while with java its much more of a pain in the ass.
By the way, c doesn’t guarantee speed. Gtk 2.x is still slow crap compared to QT. Winforms gui feels faster to me than gtk 2.x apps.
For all the developers that disregard the important of portability, have you ever really develop a cross platform GUI application in your life before? I had and it was a real pain. The task was almost impossible for a single developer to deal with. I am talking about developing application for internal use here.
When I switched over to using Java and Swing, the development time was cut down tremendously. I know my requirement is a little more extreme than others and I can’t use the latest version of Java since not all of the platforms support the latest version. Anyway, the application needs to be able to run on OS 9(yes, this platform is still around), OSX, Linux and Windows. Java and Swing was and still is the only solution with reasonable turn around development time that is.
So, portability might not be important to most of you but to some of us, it is very important.
“Wake me up when the next mordern language is faster than C, more efficient than C, lighter than C, more secure than C and more powerful than C.”
Engineering doesn’t work like that. You have to make trade-offs. That said, its not a totally zero-sum game. For example, you can get languages (Lisp, ML) that are much more productive than C, while being not too much slower and more memory hungry.
Beyond that, we are really limited by the C memory model current processors are designed around. Currently, CPU designers have more transistors than they know what to do with. C code doesn’t have the parallelism to take advantage of half a dozen functional units, so we get very narrow processors running at 5GHz.
If instead, we put some more functional units on there, under the control of the compilers (Itanium!) then we could use those to do bookkeeping like range-checking and whatnot. While the code would be using more resources in absolute terms, C code couldn’t take advantage of those extra resources anyway, so it would be as even in practical terms.
If programmers bother to write at least partially functional code, then we could have processors that used extra functional units to evaluate multiple parts of the code at once, without the hassles and pitfalls of multithreading.
To reduce the cost of dynamicity, we could use something like HP’s Dynamo, except integrated onto the CPU (think Transmeta’s Code Morphing on steroids) to eliminate branches. We could use some transistors to accelerate dynamic dispatching while we’re at it.
And I’m convinced we could use C-RAM (computational RAM — search for it on Citeseer) to accelerate garbage collection to the point where its a *lot* faster than the C heap.
Emacs is fugly, to be true, and has a crappy GUI, but its way ahead of Eclipse in a key department. Two words: interactive toplevel. Wake me up when we get a Java IDE that lets me work on my code while the program is running
So in a way Emacs is an ecological nice for LISP.
I wouldn’t be surprised, if we mostly use Java only for the purpose to maintain Eclipse based IDEs in 5 to 10 years.
Who knows. But I think maybe in 10 years, probably longer, Java or something like it is the way to go. The VM is a model for the future. It’s a better idea in the long run. As for the original vision for Java: Network computing just isn’t very relevant now IMO. Maybe it will be eventually, but even then, the Desktop will *never* die.
BTW, anyone have any links on what Microsoft thinks of Mono or open sourcing .NET? As far as I’m concerned, if the technology is good, it should be standard, and standards should always be open. Whenever someone turns technology into a way to gain leverage, everyone loses (it irritates me how much this stupid little game is repeated by companies over and over again – then have little to work with in the end).
As far as Java performance goes — Remember the Java chip? Best platform for Java LOL…Heh, totally defeats the purpose.
Miguel De Icaza exchanges email with Anders Heljsberg. Microsoft developers have been generally receptive to the Mono project.
>For all the developers that disregard the important of >portability, have you ever really develop a cross >platform GUI application in your life before? I had and >it was a real pain.
Agreed, I’ve tried and I hated it because I would end up with the lowest common denominator in terms of the user interface. There is a reason why there are very few cross platform high performance games.
There is a reason why there are very few cross platform high performance games
Depends on what you mean by cross platform. I know games that run on the game cube, the PC(Mac,Linux,WIndows), the xbox and the PS2. Doom apparently might be running on all those platforms.
Java and .NET are competitiors. I don’t see the future, but IMHO:
Java:
+ portability
+ there are many relative good RAD/IDE (netbeans, jbuilder,eclipse)
+ many existing applications, classes
– SWING IMHO little bit too slow and the default theme (metal and gtk theme) under linux is very ugly.
– licensing problems. The most of linux distros are not contains any JRE.
.NET
+ C# langugage. IMHO it is far better then java (yes, better than 1.5 – I don’t understand SUN).
+ there is a very good IDE/RAD tool (IMHO the best at this moment): VS2k3.
+ the runtime will be installed on every windows at the future.
+ the longhorn application modell is hardly based on .NET – on the windows platform the future of .NET IMHO more certain.
– Not multiplatform, the official version available only under windows. The legal state of the mono is dim because of microsoft patents. But with SUN and Java there are similar problems.
IMHO the status of java and the old netscape are very similar. When the netscape company open the source and the mozilla/firefox can be replace the IE everyone use Internet Explorer.
Wake me up when the next mordern language is faster than C, more efficient than C, lighter than C, more secure than C and more powerful than C
As C++ has a great degree of syntactic similarity to C, you can compare both languages. So:
C++ is more efficient than C if you measure written LOC against implemented functionaility.
C++ is/could be faster than C under some Circumstances. For example exception handling in C++ versus doing an equivalent of checks in C will usually result in an performance advancement of the C++ code. Or the use of function objects in C++ which can be better inlined than using pointers to functions.
C++ can lead to more secure code, because you do not have to deal with the same amount of low level stuff usually. And you can use techniques such as RAII and generic programming in order to not have to code explicitly what the compiler can do better than you.
And C++ is more powerful, for the reasons stated above and for example the OOP concepts supported by the languages.
I your point about the licensing problems is a very important one.
As you mentioned, the .NET runtime will eventually be on all windows computers. Java isn’t shipped with windows anymore unless OEMs put it in there. Dell still does, but who knows for how long. I think the big thing for Linux is that now that Suse and Ximian are under the Novell umbrella, once Mono reaches 1.0 they’ll most likely be shipping it with the distro. Others will most likely follow suit. I think people underestimate the importance of program distribution, e.g. what runtime/libraries do you need for your program to work.
I don’t think the legal status of mono is “dim”. Wine has a much more dubious legal status than Mono because at least a lot of mono is already under the ECMA spec. Also, I’m sure Novell lawyers studied the issue very carefully before the purchase of Ximian. I also think that Mono could be the boost that Gnome needs to compete with KDE on the technology front. KDE upped the abstraction level for developers by using c++ over c. Gnome could do the same thing with c#. I’m not saying that core libraries will be rewritten or even new core stuff will be written in c#, but I’m saying that your normal app could be and up the productivity of those gnome/c developers.
My explanation for it is that e.g. grabbing some bit from a database will trigger a database driver to grab that object over the net and store it in local memory. The memory layout of that object is usually according to C/C++ layout.
So there must be an additional step to copy that C/C++ layouted data into the memory space of the JVM.
I do not know what database you use, but this sounds really strange to me. Popular databases, especially SQL DBMS like PostgreSQL, MySQL and others are not tied to any language. The data stored is in a format chosen for the database, not a programming language (Of course it could happen the format is that of a specific language, the implementation language).
Most often elementary data types like integers, or sequences of characters, not more complex layouts like aggregate types in programming languages are stored in the database. So at any rate, it is only a matter of byte order of elementary types. I would guess that byte order is the same on one machine type, regardless if using java or another language. And you have to consider that java is implemented in C and/or C++.
But a bit more likely is that for transferring over the network, data is transformend to some sort of network byte order.
> Wake me up when the next mordern language is faster than C,
> more efficient than C, lighter than C, more secure than C
> and more powerful than C.
C secure ?
C powerful ? what do you mean by power ? strncpy ? malloc ? void* ?
!LOL!
Wake up and remove your head from the sand, dude, this is year 2004, not 1974.
> C secure ?
> C powerful ? what do you mean by power ? strncpy ? malloc ? > void* ?
> !LOL!
> Wake up and remove your head from the sand, dude, this is
> year 2004, not 1974.
this is 2004 not 1974 is a load of bull! Sure java is a high level language, but guess what java is written in! Moron, C/C++ will always be the most powerfull, of the portable languages, sure Assembler is more powerfull, but a real mission to use, LISP is good, but no one uses it! The linux kernel is written in C, Unix is written in C, Windows for gods sake is written in C/C++ (Not that MS are any good at it though)! I can program in 12 different languages, and I am currently developing a lot more in Java and I have done quite a bit with C#, and I will tell you this, C# is a load of crap! Java is good, but has nothing on C++, its a very messy language, too much indentation is one the things I don’t like about java, write me a program in a high level language that can talk directly to a piece of hardware without any use of an external application or a c/c++ based extension to allow it. C/C++ are not as secure as the highlevel languages, specifically becuase a lot of C/C++ developers don’t know what the f**k they are doing!
I dare you to prove me wrong!
Here you go, EIOffice:
http://www.evermoresw.com/weben/product/eio_overview.jsp
10 bucks says all the linux babies will complain you have to actually pay for this……if its not $1 it won’t fly.
wow….you take things a little to heart don’t you. Don’t cry little one….it will be ok.
programming in 12 languages probably means you really only know of them and suck at them all.
We have different meanings for what “powerful language” means. For me it is expressiveness, for you it is ability to mess with low-level stuff. Ok.
You are apparently obsessed with talking to hardware but 99% of software does not do it. Nobody cares what was used to write JVM/kernels. Besides there are lots of languages
better than C that could be used for it. C does not have to be the best language for kernel development just because people happen to use it. COBOL is not the best language for business development just because most banks run on it.
Your security argument is void. If everybody were flawless programmers, there would be no security holes. But people are not flawless. If a language gives you more opportunities
to make one (and C is apparently very “good” at this), it is less secure.