Live data from Hacker News

The decline and fall of Java on the desktop

jdeploy.substack.com

291–300 of 362 posts

Re: The decline and fall of Java on the desktop

#291
post #54

Earlier quoted context omitted.

Basically, every growth figure of the language shows otherwise. Oracle is ain’t saints, but the amount of needless bashing it gets here is astonishing. Regardless of what its other branches are doing, Oracle managed to do one of the smoothest language takeovers where the (stellar) core team is virtually unchanged, the language became completely open sourced and it underwent tremendous changes which resulted in huge g…

> but the amount of needless bashing it gets here is astonishing I don't think it's needless. I'll bash Java as long as it's the language for AP computer science. Imagine a budding young programmer, bright eyed and bushy tailed, eager to get into computer science. They get to class and greet the teacher "Welcome class, let's learn about Java. There's a wide world of computers out there, but your perception of computi…

Teaching Java in abstract, useless lessons about OOP and inheritance is definitely bad.

But I would say Java is as good a first language as python is.

The purpose of first programming language is teaching concepts - functions, structs / classes, abstraction, data structures (importantly lists and maps); And how to solve problems using that.

Python does well in intuitive syntax for lists/maps, handy standard library functions, and having an REPL; But it gives an illusion that types are redundant. The programmer picking up C++ or Java after python sees only ceremony.

You can also learn the modern java without all the OOP shoved in: Basic programs, functions, data types, arrays, using classes to create custom types, using HashMap, ArrayList, HashSet from standard library; then interfaces, inheritance / subtyping, lambda functions. Use jshell to try small snippets;

The problem with teachers teaching java is that they focus too much on inheritance, with mostly superficial examples like "dog extends animal" instead of something in real world. Inheritance is mostly about subtyping, and any CS student with enough math background should not struggle to understand that.

Re: The decline and fall of Java on the desktop

#292

I think Java had a bad reputation on desktop for a long time. Every application I remember using back in the day was extremely sluggish, felt like a skinwalker with regards to UI, and hogged memory.

Wasn't that bittorrent client early mid-2000s with the blue frog logo written in Java? I think I remember the author back then saying something like, "it's just a project I started to try out [some new java gui library]". I don't seem to remember speed issues using it.

You mean Vuze (back then it was called Azureus).

https://en.m.wikipedia.org/wiki/Vuze

Re: The decline and fall of Java on the desktop

#293

Earlier quoted context omitted.

On the contrary. Jetbrains IDE's prove the fact that no matter how much you engineer, a java based desktop application will always be slow and eat huge amounts of resources.

As opposed to the Electron-based editors which modern web developers use and heat Starbucks with?

VSCode is Electron-based and it's quite efficient and not such a memory hog.

Re: The decline and fall of Java on the desktop

#294

Earlier quoted context omitted.

I hate the old school way of writing Java more than any other language. I love writing in "modern" Java more than any other language. Lombok, RxJava/Reactor where possible, and monads everywhere. It is beautiful and succinct, though I totally appreciate it may not always be easy to introduce on older frameworks or legacy projects.

Lombok is too much magic for me, record class and the annotation generators libraries are a bit less magic

>Lombok is too much magic for me

If an object is just data, then @Data is all you need. If an object crunches numbers, then @Service with @RequiredArgsConstructor if you don't prefer to @Autowired things individually.

Any other usage of Lombok is possibly indicative of a questionable application design imo

Re: The decline and fall of Java on the desktop

#295
post #92

Earlier quoted context omitted.

In fact Oracle saved Java. Sun was struggling and Java was stagnant at the time. There was hardly any big innovation in the last years under (the) Sun. Java Modules started in the Sun age, but they didn't get it out of the door. J2EE / Java EE was also kind of dozed off. So, while Oracle is for sure not the most sympathetic company, it is good at execution.

2005-2006 brought as generics and EJB3. Quite the opposite of stagnation.

Don't forget quite a few multithreading improvememts!

Re: The decline and fall of Java on the desktop

#296
post #92

Earlier quoted context omitted.

In fact Oracle saved Java. Sun was struggling and Java was stagnant at the time. There was hardly any big innovation in the last years under (the) Sun. Java Modules started in the Sun age, but they didn't get it out of the door. J2EE / Java EE was also kind of dozed off. So, while Oracle is for sure not the most sympathetic company, it is good at execution.

2005-2006 brought as generics and EJB3. Quite the opposite of stagnation.

But Oracle bought Sun (and Java) only in 2009. In the last 3 to 4 years there was not much going on.

Re: The decline and fall of Java on the desktop

#297
post #151

Earlier quoted context omitted.

It's not because of V8. It's because HTML+CSS (without even any JavaScript) is still the fastest, most effective way to build a compelling and coherent UX/UI for any platform right now. WPF (nee Avalon) was a contender in the mid-2000s, but for some reason Microsoft put it on ice by 2007 leaving the community stuck with incredibly verbose and bloated XAML markup which only made development more tedious than WinForms,…

> It's because HTML+CSS (without even any JavaScript) is still the fastest, most effective way to build a compelling and coherent UX/UI for any platform right now. I would agree if you mean cross-platform, but other than for the web specifically, basically every platform has a much better way to create an app for it. The web is seriously so lacking on several trivial fronts that it is laughable, layouting being one e…

> basically every platform has a much better way to create an app for it

I accidentally spent 4 hours writing a reply to your point here and it ended up being too long for HN's comment length limit, but I posted it to pastebin: https://pastebin.com/n6AGB62L

> The web is seriously so lacking on several trivial fronts that it is laughable

That depends on your project's requirements. Speaking from personal experience, my main beef is that HTML web-forms still lacks a loit of widgets necessary for RAD that native UIs have had for decades, like comboboxes, true hierarchical menus, RTF or Markdown text editing (because `contenteditable` is horrible), and so on.

...however, if you're enthused enough it's very possible and quite straightforward now to create your own controls and widgets from scratch, which is what Electron apps like Slack do. Of course, when you do, you're condemned to having to maintain them for eternity, but that's a cost of doing business.

> layouting being one example

Actually I was going to say that's exactly where CSS outshines platforms like WPF, XAML, even Cocoa (not to mention Swing and AWT - I can't speak for JavaFX as I've never used it).

I agree that for most of the past 20 years CSS has been a pain for so many layout issues ("how do I vertically center a div?" is probably the #1 question repeatedly asked on StackOverflow), but CSS's flexbox and CSS grid have been supported by all major browsers for almost a decade now and I can confidently say that I can build an aesthetic design with a layout that adapts to changing window/screen dimensions and aspect-ratios in a fraction of the time it would take me to do in any native framework.

Consider that 1990s-era frameworks like VB6, WinForms, etc were all fixed-layout and required you to write your own repositioning logic in resize-event-handlers. WinForms didn't get anchored-layout until 2005! Post-2000s frameworks like Swing and WPF added layout containers, but they're far from perfect and don't support radical re-layouting. More modern frameworks that use constraint-based layout or support major relayouting (like SwiftUI and WinUI 3, to an extent) are appealing, but I find offer few real advantages over CSS's layout model.

A major personal win for CSS is the content/behaviour/presentation separation (-itis, not withstanding). Compared to WPF where a single XAML file will mix content, behaviour, and presentation elements, attributes, and controls without any regard for separation-of-concerns or maintainability (WPF does have CSS-esque Styles, but despite the name suggesting they're strictly presentational they're not: they're invariably used to control behaviour (due to XAML's ugly and unusable template and trigger ceremony) and also content (due to how content-based templates are used).

> while goddamn WinForms could deal with it through inheritence.

But that's where the failures of inheritance becomes obvious: consider WinForm's own Checkbox control. Surprisingly, the Checkbox is actually a subclass of Button, and shares no relationship with the intuitively similar Radio control despite their very similar visual appearance and behaviour. WinForms' design (like most other OOP-based frameworks) shoehorn both UX behaviour and visual appearance into a single OOP inheritance tree. This only works up-to-a-point, then things quickly fall-apart.

Re: The decline and fall of Java on the desktop

#298
post #54

Earlier quoted context omitted.

Basically, every growth figure of the language shows otherwise. Oracle is ain’t saints, but the amount of needless bashing it gets here is astonishing. Regardless of what its other branches are doing, Oracle managed to do one of the smoothest language takeovers where the (stellar) core team is virtually unchanged, the language became completely open sourced and it underwent tremendous changes which resulted in huge g…

> but the amount of needless bashing it gets here is astonishing I don't think it's needless. I'll bash Java as long as it's the language for AP computer science. Imagine a budding young programmer, bright eyed and bushy tailed, eager to get into computer science. They get to class and greet the teacher "Welcome class, let's learn about Java. There's a wide world of computers out there, but your perception of computi…

I still have nightmares from back then.

Re: The decline and fall of Java on the desktop

#299

Earlier quoted context omitted.

C# is a "standing on the shoulders of giants" kinda language IMO; they learned a lot from Java and evolved on it, mainly in terms of developer ergonomics and features that makes their life easier and less tedious. They had less of a design-by-committee team behind it as well, making development a LOT faster than Java, which feels like it's run by ancient, slow moving behemoth companies like Oracle and IBM. I mean I g…

Java was open-source, but not free. Oracle tries everything to squeeze every last penny out of a company if they use Java or MySQL, including threatening with litigation. If Oracle can't make humongous profits from a product they simply drop it or run it into the ground.

That’s why they completely open-sourced it and recently made even LTS-support of OracleJDK free of charge until the next LTS?

Sure, they do make plenty of money from huge corporations still going with paid support for java 8 (I believe it will be supported till 2030 at least?!), like banks. But it ain’t a crime to ask money for proper services.

Re: The decline and fall of Java on the desktop

#300
post #275

Earlier quoted context omitted.

Citation and meaningful comparative ananlysis needed here. I would want to be certain you are not making a comparison with powerful text editors like Slickedit or Emacs - these are not the same. At the scale that something like IntelliJ or your favourite C++ based IDE operate at, Java is not the bottleneck. It’s all down to the system complexity involved in doing all that code crunching in near real time and the inte…

I'm mainly using Qt Creator, which has integrated on-the-fly code analysis with clangd for instance and I guess most of what you'd expect from a modern IDE, many refactorings, various unit test system integrations, SSH support... When trying CLion on the exact same projects everything is just so much slower with no major value-add, like, even opening UI menus feels sluggish. And let's not even talk about typing text,…

QtCreator does a tiny fraction of what Intellij is capable of though. Also, clion is not nearly as used as intellij, which is (only slightly arguably ) the best ide hands down for java and many other languages.
Post reply on HN