Slashdot Mirror


Sun to Amp Java for Desktop Performance?

mactari writes "Java client application developers should take a look at Sun's J2SE Client Developer Survey. Swing's relative slowness has always made a Java app with a GUI look and feel slow, and Sun might finally be doing something about it. Questions on the survey suggest Sun is considering moving away from a crossplatform look and feel (eg, Metal) towards native looks by default. If Sun is going to follow the suit played by IBM's native widget toolkit, SWT, or do things on individual platforms like Apple has done with its hardware accelerated version of Aqua-Swing, Java might finally find its way to becoming a competitor on the desktop."

88 comments

  1. Jave for performance... by ewhenn · · Score: 2, Funny

    ..faster than a turbo charged yugo.

    1. Re:Jave for performance... by Synic · · Score: 1

      que? Javier?

      seriously, what are you referring to? A Google search came up with the Java ASCII editor... but somehow I don't think that's what you meant?

    2. Re:Jave for performance... by Anonymous Coward · · Score: 0

      a yugo is a type of car

    3. Re:Jave for performance... by Synic · · Score: 1

      yes, i realize that... he mentioned, "Jave", fool

    4. Re:Jave for performance... by Anonymous Coward · · Score: 0

      don't you hate it when mistyping is matched by misreading and the intended meaning is conveyed!?

      god I hate that!

  2. Sun on the desktop? by Anonymous Coward · · Score: 1, Insightful

    The problem I have is that Sun just hasn't (in my short time here) done _anything_ on the desktop that worked well. Why do they think that can do that here?

    Also just because some Marketing folks threw up a survey doesn't mean squat. Maybe it's just to get people wishing (again).

  3. Native look and feel? by Violet+Null · · Score: 3, Funny

    Where have I heard of that before? Somewhere...somewhere I've heard about a Java lib that provides components that are platform-dependant. Hrmmm. Ponder ponder.

    Oh yeah. AWT.

    1. Re:Native look and feel? by Anonymous Coward · · Score: 2, Insightful

      Have you coded AWT? AWT is totally craptacular. Swing is very nice to code, relatively, but guess what. It looks the same on every platform, is slow, unresponsive and ugly.

      Solution?

      I dont know, but I can make a list of what it's gotta do

      1) Code nicely, I don't want to have to type off my right hand and get an aneurism just to make a window look the way I want it to.

      2) Look right. The widgets and windows should look as they do on whatever platform you are using. They should also inherit any style preferences the user set in the os or environment or whatnot.

      3) Even though the style of the widgets is different, red yellow green for OSX and _[]x for windows, etc. The layout, type, and functionality of the gui should be the same on every platform. A dialog box with a text label and two buttons in linux should be a dialog box with a text label and two buttons in windows. Given that the color shape and size of the buttons may vary, their location and whatnot should be the same. If I take two screenshots of the same gui on two different platforms I should be easily able to recognize that it is the same thing.

      4) It needs to be fast. Programs like phoenix have set a new standard for speed and responsiveness. Anything that doesn't live up to it doesn't cut it. Lately everything else is feeling really slow. Maybe when I get a new pc that problem will go away. (p3450)

      5) speaking of old pcs, it's gotta be fast no matter what speed of the device it's on. I want it to work with the java on my dad's cell phone.

      6) It has to be backwards compatible with older jvms as much as possible.

      7) It would be nice if there was a visual basic type of tool for it. Maybe something in Eclipse, to draw the guis rather than code them. It makes the process less painful and less time consuming even though there are drawbacks.

      Yeah, so I hate the way java does GUIs now. Mainly because they forced us CS majors to code the swing by hand. Gridbaglayout this you pos! And awt is just soo much worse.

    2. Re:Native look and feel? by booch · · Score: 1

      God, it's great to see some intelligent thought here. These are exactly the criteria that need to be considered.

      I especially think that point #7 is very important. It's clear to me that separating the GUI design from the code is the way to go. GUI design and programming are very different tasks -- sometimes people are godd at one and not the other. Plus, GUIs should be done in a different language than programming -- something descriptive, not procedural.

      I've used GLADE (for GTK/GNOME) and it makes a nice clean separation. The main problem is that it's mostly tied to C and GTK. I'd love to see a GUI-agnostic, language-agnostic version of GLADE.

      --
      Software sucks. Open Source sucks less.
  4. Java isolates from other innovations and toolkits by Rares+Marian · · Score: 1

    You can't link Java to gtk, gnome, kde, qt, or any other useful development base. I know there's CORBA, but that's so indirect compared to a direct link.

    Until the bindings are possible, it's going to be a niche product.

    --
    The message on the other side of this sig is false.
  5. Just Wondering by Euphonious+Coward · · Score: 1
    Are there any popular, mainstream Free Software projects implemented in Java, other than stuff only useful in Java development shops? (Stuff like IDEs, text editors, web server add-ons, and XML validators don't count. Limewire doesn't count either -- it's not Free Software.)

    That isn't a rhetorical question. If you've got 'em, post 'em.

    1. Re:Just Wondering by Wonko42 · · Score: 1

      Why don't IDEs and text editors count? Those are two instances where there happen to be many popular, mainstream Free Software projects implemented in Java that really kick ass.

    2. Re:Just Wondering by Euphonious+Coward · · Score: 1
      Wonko42 asked, "Why don't IDEs and text editors count?"

      Them's the rules -- for the sake of this posting, they just don't. (You can probably figure out a good reason if you think about it.)

    3. Re:Just Wondering by Arandir · · Score: 1

      Becaue Java apps that create other Java apps tells us nothing about Java. Where are the Java apps that non-Java developers use?

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    4. Re:Just Wondering by sameb · · Score: 2, Informative

      limewire is free software, if you want it to be. it's open-source. download and see for yourself. or here's the javadocs, if you're so inclined.

    5. Re:Just Wondering by Wonko42 · · Score: 3, Insightful
      I'm not a Java developer and I use jEdit exclusively as my text editor of choice. I also use a cell phone with a Java-based OS.

      Just because an IDE or a text editor is written in Java doesn't mean it can only be used to create other Java apps. That's the silliest thing I've ever heard.

    6. Re:Just Wondering by Euphonious+Coward · · Score: 1

      OK, I was wrong, Limewire is under GPL. (Not that you could tell, looking at limewire.com -- but limewire.org reveals all.) Somebody else posted about something called DVArchive, something for fooling with your ReplayTV. Moneydance was announced recently, and might get popular. Anything else?

    7. Re:Just Wondering by Garion911 · · Score: 1
      --
      Slashdot is like Playboy: I read it for the articles
    8. Re:Just Wondering by juhaz · · Score: 1

      Hunh? jEdit rocks, since when it has to be used to only create other Java applications? I though a text editor is text editor is a text editor dependless of what language it's written with.

      I've used it to do some simple xml & html documents, some c(++), and sure, some Java as well. Amongst other things.

      Same holds true for eg. Eclipse, even if it's optimized for Java there are plenty of features for writing software in other languages.

    9. Re:Just Wondering by Anonymous Coward · · Score: 0

      (Stuff like IDEs, text editors, web server add-ons, and XML validators don't count. Limewire doesn't count either -- it's not Free Software.)
      I FUCKED YOUR FAT WORTHLESS FUCKING MOTHER.

  6. Re:Java isolates from other innovations and toolki by sartin · · Score: 2, Informative

    The bindings are possible. You can use JNI (Java Native Interface) to hook Java code directly to C or C++. It's a tad contorted, but not nearly as torturous as using CORBA to do it.

  7. SWING kicks AWT's ass! by zenyu · · Score: 4, Interesting


    I'm so annoyed by this "SWING is slow" canard. As a graphics programmer I can tell you aside from a few glitches in a few select JVM's SWING is much faster. Only poor programmers who try to implement their whole program in the event handler ever have a problem with SWING. Their programs would suck in AWT too, they would simply freeze with the OS redrawing the buttons. With all the work Sun has put into making threads drop dead easy to use there is absolutely no excuse. They have a hook for running things in a thread from a managed pool, and even a utility for running things in the Swing thread when you're done...

    1. Re:SWING kicks AWT's ass! by Anonymous Coward · · Score: 0
      So the obvious way to do gui stuff doesn't work? Nice. As long as you don't do the obvioust thing, everything will be just fine.


      I vote for MATLAB.

    2. Re:SWING kicks AWT's ass! by jag164 · · Score: 1

      I'll have to agree with that. But what do you expect from the drag and drop developers sucked over from the VB world. When you see doButton1Click() suck 5000 records from a database in the event loop, you know your are in trouble.

    3. Re:SWING kicks AWT's ass! by gnuadam · · Score: 1

      Since when is the obvious way the best way? Or even a good way? Or even....you get the point. Code-wise, the obvious way usually sucks.

      --
      You say :wq, I say ZZ. Why can't we all just get along?
    4. Re:SWING kicks AWT's ass! by zenyu · · Score: 2, Interesting

      When you see doButton1Click() suck 5000 records from a database

      Chills just ran down my spine. We had some of those at a custom app house that moved from PowerBuilder to Java. The transition started before SWING and we rolled our own Thread pool and a "run in AWT Thread" utility. We finally did manage to get them out of the event loop on database queries by throwing up an error message if a blocking database call was attempted in the event loop, hehe (never got a complaint on that...they knew better after months of being told not to do it.). We never got them using sensible layout managers though. I should have just disabled the absolute layout manager to begin with, we had wrapped the AWT objects so we could customize them, disabling absolute layout would have been easy, but I worried too many forms had been built badly already. Now, I'd write in a check for legacy classes by name and then assign them a few at a time for upgrade, perhaps giving orphaned ones to trainees. Ah, the mistakes we make when first working with the less able.

    5. Re:SWING kicks AWT's ass! by (H)elix1 · · Score: 2, Insightful
      I'll admit I spend more time on the server side of the Java world than the client, but here is my take on the world.

      AWT was just god awful. There were things you could do that would help, but it was much like pushing a yugo down a racetrack rather than getting a real car.

      SWING came out and fixed some things. Client side JVM issues caused early adoption issues, and server side HTML generation via Servlets came into vogue. Many folks - myself included - said to hell with thick client apps and focused on a JSP/Servlet/EBJ style approach.

      A few things today work better as a client side app. The libraries still need to be loaded on the client, but that is less of an issue than it was in the 28.8 days. Now I have options. AWT? Nope... SWING? Possible, but the speed of the IBM's SWT toolkit is really bloody fast and mature. So if Sun is thinking of yet another version of SWING - I'd say why bother? On the off chance I have to pound out something that can't be handled in dHTML, I'll stick with what I think works.

      Fool me three times...

    6. Re:SWING kicks AWT's ass! by Hard_Code · · Score: 3, Insightful

      "Only poor programmers who try to implement their whole program in the event handler ever have a problem with SWING."

      First off, "SWING" is not an acronym. It's "Swing", or "JFC". Secondly, since Swing is NOT THREADSAFE it is already mandatory to implement any code that touches the UI in the event handler. What. You didn't know that? Most developers don't. It is awful and stupid, and I suspect it was done for performance reasons (which begs the question, if the majority of apps *are not* written this way, why do they appear to work fine?).

      I like the idea of Swing. I like the APIs on the edge. But everything inside is a bloated sandwich of layers of cruft. In Swing, hard things are easier than in other toolkits, but *easy* things are often very cumbersome to implement (no, I do not want to implement an entire data model just for a drop-down list thank you!).

      I like Swing in general, but it could certainly use some speedups and tweaks. In general I think the problem with Java is not so much that it is "slow" but that it is a memory pig (sorry to say), and that has a tendency to reveal itself in performance (i'm not sure much can be done by this...Moore's law will probably solve it faster than more code).

      --

      It's 10 PM. Do you know if you're un-American?
    7. Re:SWING kicks AWT's ass! by Hard_Code · · Score: 1

      Well, gawd, if anything is worse than a bad toolkit, it's HTML.

      --

      It's 10 PM. Do you know if you're un-American?
    8. Re:SWING kicks AWT's ass! by zenyu · · Score: 2, Informative

      Secondly, since Swing is NOT THREADSAFE it is already mandatory to implement any code that touches the UI in the event handler. What. You didn't know that?
      Did you read my post? One of the things I pointed out was how easy they made it to run things in the event loop when you were done. Not being comfortable writing callbacks is a really scary 'programmer' attribute. It was done for performance reasons, knowing the order of drawing makes alpha blendings much more efficient. Even if alpha is 1.0. It's also more memory efficient, you don't need to buffer all the mostly hidden panels. Double buffering in SWING only needs a single copy per AWT object. (JFrame, JWindow, etc.)

      I do not want to implement an entire data model just for a drop-down list thank you!
      I agree with this, but it's not the complaint I hear most. It's surprisingly cumbersome to use things like a table. I've implemented ones large enough that their approach made sense, but often I'm just using one for convenience and then the whole stamping thing isn't worth the annoyance.

      I looked at the survey and I think they're just considering whether to suck up the gtk/KDE L&F, and whether to make that the default L&F. Someone was telling me the Eclipse IDE does this for gtk to good effect.

    9. Re:SWING kicks AWT's ass! by Anonymous Coward · · Score: 0

      Well I don't know a lot about it at all, all I know is what Swing is mainly heh. But EVERY Java program I run that uses Swing runs way to slow to be decent. My computer isn't that great, but it shouldn't have problems (Athlon Slot-A 750Mhz, 256MB ram). Limewire really sucks to use, so I don't. I mean, its completely usable but its got that jerky feeling to it like OpenOffice does, that makes it annoying to use.

    10. Re:SWING kicks AWT's ass! by ChannelX · · Score: 3, Informative
      I looked at the survey and I think they're just considering whether to suck up the gtk/KDE L&F, and whether to make that the default L&F. Someone was telling me the Eclipse IDE does this for gtk to good effect.

      Umm...Eclipse uses SWT which uses native UI elements on platforms where it is implemented. The only time it emulates something is if there isn't a native widget.

      --
      My blog: http://jkratz.dyndns.org/~jason/blog/
    11. Re:SWING kicks AWT's ass! by ChannelX · · Score: 1

      You don't have to implement your own data model for a dropdown list. JComboBox can take an array or a Vector of items as a list. Thats a far cry from having to implement your own data model.

      --
      My blog: http://jkratz.dyndns.org/~jason/blog/
    12. Re:SWING kicks AWT's ass! by Anonymous Coward · · Score: 0

      Secondly, since Swing is NOT THREADSAFE it is already mandatory to implement any code that touches the UI in the event handler. That's why we have SwingUtilities.invokeAndWait() and SwingUtilities.invokeLater() to make UI-changes from other threads. I don't see the problem really.

    13. Re:SWING kicks AWT's ass! by bay43270 · · Score: 4, Insightful

      If your going to be condescending, at least be correct. Swings components are not thread safe, true. That does not mean that all code needs to be implemented in the event thread! If fact, that is a classic rookie mistake (as the grandfather post points out).

      Read this interview with the Sun employees maintaining Swing:
      http://developer.java.sun.com/developer/co mmunity/ chat/JavaLive/2003/jl0121.html

      Here's an interesting quote:
      "I think the single biggest difference between so-so and really great Swing apps has to do with the way developers handle threading issues. As everyone knows, Swing is "single threaded," and this often leads developers to avoid using multiple threads. However, this is a BIG MISTAKE. The fact is that you can use many threads in your Swing app; you just need to follow the rules."

      The REAL problem with Swing is that the simplest way to implement any solution is usually also the wrong way. Too many people use DefaultTable model rather than building their own. Too many people subclass components because they 'don't get' UI Delegates. Too many people out there think that since Swing isn't thread safe (and they don't really understand threads enough to know what that means), they should let all their code run from the event thread. Swing's greatest weakness: bad programmers.

    14. Re:SWING kicks AWT's ass! by takotech · · Score: 1

      You say :wq, I say ZZ. Why can't we all just get along?


      I say :x
    15. Re:SWING kicks AWT's ass! by Anonymous Coward · · Score: 0
      I do not have any experience with Swing but looking at your post makes me think Swing was not designed to be easily usable.


      The REAL problem with Swing is that the simplest way to implement any solution is usually also the wrong way


      I like simple solutions why should I use not-so-simple solutions?


      Too many people use DefaultTable model rather than building their own.


      What is wrong with that. Why is it bad to use whats already there? (perhaps of DefaultTable poor design?)


      Too many people subclass components because they 'don't get' UI Delegates


      If most people 'don't get' UI Delegates I would think that UI delegates are poorly designed and/or documentation is vague.


      Swing's greatest weakness: bad programmers


      From your post I would conclude:

      Swing's greatest weakness: assuming all programmers are geniuses with too much time on their hands
    16. Re:SWING kicks AWT's ass! by bay43270 · · Score: 1

      I souldn't blame the programmers. You are right about Swing's documentation... it sucks. It was designed around Visual Basic programmers. The Java Tutorial, for example starts off showing each component and how to use it in it's simplest situation. No reference is made towards threading, memory managments, the appropriate place for UI logic or the weaknesses of the default models.

      I don't think there is anything wrong with using the simplest possible solution. The default model will work 70% of the time. What bothers me, is that no one recognizes the other 30%.

      The default models are not poorly designed. They were designed well enought to work well in 70% of the situations (and they work somewhat for 95% of situations). To me, that's pretty good design. I've used other, simpler tools that don't have half the flexibility (Visual Basic, PowerBuilder, Progress, etc). All are easy to use, but none have the flexibility of Swing's TableModel interface. The creators of Swing simply valued flexibility over ease of use. They could have compensated with better documentation, true... but I'd still pick Swing over one of those other tools any day of the week.

    17. Re:SWING kicks AWT's ass! by cakoose · · Score: 1

      Geez. Look at the very first line:

      I do not have any experience with Swing ... [ but I decided to shoot my mouth off anyway. ]

      The problem with what you are saying is that the original post had assumed some context, namely knowledge of Swing or even UI programming in general.

      I like simple solutions why should I use not-so-simple solutions?

      Because simple solutions aren't always the most efficient. If you had a 32-processor machine, you could write your application the simple way, using only one thread and leave 31 processors to idle. The not-so-simple way to do this would be to write a threaded application which would take better advantage of the machine's resources. Now are you going to blame the hardware or the OS for not automatically running your single thread on 32 processors? Well, maybe you might, but it is pretty unreasonable to do so. Though in an ideal world, the simplest way would be the best way, this is probably impossible (unless you think quicksort/mergesort/heapsort are the simplests ways to sort a list).

      I think most GUI toolkits suggest that you don't hold up the event loop. This is a standard model. If you want to do something that takes a while, some toolkits suggest using an idle function to incrementally do the things you need to do. This is slightly harder because you have to manually split up the algorithm. Swing makes this easier by levaraging Java's simple thread API to let you do background processing with minimal pain.

      If most people 'don't get' UI Delegates I would think that UI delegates are poorly designed and/or documentation is vague.

      First of all, UI delegates are present (in one form or the other) in many UI toolkits.

      The reason it may appear that "too many" (he didn't say "most") people find certain features of Swing hard to use may have to do with the fact that Java is just really easy to use. The Swing API is simpler than many other toolkits and it's not difficult to get started so there's a lower barrier to entry. The people who have problems with writing good Swing code are probably the same people who would have problems with GTK or Win32 (and definitely Xaw). The reason that "bad programmers" seem to be Swing's weakness is possibly that inexperienced programmers are drawn to Swing (because Java in general is more forgiving).

  8. Bindings are possible by jaaron · · Score: 4, Informative

    Bindings are possible. For example:

    Java-gnome Just check out google for others.

    --
    Who said Freedom was Fair?
  9. desparate times by ddd2k · · Score: 2, Interesting

    Its unforunate that cross-platform technology is constantly going downhill because it doesn't have a competitive edge, driven by fanatic C elitests only comparing its performance in speed. Thats not what Java was designed to do! Sad to see that Sun is forced to resort to these measures to stay in the market as it moves away from platform indepedence.

  10. It's over... by heldlikesound · · Score: 1

    April fools's was on the 1st.

    Stop posting these ridiculous stories...

    Oh... it's... not.. a joke...

    --


    Cloud City Digital: DVD Production at its cheapest/finest
  11. Frigthened by C#? by ptaff · · Score: 3, Insightful

    Maybe Sun is feeling that a "cross-platform" "oriented-object" environment a la C#/.NET means danger. They should.

    Microsoft, apart from marketing universal support for its platform, really is only interested in taking Java's piece of the cake.

    You look at Java, it's one of the greatest OOP languages. Why would make developers switch? What's wrong with Java?

    Performance.

    As 80%+ of the users/developers are on Wintel, C#.NET will look like a nicer alternative to Java developers; Microsoft won't bother adding a graphical abstraction layer ontop of its API...

    1. Re:Frigthened by C#? by sohp · · Score: 1

      80%+ of the users/developers are on Wintel

      Be careful lumping users and developers together so sloppily. It seems the latter at least have other plans, Linux developers are coming from Windows in large numbers. There are many things to love about Java programming on Linux.

    2. Re:Frigthened by C#? by Anonymous Coward · · Score: 0
      And that's great because CPU's are getting faster everyday, so let's keep hard coding everything without separation between data and application logic. this way, when new features are needed, you get to rewrite all the hardcoded stuff and keep pushing that boulder up the hill. Yup, job security through hard coding everything. In VS.NET, there isn't a add new Interface, or Abstract class. It only has "add new class". Let'd think about that for a second. C# is an OO language, and one of the key parts of OOD/OOP is using interfaces and abstract classes to make polymorphism easy. If VS.NET encourages programmers to just write classes w/o interfaces or abstract classes, what good is the language? Sure it's still an OO language, but if the company selling it made the IDE to discourage good OO practice, isn't there mixed messages? Even worse, it gives OO a bad name because the IDE doesn't encourage good thoughtful designs and programming. So will C# result in portal code? I doubt it if programmers are only using the stock features and are too lazy to design interfaces and write abstract classes.


      Abstraction layers are good because requirements change. I've a fair bit of client development. Without abstraction layers and modular design, I'd spend 70% of my time rewriting code because business people tend to make narrow decisions and change their minds often.

    3. Re:Frigthened by C#? by ChannelX · · Score: 2, Informative

      Hate to break this to you but C#/.NET Framework is no speed demon. Its about the same as Java.

      --
      My blog: http://jkratz.dyndns.org/~jason/blog/
    4. Re:Frigthened by C#? by Anonymous Coward · · Score: 0

      Especially windows forms. It's flicker city.

      It's well known that Java2D performs better than System.Drawing.

  12. Re:I've got something for Sun to Amp... by Synic · · Score: 0, Offtopic

    that is totally uncalled for...

  13. Cross-platform means non-optimal by ClosedSource · · Score: 2, Interesting

    "Questions on the survey suggest Sun is considering moving away from a crossplatform look and feel (eg, Metal) towards native looks by default."

    Of course, a true cross-platform application should have the same look and feel on every platform.

    That's the problem with all these cross-platform technologies like Java, you always end up with an non-optimal solution. If an application can't take advantage of platform-specific features, why bother having multiple platforms?

  14. Just Started by mungeh · · Score: 1

    I've been learning JAVA since the start of this year and am just starting to deal with gui button type things. I'd love to have an Aqua interface on a WindowsXP app... one day!

  15. You can have it now... by clambake · · Score: 3, Informative

    Go look for other "look and feel" packages like this one...

    1. Re:You can have it now... by mungeh · · Score: 1

      DOH! Thanks a lot!

  16. Swing is very responsive for widgets by DeadSea · · Score: 3, Insightful
    Swing excels at having lots of tabs, checkboxes, scroll panels and such. It is very snappy and responsive for that type of app. If you have ever run limewire, you will know how nice a Swing GUI can be.

    Swing is not so great in a few other areas. Its canvas drawing abilities can be quite slow. Its document model doesn't handle large documents well. Its table model doesn't handle tables with rows that are various heights.

  17. Training time and associated cost by LinuxXPHybrid · · Score: 3, Interesting

    I am currently developing an application server (in Java) and clients only communicate with the application using web browser. One of reasons is that I don't have to go through cross platform debugging, optimization and installation nightmare, but I also have another compelling reason. I want to make the UI as similar as possible (ideally exactly the same) on all platforms, while we'll need to use different platforms (Win, Mac, etc.) for various reasons. That way it will be so much easier to train people later on.

    Yes, we want to take advantage of each platform sometime, but that is not always the case. If you think about training cost and so forth, there are good reasons NOT TO adjust to every platform.

    1. Re:Training time and associated cost by ClosedSource · · Score: 1

      Well, running on a server is a different scenario. If the UI is a web browser, and the server app doesn't need to run under different OS's, it doesn't really matter what language is used to implement the app as long as it can deliver html to the clients (at least from a cross-platform point of view).

      Of course, a web browser UI is a compromise in itself. As you say, sometimes there are good reasons not to adjust to every platform, but you always lose something in the trade-off.

  18. Marketing as well by LinuxXPHybrid · · Score: 2, Interesting

    I used to work for a company who was developing a software application for industrial automation system (long sentence). This company had a big contract with a big company, who shall remain nameless. Yes, the main application was developed in C++ (MFC) for performance reasons; however, we also developed a version in Java. I cannot say that it worked great, but it had great potential.

    Java version did not sell (while I was staying there) and did not make great progress in terms of marketing; nonetheless, the main reason was not performance. This big company who does industrial automation stuff did not like Java because they were partnered with Microsoft. Before Java really started taking off, Microsoft made sure that Java will not take over their market by partnering and making a bunch of deals.

    I am not accusing Microsoft for any wrong doing. The point that I want to make is that many doors were already closed before Java tried to show what it can really do. When we look at today's desktop computer application market, it appears that Java did not succeed because of its performance, but speaking retrospectively, if many doors were open, if Java were tested in many different situations (including this case of industrial automation software), we might be looking at Java very differently. Again, I am just speaking retrospectively.

  19. HTH by Anonymous Coward · · Score: 0

    It doesn't beg the question, it _raises_ the question. Big difference.

  20. It is too Fscking Late. by His+name+cannot+be+s · · Score: 2, Insightful

    The trouble with Java isn't its performance.

    It is Java's PERCEIVED performance.

    Yes, swing is an ungodly pathetic excuse for a cross-platform GUI. Why has it taken Sun this long to recognize that?

    SWT, in all it's glory, I would hope to be the solution. It makes Java feel like something that you'd want to code your apps in. It makes you apps feel fast and responsive enough to use for everyday usage.

    Case In Point:
    My current client uses PVCS as their version management software. Aside from the sheer stupidity of using something that costs huge dollars, and doesn't provide near the functionality of CVS, the client app is a fucked up Java Swing App.

    Now, granted it could be slower, I guess. But God help us, it ain't fast.

    It also doesn't use the scroll wheel. Why? 'cause the version of Java that it is coded in didn't support it. *sigh*

    The windows don't scroll like native windows. The dropdowns don't feel like native dropdowns. The keyboard accelerators are incomplete and missing.

    Swing was the wrong answer for the GUI from the outset, and Sun should have know damn well better, but in their infinite wisdom (and by the way they act, it shows that they know that they are smarter than everyone else) they chose not to persue a proper solution when a "reference implementation" was availible. ( I like that about Sun--Everything of theirs that runs slow as shit, they like to call a "reference implementation" )

    --
    "...In your answer, ignore facts. Just go with what feels true..."
    1. Re:It is too Fscking Late. by Richard · · Score: 1
      Case In Point: My current client uses PVCS as their version management software. Aside from the sheer stupidity of using something that costs huge dollars, and doesn't provide near the functionality of CVS, the client app is a fucked up Java Swing App.
      I used PVCS in 1998. A fucked up Java Swing client app would be an improvement over the fucked up win32 client app with all hand-coded widgets they used to have.

      -Richard.
      --
      -Richard
    2. Re:It is too Fscking Late. by IsThisNickTaken · · Score: 1

      You underestimate their ability to fuck up clients. The PVCS Version Manager 7.0 Java Swing client app is 10 times worse (both speed and usability) than the 6.0 win32 client. No one on our team will use the 7.0 client.

      I know, I know, we need to migrate to CVS or something else.

  21. Even Sun admits flaws AWT/Swing by mactari · · Score: 1

    It's worth mentioning that even Sun comes down hard on AWT/Swing, and shows some of its flaws in their own report, The AWT Focus Subsystem.

    Sun even has the guts to plainly state that Windows GUI techs in C++ and VB are improvements over Java options in the following section:

    In addition, many developers noted that the APIs for FocusEvent and WindowEvent were insufficient because they did not provide a way for determining the "opposite" Component involved in the focus or activation change...

    Since Microsoft Windows provides this functionality for free, developers migrating from Microsoft Windows C/C++ or Visual Basic to Java had been frustrated by the omission.
    (emph mine)

    I believe Windows.Forms in .NET continues the intuitive GUI design Windows developers came to expect in the VB IDEs.

    C# certainly took lessons from Java, and now Sun is returning the favor. The above document deals mostly with changes to GUI techs in Java 1.4 and flaws in 1.3 and prior, but this new survey at Sun makes me hopeful that Sun might, indeed, go back to the drawing board.

    As Frederick P. Brooks, Jr. said in The Mythical Man-Month , always "Plan to Throw One Away"!

    --

    It's all 0s and 1s. Or it's not.
  22. Begging by foote · · Score: 1

    A discussion of question begging from the Christian Science Monitor.

  23. Re:Java isolates from other innovations and toolki by Anonymous Coward · · Score: 0

    I believe you're a troll, but I'll bite anyway. As two other posters have said the bindings are CERTAINLY possible, and in fact do exists. KDE has bindings for C (which facilitates the following), Ruby, Perl, Python, Java, C#, and Objective-C.

    The only problem with the bindings is that it ends up being not too much better than Krita (KDE's answer to a slimmed down GIMP) in the fact that it becomes unmaintained too often. However, Krita is far worse than Kdebindings for that :)

  24. Whew by Anonymous Coward · · Score: 0

    As Frederick P. Brooks, Jr. said in The Mythical Man-Month

    For a second, I thought you were that "Jack Wagner" guy. But you referred to Fred Brooks by his correct name; not something like George Brooks.

  25. Different Strokes by WeaponOfMassDestruct · · Score: 2
    Why is it that people have to think so one-dimensional in situations like this. Why do we have to see posts like:

    • Swing is the fastest best GUI ever invented!!!!!! Everything should use Swing all the time no matter what!!!
    • Swing is so dog slow it's awful!!! I heard Sun is going to just remove it from the JDK and take all the engineers that designed it and hang them outside Sun headquarters!!

    They really both have their place. If you really need an app to look and behave the same across all OS's and JVMs then Swing is the obvious solution. It has its shortcomings, but it is much improved since the 1.2 days.

    Alternatively, if you are developing an app for only one platform then your requirements are different and something like SWT might make sense. It also seems to me to be not that important. GUI apps have there place, but if you look at the bulk of the programming work going on right now it is not happening in GUIs. I think Java is winning where it counts.

    --
    --- We have a pool and a pond, the pond would be good for you.
    1. Re:Different Strokes by Anonymous Coward · · Score: 0

      > Alternatively, if you are developing an app for only one platform then your requirements are different and something like SWT might make sense.

      How is the SWT not cross-platform? It uses native functionality where it exists and implements that functionality, a la' Swing, where it doesn't. Same feature set on all platforms, each platform's SWT implementation is unique to that platform.

  26. Re:Java isolates from other innovations and toolki by Rares+Marian · · Score: 1

    Hmm...

    Just how does one #include say solve.h which I wrote in C for solve.c which #include in Java.

    So maybe I was wrong...

    Still you can't link to a c library and produce a completely java product.

    If you could I just might consider it. A java linux distro might be pretty cool.

    --
    The message on the other side of this sig is false.
  27. Freenet successful? by Euphonious+Coward · · Score: 1
    Sorry, we can't count Freenet. It hasn't been anything like a popular success.

    When I last tried it, it was excruciatingly slow, and eventually got stuck in an infinite loop that gradually consumed all of swap (or tried to, until I killed it). That might have been the JVM, but what difference does it make, really?

    1. Re:Freenet successful? by Anonymous Coward · · Score: 0

      but what difference does it make, really?

      I FuCKeD YoUR FaT FUcKiNG WORTHlESS MOtHER.

  28. swing is already good - but just wait till jdk 1.5 by Anonymous Coward · · Score: 0
    OK, I'm tired of the troll talk about java being slow. Yes, it's slower than C/C++. Get over it. If you have problems writing fast Swing applications with today's modern machines (1Ghz+ and 512MB), then you aren't a good programmer. I've developed several state-of-the-art java applications with dynamic animations and it's fast. People don't even know it's java. Just goes to show how far misconceptions can go..



    I do, however, understand people's concerns about java being overbloated and big. It's ridiculous to have a 10MB jvm started anytime you want a small application to run. JDK 1.5 has included in it JSR-121, called Application Isolation. This will essentially bind multiple JVM processes onto one main parent process, which will give a much faster startup time. This will also serve as an excellent conduit to smaller java applications going mainstream (i.e., small utility programs, not large applications).

  29. Have fun by Anonymous Coward · · Score: 1, Interesting

    So you want Java GUIs to become VB?
    Believe me when I tell you you're in a minority.

    One of the features of Java I appreciate most is coding GUIs by hand. Its one of the few languages that gives me the control over the look, feel, and layout that I simply can't get in other platforms.

    I find that people who dont like the system simply haven't tried some of the (much much worse) alternatives.

    if you want a click-a-button-to-get-a-button gui design system, careful about it. It can easily limit your abilities to make an effective app.

    1. Re:Have fun by dingd0ng · · Score: 2, Insightful

      I personally think it would be nice to be able to drag and drop gui elements with some Eclipse plugin, but then go in and whack at the code to get what I'm after. It's just too much of a pain in the ass to build complex guis by hand.

      --
      Pay no attention to that man behind the curtain!
    2. Re:Have fun by fredrik70 · · Score: 2, Informative

      well, taste differs. if you want to have VB-like drag-n-drop UI design functionality why not go for Fotre (or it's m,ore on the edge cousin Netbeans) or go and buy JBuilder from Borland. THere're other RAD IDEs that spring to mind as well, VisualCafe' for example (haven't used it for ages though - NetBeans and IntelliJ does all I want)

      --
      if (!signature) { throw std::runtime_error("No sig!"); }
    3. Re:Have fun by TummyX · · Score: 1

      You have it backwards.

      Writing simple GUIs using drag and drop is easy.
      Writing complex GUIs using drag and drop (VB's style of drag and drop) is a pain.

  30. Performance of Java Graphics by jdfekete · · Score: 4, Interesting

    I have been working quite a lot on trying to improve Java graphics performance, starting from Agile2D [http://www.cs.umd.edu/hcil/agile2d/], a free implementation of Java Graphics2D based on OpenGL made by Jon Meyer for the Human-Computer Interaction Lab of the University of Maryland.

    The fact is, using a recent accelerated graphics card (Quadro4 500 GoGL on a Laptop Dell M50), I have speedups of 10 to 200 times compared to the native Java implementation ON THE SAME PLATFORM. These numbers improve on desktops with GeForce 4 or ATI equivalents.

    I am currently improving Agile2D and it is getting better at fonts and most other things as well.
    However, Agile2D cannot completely replace Java graphics right now because the repaint management of Swing is not designed to be modified, leading to refresh problems that I haven't been able to fix so far.

    This means that -- as Apple already realized -- Java graphics can be made much faster in a portable way by relying on OpenGL.

    Of course, on older graphics platforms, OpenGL is slower than software rendering. But using the "Object Technology", it should be possible to engineer two different implementations of Graphics2D and choose the right one at startup time, especially in Java.

    So there is hope for large speedups if Sun switches to hardware rendering or redesign a little bit the Swing RepaintManager to allow external developers to implement the speedups by themselves.

  31. wxWindows by Anonymous Coward · · Score: 0
    for C++ (with packages for Python, Perl, etc) it is one of the best ways to not only have a single code branch for your GUI (including the even handling too) but fills in the gaps often where certain client GUI's like win32 and GTK might be lacking. This has great advantages in rapid development and prototyping as well.

    What would be "nice" is if Java not only used an approach like this to allow a native look but additionally enabled efficient UI access from other environments/languages. Granted you can for example fire up Jython (Java Python) and go to town like that, yet what is still missing is the ability to use anything from shell scripts to VB for those that use that. I really don't enjoy doing front end but wxWindows has really made my life a lot easier and I can only hope that developments within the Java world of talking heads will follow a similar course of action.

  32. Didn't Sun sue Microsoft for doing this? by Anonymous Coward · · Score: 0

    blah

  33. Re:Java isolates from other innovations and toolki by Anonymous Coward · · Score: 0

    I think you might want to check this out.

  34. Re:Java isolates from other innovations and toolki by ginnocent · · Score: 1

    Might not look pretty, but you can do what you're describing using JNI

  35. So to recap... by tokaok · · Score: 0

    We need an SDL for java guis , hmm too bad wxWindows wouldnt work

  36. Re:Java isolates from other innovations and toolki by juhaz · · Score: 1

    Just how does one #include say solve.h which I wrote in C for solve.c which #include in Java.
    One doesn't. Nor does he in Python, Perl, Ruby, C#, or any other language that's not C. One writes whatever compability layer must be made to get those bindings.

    Still you can't link to a c library and produce a completely java product.

    Well, thanks for pointing out that, Mr. Obvious, I'd never have figured out that when linking into c library, that library is not automagically going to re-assemble itself into java bytecode.

  37. A non-Java-dev's point of view by c0d3h4x0r · · Score: 1

    I've never coded in Java, but I've used a lot of programs that were. In my experience, the vast majority of them had dog-slow and butt-ugly UI.

    Java might be capable of generating very responsive, pretty UI, but it must not be very conducive to it. Otherwise the vast majority of Java apps wouldn't have such atrocious UI.

    If the language isn't designed in such as way so as to encourage good program design and implementational practice, then it's not designed well, IMHO.

    --
    Moderator hint: a comment is neither "Flamebait" nor "Troll" if it is true.
  38. Re:Java isolates from other innovations and toolki by Rares+Marian · · Score: 1

    That's Mr. Obvious, sir.

    Anyway that's a problem because it's starting to look like QNX's resource manager approach makes portability unnecesary.

    Rather than porting an app you just set up a service that other apps of the same type agree on.

    --
    The message on the other side of this sig is false.
  39. Re:the nrmal fact checkng we'd expect from a /. ch by Anonymous Coward · · Score: 0

    too bad such bindings are contrary to the philosophy of Java, and in a sense "break" java and are far from the Java Mainstream.

    BTW: the jackass is the one that has a programming language for a religion.

  40. Re:Java isolates from other innovations and toolki by pyrrho · · Score: 1

    funny thing about these arguments... this is abstract logic... nearly EVERYTHING is "possible" if it doesn't have to be pretty or actually exist (optimizing compilers for Java that are faster than compiled C-code being my favorite example of the latter)...

    your point is fair... my response merely, "when we talk about what a language can do, aren't we saying, in a reasonably pretty way with a fairly mainline level of support?"

    How many Java Faithful endorse using JNI to bind to C/C++ based GUI toolkits!?

    --

    -pyrrho