• 0

Why JAVA doesn't use HTML and CSS for its GUI?


Question

Hi,

 

Please don't suggest webkit or anything like that for JAVA because that is not what this topic is about. JAVA is a robust programming language and has great reputation both in the Desktop world and also in the server side world.

 

But time and time again... I absolutely despise using things like Swing, JAVAFX, AWT/SWT for my GUI. I don't like those frameworks because they are just way too complicated, time consuming and frankly takes a while to customize them.

 

But in HTML and CSS you already have baddass frameworks, pre-made templates and customizing them is truly rapid and very fun.

 

So... why JAVA doesn't just build a framework to render HTML/CSS as the GUI instead of SWING, etc...?

 

Why HTML/CSS has to be tied strictly for rendering web pages? o.O

8 answers to this question

Recommended Posts

  • 0

I am not too surprised. Because on a Swing component you can actually use something like:

<html><font color="red">this is retarded html...</font></html>

And it works just fine! But it is not cool enough to support something like Bootstrap or other type of responsive framework! Perhaps my next goal is to introduce HTML/CSS GUI for JAVA...!

 

Also Swing was created long before we had HTML, CSS and latest bad boys. It's time JAVA updates their ancient technology... :p... JavaFX was looking pretty good until the lack of cool controls killed it.

  • 0
  On 06/11/2013 at 06:56, roosevelt said:

I am not too surprised. Because on a Swing component you can actually use something like:

<html><font color="red">this is retarded html...</font></html>

And it works just fine! But it is not cool enough to support something like Bootstrap or other type of responsive framework! Perhaps my next goal is to introduce HTML/CSS GUI for JAVA...!

 

Also Swing was created long before we had HTML, CSS and latest bad boys. It's time JAVA updates their ancient technology... :p... JavaFX was looking pretty good until the lack of cool controls killed it.

thats only if you are using a webkit? and the right one at that..java GUI has never liked me and using html with java has failed me

  • 0

I am still trying to wrap my head around... what is the main difference between a UI drawn on screen from HTML code or by Swing?

 

I know one is for the web and the other is created by JAVA so it can make sense of what to show on the screen... but essentially isn't it doing the same thing? Like reading bunch of code and drawing it on the screen?

 

How much performance do we gain by using a Swing UI over a HTML coded UI? I am not suggesting to use webkit or a web browser at all... I am suggesting to use HTML and CSS to generate the UI itself!

 

FXML was a sad attempt to QML and XAML... but why bother learning a whole new language when you can accomplish the same thing with HTML if not better.

 

Speaking of that... why other programming languages like C++ or Python or Ruby don't use HTML to render its UI?

 

Why use HTML only for web browsers (webkit, etc...)? o.O

  • 0

HTML was originally designed to describe documents (static web pages). If you want to build an application UI with it, you'll want JavaScript too. And if you're building anything non-trivial, you'll soon find that wanking the DOM with JavaScript is a huge pain in the ass. It's the wrong level of abstraction to be working at.

 

While plain old HTML can be used to describe application UI, it does not mean that it's the right medium for doing so. You don't want to screwing around with <li>s when you mean to be implementing a tab bar. Why do you need to implement a tab bar anyway? You should be able to use one. You don't want to be watching the DOM simply because you want to wire a text field to a property in your class.

 

So you build things like AngularJS and UI Bootstrap to provide abstractions that allow you to code in a cleaner way. But you would have built on top of a complex piece of technology (a HTML renderer) and then build abstraction layers on top of it to dumb it down. Lose-lose situation as Palm found out with WebOS. Building on top of Webkit means that they could not match the performance of iOS and Android.

  • 0
Re: Why JAVA doesn't use HTML and CSS for its GUI?

HTML lacks the ability to create custom window sizes, compress files, and other standard navigational controls. Distribution size is also a crucial issue because the standard HTML file format is not suited for delivering a large amount of content over a network.

  • 0

Hello,

My brain just melted when I read the title. To me it doesnt make sense....

Anyways, I do agree that another (one of many) bad points of Java is developing its GUI. Now some MAY say this is a language issue. I dont (completely) agree with that because .NET languages such as C# use similar way of drawing up a GUI just that the IDE (Visual Studio) makes it SO easy and simple to do and perform actions over GUI elements/objects. NetBeans is "getting there" but it still has a way to go.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • It's significant growth for Linux considering the market share, so it could have had that effect I described.
    • Microsoft and Crowdstrike announce partnership on threat actor naming by Pradeep Viswanathan Whenever a cyberattack is discovered, companies disclose it to the public and assign it a unique name based on their internal procedures. Unfortunately, this leads to inconsistencies, as each company has its own naming conventions. As a result, the same threat actor behind a cyberattack may end up with multiple names, causing delays and confusion in response efforts. For example, a threat actor that Microsoft refers to as Midnight Blizzard might be known as Cozy Bear, APT29, or UNC2452 by other security vendors. To address this issue, Microsoft and CrowdStrike are teaming up. These companies will align their individual threat actor taxonomies to help security professionals respond to cyberattacks with greater clarity and confidence. It’s important to note that Microsoft and CrowdStrike are not attempting to create a single naming standard. Instead, they are releasing a mapping that lists common threat actors tracked by both companies, matched according to their respective taxonomies. The mapping also includes corresponding aliases from each group’s naming system. You can view the joint threat actor mapping by Microsoft and CrowdStrike here. Although this threat actor taxonomy mapping is a joint effort between Microsoft and CrowdStrike, Google/Mandiant and Palo Alto Networks' Unit 42 are expected to contribute to this initiative in the future. Vasu Jakkal, Corporate Vice President of Microsoft Security, wrote the following about this collaboration with CrowdStrike: As more organizations join this initiative, the collective defense against cyber threats will undoubtedly be improved.
    • You make no sense since most of the stuff on YouTube is free to begin with. Comparing Netflix to YouTube is not even remotely the same. YouTube has tons of free videos to begin with, unlike Netflix, you are paying Netflix for original style of programming.
    • Youtube can go screw themselves. Never ever, ever will I pay for this BS nonsense. And I encourage anyone else not to either.
  • Recent Achievements

    • Week One Done
      Nullun earned a badge
      Week One Done
    • First Post
      sultangris earned a badge
      First Post
    • Reacting Well
      sultangris earned a badge
      Reacting Well
    • First Post
      ClarkB earned a badge
      First Post
    • Week One Done
      Epaminombas earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      172
    2. 2
      ATLien_0
      125
    3. 3
      snowy owl
      122
    4. 4
      Xenon
      116
    5. 5
      +Edouard
      93
  • Tell a friend

    Love Neowin? Tell a friend!