Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Java is one of the most widely used languages in the world. I get the impression that people who think using Java is an issue are usually just hiding their own inadequacies by repeating hype they read on the Internet.


Would you still use it on the client side today?


Assuming that I can't get away with a web app, and need to install something native on the client side... is cross-platform support required?

If so, then your choices are:

1. Write separate native clients for Windows (in C#) and OS X (in Swift or Objective-C), and perhaps Linux (in whatever). It'll be hard to hire people who can work on all three, so you'll need more headcount and organizational/technical complexity.

2. Use a cross-platform framework like Qt, Wx, Gtk, etc. This will probably push you toward C++, which can be difficult to hire for. And you'll get constant complaints that the UI doesn't "look native enough" anyway.

3. Use Electron, and whichever JavaScript SPA framework is trendy this week. Have everyone on Hacker News declare your client to be "Flash for the Desktop", and be forced to re-write it with the next trendy framework two years later so that anyone will want to work for you.

4. Use JavaFX, and the JDK's built-in "javapackager" tool to create native installers for Windows, OS X, and Linux. Each of which includes a bundled JRE, with a size smaller than Electron. You won't be able to find a lot of JavaFX experience on the market... but Java developers are easy to find, and it only take a few weeks for decent ones to get up to speed with the framework.

Hell yeah, I'd use Java on the client side. None of the options are great, but Java's probably the least-bad.


I kind of wish that Sun had never come up with applets. Java in the browser was a bad idea from so many different perspectives.


What do applets have to do with anything?

I wish that applets had never been invented, too. But only because of market confusion. So many people who don't know anything about Java mix up applets (which haven't been relevant in almost 20 years) with Swing or JavaFX desktop apps, think that security vulnerabilities found in the browser plugin mean that standalone Java apps are "insecure" in general, etc.


I think applets gave Java a terrible black eye as a client-side because of how insecure Java in the browser turned out to be.

The market confusion I would blame on Netscape for choosing "Javascript" as the name for their scripting language.


Applets have nothing to do with Java desktop app development, and I don't think anyone has confused the relationship between Java and JavaScript in over a decade.

I don't believe you really have anything to contribute to this thread, and are just bouncing from one tangential reference to the next to feel insightful.


First, I'm sorry if I've offended you in some way. Your original answer to my comment was a very good one.

I have to respectfully disagree that nobody confuses Java and Javascript these days. There's an active thread on Quora about this very topic.


As it seems, there are only two good options if you need a decent cross-platform desktop GUI without having the means to go full-custom for each platform. These are Java and Qt. I'm heavily biased towards Qt since all serious image processing in the world is still done in C++, but without this constraint, I'd like the safety and tooling support of Java.

Of course C# is just a much better Java, but AFAIK its crossplatform capabilities aren't mature. And it has a tendency to evolve a bit too fast. Your desktop codebase will probably live for at least 10 years, if not more, so it's better to start with a stable technology from the right family (i.e. not overly deficient from the modern perspective.. Qt somewhat fails on this front).


It depends on what you mean by a client. If your world view doesn't extend beyond a browser, then no. However, I would still use it in client applications on servers, desktops, and Android phones.


If I were developing a new game from scratch today then Java would be a contender. Look at the success of LWJGL for instance -- it's what powered Minecraft up until the Microsoft acquisition.

Other than playing around with that, I don't think I've done anything substantial with Java-based UIs running client-side since 2003 :/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: