Future of GUI development in Java? [closed] - java

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
Considering that
Sun/Oracle decided to not develop Swing any further after they "invented" JavaFX
JavaFX doesn't really work and some consider it a failure already
the not really platform-independent nature of SWT, the manual task to dispose GUI elements and the necessity to bundle platform-specific libraries
is there another way out?
If I would like to do GUI development on the JVM
with a good API (Swing and SWT are not bad, but they are not really good either.)
which "feels" responsive (still a problem today with Swing and SWT, despite the claims that this is solved.)
which won't be obsolete in a few years
what decision should I make?
Is there even a third option available or a possibility there might be one in the future?
An option
which is fast and responsive (Not Swing's ideology of "If it's not fast, it is the developer's fault")
with native look and feel
with a single library which runs on all platforms
Is this realistic?
Thanks!
=========
To clarify: If I have to start a new software project on the JVM, there are several existing options, like using SWT or Swing, using Swing with third-party libraries like SwingX, JIDE, JGoodies, Flamingo or using application frameworks like Netbeans Platform or Eclipse RCP. Is there a supported/suggested way which weakens the pain normally associated with Java GUI development?

The answer is prefer swing, I think.
since 1.4 there are big progress on awt (sun do that because java fx need awt, fortunately)
since 1.5 big progress in thread managment (SwingWorker and concurrents things)
swing is excellent, responsive (what the problem with developper fault ? ), native l&f, and so on
there are excellent libraries, like swingx, trident, etc, and platform, like netbeans.
Of course it is a mature technology (a little old), but I know nothing else. It will be cobol of GUI development :-)

You won't find an objective answer to this question, only personal preferences and options.
SWT
My personal preference is SWT. I started using it, when Swing was to bad to be an option. SWT is "just" a layer on top of the native windowing APIs and thus applications written with SWT feel like natively written applications. Those can also be screwed up. No API will ever be safe from bad developers. The performance is as fast as it can get in my experience. If it is not, there is another way of implementing it, where it will be.
SWT's API is very low level which makes implementing basic stuff unexpectedly tedious, but fortunately most typical usecases can be solved with JFace, which improves the situation. And when you use the API for a while you'll accumulate your own util classes. You can become pretty fast in implementing SWT tools.
Since SWT gives you only the basics, you need MigLayout and Nebula widgets to survive. You might like Glazed Lists.
Qt Jambi
Actually I would have liked to include another option besides SWT and Swing for you: Qt Jambi. But Nokia gave up on this, and it is "maintained by an open source community" now. So I don't know about "not being obsolete in a few years".
Nevertheless I am excited by this ongoing discussion. Some people have written an SWT implementation using Qt Jambi as "native" API. They are trying to figure out how to contribute it. Having Qt as an option might enable your "single library which runs on all platforms" for SWT one day, though I wouldn't count on it anytime soon.
But for me your requirement of "a single library" is not such a big issue. Use maven for your builds, add a few lines of configuration and you'll forget about this very soon.
Swing
I can't really compare SWT to Swing, since my experience with Swing is limitted. As a user I don't like most Swing applications, but I did see some beatiful ones.
Nowadays the native look and feel of Swing apps got pretty good, but you won't fool a power-user. Also performance seems to be really good in new and well done Swing apps, but again, this is only from my limitted view as a user.
Obviously there are more 3rd party extensions for Swing than for SWT - just do a Google search. (But then again, if you endure the pain of learning Eclipse RCP you'll get an huge, interesting infrastructure as well. That's not talking about widgets though, that's stuff like EMF or RAP. I am no Eclipse RCP person - I never had enough patience for that...)
A really big advantage for Swing, if you like that stuff, is Matisse, the GUI builder of Netbeans. Qt has also a well done GUI builder by the way.
Summary
If you plan for long term, I don't see more options than SWT or Swing for GUI development in Java. Both are good enough to satisfy most needs if you spend enough time. But they are not perfect. You'll always envy people using other languages for their widgets, implementation speed, tooling, ... If you are not bound to Java, you might even prefer Flash or Qt.

Related

lazarus or Java [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I have a Delphi background, also C++ background. But last several years, I involved in web projects, and worked primarily with PHP. Now I am looking for a platform to develop simple desktop applications (interacts with server). I was thinking of Java as I am used with Eclipse IDE, and have C++ background. But I see Lazarus became a mature environment. its applications even work on Java Virtual Machine. In the past I have seen that some Amateur looking technologies have became popular than professional ones like PHP, Flash even Object Pascal. So should I choose Java, or lazarus for desktop application development.
If you have a C++ background, try the Nokia Qt framework which has everything you want to develop desktop application. the Qt SDK is shipped with its own IDE (which's really great) and rich APIs.
Enjoy :)
Of the two options, I would certainly choose Java (larger support base, more stable, more 3rd party libraries, etc).
You mention that you come from a C++ background. Why not just use C++ (theoretically easier than picking up a new language).
If Lazarus runs on the JVM, it should have access to the same libraries as every other JVM language, so you'd be learning swing, etc.
If you are going to do desktop apps and you want a decent GUI toolkit you really have two choices as far as I know, either go with a JVM language or .net
If you go with a JVM, why in specific Lazurus? There are dozens (well technically hundreds--possibly thousands) of JVM languages to choose from. Go with anything stable that helps you get the job done.
Hmm, that is UNLESS you don't work alone. If you work with others, I suggest Java (or C#) period (Maybe Scala). Otherwise you will have a heck of a time hiring and training.
There are also probably C++ GUI frameworks, even cross-platform sometimes but none will be as rich as everything that is available on the JVM or .net platforms.

JavaFX, Swing, or Flex for Java Desktop Applications [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Most of the desktop application development I do is in Swing, and I'm curious to hear people's thoughts on using JavaFX and/or Adobe Flex for building desktop applications. Have you had success building desktop apps with these? Or would you stick with Swing for now and use tools to help make Swing development more productive?
If you're making desktop apps, I'd stick to Swing. JavaFX/Flex/Silverlight would be more appropriate for RIA - rich internet apps. Although I'd argue that none of them would be a choice for the long term - looks to me like HTML5/CSS3/Ajax are winning the day, but thats a pretty subjective area. But for desktop apps - I'm a big fan of Swing (also Java Web Start is a very underrated technology)
I would say that JavaFX can be seen as a kind of extension of Swing with a new way of developing a Java GUI by using a declarative programming language: the JavaFX Script. JavaFX Script code looks exactly like a JSON script, unlike Adobe Flex or Microsoft Silverlight which uses an XML syntax.
JavaFX Script can interface with Java and therefore can call Swing components easily. It's really a new generation of GUI API, like Swing was for AWT: nice graphical components, new easy ways to manage layouts, really nice features to build dynamic interfaces: bindings, timers (to build animations), etc. Have a look here: http://www.javafx.com/samples/ and to the tutorials and see how fast you can build a kind of Google Picasa application... The API even contains some tools to use easily web services: you can find plenty of samples of GUI built in JavaFX connected to some public web services (like a Weather Forecast tool).
And the best... is the deployment part. You can embed your application within an html page, like an applet, and the user can drag and drop the application to her/his desktop to use it whenever she/he wants (without returning to its browser)!
Really, I think JavaFX, at its early stage though (v1.2), is a really good tool and represents the first step for Java toward the next generation of applications: the Rich Internet Applications (RIA).
Java Swing is an established and mature technology for desktop development. You'll be able to find lots of information online and plenty of sample programs. With that said, however, you might want to consider Adobe AIR. AIR is basically a runtime that lets you run your Flex apps on the desktop, and gives them access to local resources such as the file system. I've written Java Swing apps for 10 years and I am amazed at how much more productive I am using Flex/Adobe AIR. One nice aspect of Flex is that you can create your GUIs declaritively, much like how you use HTML to declare the layout of a webpage. It's a much more concise way to specify a GUI, and much faster and easier to maintain than the reams of Java Swing code you need to do the same thing. I wouldn't recommend JavaFX since it is so late to the party and hasn't really gotten with mainstream developers.
You should try them all and see which one fits best with your requirements. If you want to see what you can do with Flex and how to do it then check out Tour de Flex.
Some of the advantages of Flex are that it is mature (over 5 years old now) and a significant area of investment for Adobe. You can also find numerous examples of AIR apps built with Flex in the Adobe AIR Marketplace.
Swing can look good with Substance L&F.
However, if you are developing alone (as opposed to with a team), trying JavaFX might be a good idea.
Please read the about this, write extremely lightweight swing applications and with the same code base move it to web.
demos
runtime
I had evaluated these for desktop application and finally desided to go for JavaFx . This have very good media library and hardware accelerated graphics and media capabilities . With Jdk 7 update 6 onwards contains JavaFx totally I integrated no separate installation is required . Java swing is very good technology and will be continued but I see JavaFx is the future for GUI and Internet application to some extent. Biggest advantage for me was that JavaFx app could be converted to exe files with native packaging
Also try scenebuilder for drag and drop component designer
I feel that I do not have enough information to answer this question. There are many applications in which an AIR approach is a better choice, other applications use other technologies better. I am primarily an AS3/Flex developer, but I know there are many instances where one of the Java platforms is a better choice. Now that Flex is no longer an Adobe product but rather a Apache product, it will either improve the product as the users will create the roadmap, or kill it off completely.

Apache Pivot 1.4 vs. JavaFX, Flex, Silverlight, Swing [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've recently heard about Apache Pivot being moved to the Top Level Projects category and I was wondering who has tried the most recent version and compared it to other RIA tools. What are the proper categories for comparison?
It seems to be easier to pick up for Java developers since JavaFX has a different scripting language. The Pivot developers say that Pivot is what Sun should have made instead of JavaFX.
Good to hear from you. :-) I agree that we tend to focus more on applet deployment in Pivot's design. However, there is nothing inherent in the platform that prevents an application from using multiple top-level windows. It's just not something we cater to since it isn't relevant to our primary use case (which, as you noted, is browser deployment). Note that it is also not possible to create multiple top-level windows in Flex or Silverlight.
Re: "who is creating applets these days?" - it's not so much about creating applets as it is about creating RIAs. If you ask the question, "who is creating RIAs?", I think the answer would be "a lot of people". Pivot simply allows developers to build RIAs in Java (rather than ActionScript, for example).
Greg
I worked with Pivot and even been part of Pivot development. It is a nice little library, but...
It cannot replace Swing or JavaFX. The original authors are positioning it to compete with Adobe Flex. Because of that its concepts are more like applet than desktop application. It is almost impossible to create a modern desktop application simply because it has a concept of one main window and all the child windows are "inside" of it. I discussed this with authors but it looks like this is the way they want to go.
The library uses its own custom collections library which is sort of strange, but it isn't a show stopper.
Other then that the library is nice. But who is creating applets these days?
Well, I checked pivot 1.4. You can have sub-windows.
Oracle/Sun is putting a lot of effort into promoting JavaFX but it seems to me that all the layout feature etc from swing are gone in profits to some multi-media stuff. Right now FX and business applications are two things very far from each other.
For business RIA application, my first impression is that Pivot is much better designed than FX.
Pivot provides a lot: binding, easy web service, nice design, xml definition of UI... - Yes a lot to consider for a Java developer.
Not perfect but looking at what they have accomplished these last 6 months... impressive!
If you are intereseted in the statistic view -
I compare through 'google trends' between JavaFx to 'Apache Pivot'
and looks like there is no competition - JavaFx lead in a rate that is close to 1 to 0
so it gives perspective about the standard of the industry towards those frameworks.
http://www.google.com/trends?q=apache+pivot%2C+javafx&ctab=0&geo=all&date=all&sort=1

Do beautiful, user-friendly Java applets exist? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
When I use Java applets, they tend to be slow, don't integrate very well with the browser environment and often require a few click throughs ("No, I don't want to give this unsigned application free reign of my hard disk").
So, I'm curious.
Are these problems insurmountable? Are there Java applets out there which integrate well with the browser experience (in, for example, the way a well-designed Flash application does?) Can you point out any examples of really "nice" Java applets?
I'm asking this because I want to know if I should be taking a more serious look at Java-in-the-browser, or if Flash will remain dominant for the foreseeable future.
Edit: Unintentional flame bait has been removed. Sorry for any offence caused.
The Facebook asynchronous image uploader is a Java applet.
Update: Apparently not developed in house at Facebook. This seems to be the product.
Amendment:
Now that the question has been updated to be a bit more concise, I thought I'd add more to this answer.
This kind of problem, a mass image uploader (in this case), is the kind perfectly solved by a Java applet. Why?
It uses native UI elements, so users are not confused, or have to learn a new interface.
It can save massive amounts of bandwidth and overhead, because image transformations, such as resizing and cropping, can take place on the client side, rather than the server.
Write once, deploy everywhere (almost, sorta).
Visual Thesaurus is the coolest / best applet I know of.
Check out PulpCore. A really awesome Java applet framework:
http://www.interactivepulp.com/
Performance for it seems pretty amazing too if you check it out on bubblemark.com
Some of Ken Perlin's applets are beautiful.
see http://mrl.nyu.edu/~perlin/
eg:
http://mrl.nyu.edu/~perlin/experiments/unicycle/
http://mrl.nyu.edu/~perlin/homepage2006/simplex_noise/index.html
http://mrl.nyu.edu/~perlin/experiments/orange/
(...)
Simple floor plan designing with java applet here. Works much faster than dragonfly.autodesk.com or floorplanner.com (both are flash applications).
A few things...
Some game sites, like popcap.com, use Java applets for their games, and they look pretty good and are very usable.
As far as "why is that button cropped?" - that's probably a layout manager issue. See my article on layout managers, in particular:
http://java.sun.com/developer/onlineTraining/GUI/AWTLayoutMgr/shortcourse.html#whyNeed
There are many nice looking applets created with Processing (which is basically Java with some fancy graphics libraries included).
Just take a look at this visualization.
(source: zumkuckuck.com)
In high school I used to play a ton of Yahoo Games and I'm pretty sure those are all java applets. It looks like Yahoo have updated their site since I went there last but you can still find all of the old games here.
The MMORPG Runescape uses a Java applet as a client, and works very nicely, although the graphics aren't nearly as good as other games of the type I've seen. Jagex, the publishers, also have a game site called Funorb.
Another game which is in Java (though not an applet) is Puzzle Pirates. It's not exactly beautiful but it's cute and it's very addictive. Also, it's very speedy and smooth (which has been a knock against Java applets).
Java applets are like flash scripts - They can be used for good, but are often used for evil (e.g., annoying banners). IMHO the main reason that they didn't catch on is that they require tended to require too much skill and used AWT/Swing which produces worse UIs than what a designer with little programming skills could achieve with flash.
I would say that yes, they still exist, but more for business goals that don't require pretty UIs. For example, A lot of web-based statistics calculation tools are based on nice applets.
It's certainly possible. Java2D (the standard graphics component in Java) is capable of rendering beautiful stuff. A big problem is that the default Swing Look and Feel is ugly. I believe Java 7 will have a better one, but there are also very beautiful third party ones such as Substance. I've personally developed a small Java applet game which, apart from the jagged text in the intro screen (which is a bitmap, not rendered text) is visually indistinguishable from a Flash game.
My mom is addicted to the casual gaming at pogo.com, and I've gotta say, they've done an amazing job at fun, easy to learn, nontraditional games that look perfect. I'd love to see their code, honestly.

Is Java the best language to develop cross-platform GUI applications? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
For "best" I intend that the code shouldn't need, or need very few, platform specific tweaks.
I strongly recommend Java for cross-platform GUI development. In particular, I recommend the GUI builder that comes with the Netbeans IDE. It's very simple and very powerful. You can point and click and drag and drop to create a GUI, and easily customize the actions which various buttons and other components take.
I much prefer Python as a language, but none of the free tools for GUI development come anywhere close to this, and the same thing seems to be true for the other languages I've used. (I should point out that QT has wonderful GUI developers for various languages such as C and Python, but it's only free when used on open source projects.)
EDIT: QT has recently been relicensed as LGPL, so you're free to use it in commercial applications. The Python bindings for this (PyQT) have not been re-licensed, but another project called PySide has been created to provide Python QT bindings.
I personally despise the whole concept of emulating the native GUI that is where the Java GUIs are rooted. Instead of being at home wherever you go, it makes you a tourist everywhere, often needing an interpreter. The Eclipse GWT is a better toolkit that makes much better use of local resources, but it still holds that people love to write Java code, and hate to use Java applications, think of it: which Java applications you love on your desktop?
Tk is just as ugly and limited on any operating system you choose to run it onto, and the same goes for Qt, in my opinion.
Mono would need a good try, as it is a way to answer the question "why Linux sucks", if you remember that old post bi Miguel de Icaza. Mono comes with a mature set of widgets and Apis and does not try to limit what you can do in order to give you portability.
Silverlight is close to portable and has a great interface definition language, but lacks access to the system, you have to split the application between a server and UI even on the same machine to overcome it.
Adobe AIR is a dog and local system acces is not easy.
If I am able to choose, I tend to avoid GUIs altogether and try to use a web server, even a local web server, and Json, JQuery and all that stuff. I found out that I can have many more choices and am more productive than with native widgets. This combines the strengths of the use of a real language server side and the wonderful disordered geniality of JavaScript in the GUI.
Yes: use Eclipse RCP. You can write not only cross-platform, but e.g. multilingual applications with it. SWT provides the native look-and-feel for multiple platforms and windowing systems.
So as I understand it, there is currently NO truly cross-platform high level language & GUI toolkit right now.
Java is cross-platform, GUIs in both SWT and Swing can look good, when you really try hard to tweak them pixel-precise and provide modifications to the look to supported platforms. There are currently some good GUI designers, but nothing as great as OpenStep 15 years ago.
QT is now LGPL'ed so long as you only link to it dynamically. Well but QT has its own set of problems and is a superset of C++. You have to compile against QT-hacked compiler, not the generic C++ one.
didn't try the wxWidgets, but from the looks of it, it can work, but is NOT high level toolkit at all!
There seems to be an option to write in C# and opensourced .NET and run it via Mono in other platforms than Windows... Didn't try, but it seems to me, that is just porting Microsoft on other platforms.
There is GNUstep, but for now it looks for me, like it is only developped by some opensource geek fans. It would be really interesting to see the OpenStep stack outside of the Mac OS X, but for now this looks to me as not viable.
Even Java, while it is self-contained, does not currently provide great GUI designer capabilities. I used the GUI designer tool once when starting to learn how to code with SWT, and now I find myself coding it by hand, which is really not bad, but it really should not be necessary. But that was few years ago, I will have to try again.
You can of course create your cross-platform application core and service code in one language (Java, or C/C++ if you want speed), creating something like a server or unix tool and just connecting to it from the GUI that you create on each desired platform using its own tools. The result is that the GUI is platform native, taking advantages of the features of the platform, and should be fairly simple to create for each desired platform. (Cocoa on Mac and .Net on windows provide rich features for the platform they are native to).
We will have to look into the robustness and matureness of such ideal solution. It should have good commercial and comunity backing and be fairly evolved right now, so as the future implementations of such tools will provide us with more than the mere LOWEST COMMON DENOMINATOR for all the supported platforms, but to leverege the cross-platform tools to include and adopt well-designed concepts and rich features native to the relevant platforms and distribute them cross-platform.
Only than can be cross-platform development truly viable and adoptable in great numbers.
Suggestions?
Java is certainly nice, but I've been doing just fine with Python and Qt via PyQt4 lately. I find that I get things done faster than I did in Swing or SWT, too.
So far, no platform-specific tweaks have been necessary, and Qt4 widgets look nice on different platforms. The Qt GUI builder is very nice, and using Python has enabled easy integration with some other cross-platform frameworks (notably VTK, scipy-cluster, and some SWIG-wrapped objects for interfacing with files output from a performance tool).
Note that Qt is not free unless you use it on open source projects.
As long as someone defines "platform independence" correctly, Java is the best.
Some people argue that C# is the best, but those people seem to misunderstand the term
"platform independence" ;)
Note: I refer to the fact that C# is ported to Linux/Unixes only as long as Microsoft and Novel keep up their treaty. The community itself would never be able to maintain such huge platform as .NET
These days there are many languages that allow you to create cross-platform GUI applications efficiently. Java, Python, Tcl/tk, C#...
I think you need to define the requirements of your application a bit more, for instance:
Will the UI be Web-based, or desktop-based?
Is the application going to be a large or a small?
Will it feature some sort of "extension" feature (e.g. plug-ins)?
Will it function over a network, and is it likely to be distributed/load balanced?
The list can go on forever, work out the defining points about your application, and start researching the language based on the whole.
I would also consider Mono as serious contender for platform independence and a good IDE tool.
Java's performance sucks on the desktop. Just check http://www.codeproject.com/KB/dotnet/RuntimePerformance.aspx
For native binaries, wxWidgets is a convenient solution.
I would tell you that is even better than Java for the user experience side. Even though you can make the presentation layer look pretty much the same for all platforms in Java, they all look like Java. On the other hand, wxWidgets make the user feel like a platform specific build (and it is, indeed), but you can use the same code to compile for several platforms (at least the major ones).
I would think that it depends on what kind of platforms you plan on targeting. Java will have the most platforms with a VM. However, if you just want to use Windows and Linux, you can use C# (using mono on linux).
Based on your definition, no. Even wit the newest graphical libraries you can expect to do a bunch of testing on different platforms.
Flash would probably be the best. Wide spread and better at looking the same across different platforms.

Categories

Resources