• 0

Does HTML, CSS and Javascript technologies give an


Question

Hello everyone,

I wanted to get your thoughts on HCJ (HTML, CSS and Javascript) and why it is not yet implemented as the GUI engine by some of the industry leaders out there (e.g. Java, .NET, etc?).

From my experience I had an awesome time developing user interfaces using HCJ and the things you can design or do with HCJ are truly remarkable. Compare that to Java Swing, JavaFX, C# WPF, your experience will be polar opposite if not painful.

I am curious whether there is some kind of technical limitation that is forcing us to rely on these old GUI libraries or it?s just due to business reasons that these folks (Oracle, Microsoft, etc?) are not yet making it possible to code/design the front-end of the desktops with pure HCJ?

I guess the main questions is? why are we not using HCJ for our GUIs rather than learning something new like FXML, WPF, JavaFX, etc?? All the web applications and some of the hybrids of a desktop apps are running a browser engine which uses HCJ, so why not create a native HCJ rendering engine on a matured platform like Java, .NET, Cocoa? Thus, eliminating the need to embed a third-party web browser engine!

Adobe AIR, NodeWebkit was almost there but the libraries provided by .NET/Cocoa/Java/PHP/Python is a huge advantage to most developers. And having a native support for something is always desirable!

The Mobile world is primarily HTML/CSS anyways, so I don?t know why the desktop apps cannot use pure HCJ natively :)

9 answers to this question

Recommended Posts

  • 0

You already have this option with Windows 8+/WP/Xbox 1, it's already native out of the box.

Obviously for older platforms you'd have to embed, say ChromiumEmbedded, the IE engine, etc if you want to do it for "classic" software, and that's usable from quite a few platforms, dotNET, Python and Java included.

  • 0
  On 30/09/2014 at 19:08, Max Norris said:

You already have this option with Windows 8+/WP/Xbox 1, it's already native out of the box.

Obviously for older platforms you'd have to embed, say ChromiumEmbedded, the IE engine, etc if you want to do it for "classic" software, and that's usable from quite a few platforms, dotNET, Python and Java included.

 

Ah, this is interesting. I will have to look at Windows 8 and see how well HCJ is supported. For the older platforms or other technologies I am already aware of the embedded frameworks, etc... but they have huge drawbacks too. For example, the Java webkit works only on JavaFX. And JavaFX presents some serious blow to the users who run their OS on a VM or do not have a good enough system. Also, the runtimes provided by Java, Qt (let's not forget the confusing license terms), are huge! Python is cool in its own ways but the HCJ GUI is still not natively supported. You have to download hacks, etc... to make it work. My bias would be to see Python, .NET releasing its next GUI engine with the ability to design the layout using pure HCJ ;). So, if the users are still on Windows XP, they can just install the latest framework and everything works flawlessly!

 

Also, I wanted to add is that some of the embedded framework solutions have a mixbag of licenses that makes the binary distribution very confusing and limited. But if things are natively supported then we wouldn't have to worry about it. JavaFX in my opinion is already miles ahead in terms of its support for webkit, etc... but the JRE size is always frawned upon and the operating systems nowadays don't include the JRE by default. And in many cases you don't want to make your HCJ sources available to the end users. So, if these industry leaders supported it natively, compiled everything to bytecodes, most commercial developers would feel more comfortable coding apps in HCJ for the desktop!

  • 0

It's coding for the lowest common denominator of all platforms. It's difficult to make your app look and feel native when you don't have access to any native widget that the OS exposes. You also lose all platform-specific functionality: can you code a JS app that does Direct3D? Link to third-party native libraries? Can you get administrator permissions on the machine? You're restricted to a very small subset of the things a native application can do. Plus you pay a big performance cost, Javascript performance is anywhere between 5-50% the speed of native code depending on platform.

 

So, it's always a tradeoff, what you get in convenience and portability you lose in integration, flexibility and performance.

  • 0

I'm not a fan of HTML5 development. It's a major pain in the ass compared to working with native toolkits. HTML and CSS were not designed for applications. They were designed for document rendering, and that shows. I mean, how is it acceptable that third party CSS and JavaScript can stomp all over your stuff? How can you build non-trivial software and not lose your sanity if you don't have that guarantee? The Shadow DOM aims to fix that, and it is long overdue.

 

While there is a constant churn of new libraries and frameworks in the HTML5 space, the underlying technologies move at a glacial pace. The concurrency story has sucked for the longest time. There are heaps of shiny new layers, but the process of fixing things that are fundamentally wrong with web development - that takes ages.

  • 0

I prefer Desktop GUI development to be honest with you. I can't stand the hackiness (imo) of CSS and JavaScript (although I find jQuery has vastly improved JS).

 

I've had fairly significant experience in both Desktop and Web development and C#.net beats the heck out of HTML/CSS/JS. Python+Qt was a bit of a chore, I'll give you that, and that's without taking into consideration its retarded licensing terms that I still don't fully understand. I'm still considered new with C# though, so perhaps the excitement will wear off after the honeymoon phase. For right now I'm really enjoying it.

 

My favorite part of Web Development is the back end, and a lot of the magic of my WebDev comes from PHP and not JS as most would expect. Mostly because I'm far more confident in PHP than I am in JS/jQuery.

  • 0

Having been a Winforms apps developer for years, I'm currently learning HJS as my employer has decided the web is the way to go with future projects.

 

I friggin' hate it, with a passion!  The inconsistencies between rendering engines irritates the hell out of me, and don't even get me started on cross-browser incompatibilities!  If I had to use this crap for Winforms, I'd go nuts.  This stuff is designed for document rendering, not application interfaces. Whoever thought it was a great idea to start doing app UI's in it needs dragging out back and shooting.

 

With Winforms, I can drop a control on a form, position it exactly where I want, control its appearance exactly how I want, know that its appearance will always be consistent with the rest of the app and environment its running in, and that it will always behave the same way.

  • 0
  On 10/10/2014 at 10:12, FloatingFatMan said:

Having been a Winforms apps developer for years, I'm currently learning HJS as my employer has decided the web is the way to go with future projects.

 

I friggin' hate it, with a passion!  The inconsistencies between rendering engines irritates the hell out of me, and don't even get me started on cross-browser incompatibilities!  If I had to use this crap for Winforms, I'd go nuts.  This stuff is designed for document rendering, not application interfaces. Whoever thought it was a great idea to start doing app UI's in it needs dragging out back and shooting.

 

With Winforms, I can drop a control on a form, position it exactly where I want, control its appearance exactly how I want, know that its appearance will always be consistent with the rest of the app and environment its running in, and that it will always behave the same way.

 

Hi,

I do agree that HCJ has some rendering issues on different web browsers and despite the efforts by W3C the web browsers are not adhering to certain standards (e.g. browsers that still add unnecessary padding to the HTML tags).

I wasn?t suggesting to use HCJ in a web browser environment but actually create an engine that behaves or works like WinForms. You know how you drag and drop the controls on a WinForm and mess with its style? And no matter whether you are on Windows 7, 8 or 10? it still ends up looking the same? I am suggesting the same thing. If Microsoft created a technology that rendered HCJ as a Desktop app then it could really speed up the process of designing GUIs that not only looks good but does some really cool things.

I am aware that animation and 3D stuff doesn?t blend well with HCJ like WinForms, etc? but what are the odds your application uses serious 3D or animation for all its projects?

As FloatingFatMan mentioned, since most companies feel that the web is the way to go then why can?t we just use a common rendering engine (similar to WinForms) and create desktop apps out of HCJ :). From my experience, convincing people to launch a desktop app is much easier than convincing them to let go of their favorite web browser just because your web app uses non-standard HCJ.

There are certain solutions out there but they are basically ?crap? in my opinion for the following reasons:

1. Codes are exposed. I want to compile my HTML, CSS and Javascript?s to byte codes, period! No exception!

2. I want Webkit. She wants Tridant. Oh, why not Chrome? Just like on Java you are pretty much stuck with Swing or JavaFX, on Windows you are stuck with Winforms/WPF, etc? So, I feel that this constant need to make your applications work in all web browsers is distracting too many people from being productive. It drives the developers nuts, and customers are frustrated when the app doesn?t work on their favorite web browser whether it?s due to bad coding or some stupid security settings.

FloatingFatMan I do want to add that if cross browser issues is something you are struggling with, consider incorporating a cross browser compatible framework. EXTJS, Bootstrap are my primary choices when I?m building a cross platform app.

I am not suggesting Microsoft or Java or Apple do away with their existing technologies but I feel that people can build very good looking apps in a short amount of time with HCJ than programming languages that require more technical commitment. Ever tried customizing a JAVA Swing theme? Now, compare that to a HCJ document.

Like I said Adobe AIR is already there but the issue is that the codes are still exposed. If they would compile the actual HCJ codes or keep it tightly hidden/secured from the users, then I probably wouldn?t even start this thread.

  • 0

Oh, I'm not "struggling" with the cross-compatability issues... I can code around them once I find them; but there wouldn't BE any sodding issues if the browser makers would quit doing their own ###### and stick to the standards!

 

As far as using HCJ for Winforms apps, MS have "decreed" that this is how ModernUI apps will work.  It's here now and it's not going anywhere.  With the improvements in Windows 10 allowing proper windows apps instead of full screen, it's going to be the way forward from now on.  

 

For actual Winforms itself, this is always going to be as it is now.  MS tried alternatives with XAML and Silverlight, but just how many commercial apps do you see out there that use either of these technologies?  They're dead ends, and MS know this because they've essentially killed them off.

  • 0

WPF is still the best supported GUI framework for Windows desktop applications. It gets modest updates with each version of .NET - not much evolution but healthy maintenance yes. Killing WPF would essentially mean killing desktop apps and since Windows 8.1 Microsoft has made it quite clear that desktop apps aren't going anywhere.

 

Silverlight, well, that's another story.

This topic is now closed to further replies.
  • Posts

    • Windows Sandbox is awesome and I wish more people knew about it by Usama Jawad Microsoft announced Windows Sandbox way back in 2019. This is a powerful utility that allows you to run a virtualized desktop environment inside your PC, without requiring a dedicated virtual machine (VM) and its associated image files. Windows Sandbox has various advantages over a traditional VM configuration, which makes it an amazing addition to your software toolset. I already published a guide back in 2021 explaining how you can enable Windows Sandbox in your installation. The process is pretty much the same: just check that you have enabled virtualization on your PC (the process may differ for each OEM), enable Windows Sandbox from optional features, restart your PC, and simply launch the environment from Windows Search. The entire process should take less than 30 minutes, in most cases. That said, it is important to note that Windows Sandbox is not offered for Home environments; you need Windows 10/11 Pro, Enterprise, or Education SKUs to leverage it. Since Windows Sandbox is an optional capability in the operating system, many people don't know about it at all. It's essentially a lightweight and temporary desktop environment with the kernel isolated from the host. Since it's ephemeral in nature, you lose all data in Windows Sandbox as soon as you close the environment. The power of Windows Sandbox There are a lot of benefits to using Windows Sandbox. It offers a brand-new and clean Windows environment that you can utilize to test your software or run suspicious .exe files (more on that later) from third-party sources. If you're not sure about opening an untrusted website but still want to open it for some reason, using Microsoft Edge in Windows Sandbox is probably better than running it in your primary environment. But perhaps Windows Sandbox's strengths lie in its backend architecture. The ability to launch a full-fledged OS in a matter of minutes is a huge plus. The process of installing and configuring VMs, and then finding image files for an operating system, can be very daunting, so the streamlined setup for Windows Sandbox easily beats that. In addition, the environment is quite lightweight and consumes a lower amount of RAM than traditional VMs in most scenarios. The fact that Windows Sandbox is ephemeral in nature is also a major advantage from a cybersecurity standpoint. Anything you do inside this environment only stays until that instance is open, and it's isolated from the host, making it quite secure. From Windows 11, version 24H2, you do have the option to retain the instance's resources if you trigger a restart from Windows Sandbox, but you will lose everything if you just close the example in any other way. Finally, Microsoft also offers ways to have more granular control over Windows Sandbox through an XML configuration file and Policy CSP. These have fine-grained configuration settings such as audio and video input, clipboard redirection, mapping folders, networking, and more. So, if you're conscious about running certain services even inside the sandbox, you can simply disable them. Not a silver bullet Despite its plethora of benefits, Windows Sandbox is not a silver bullet that will solve all your problems. For starters, apart from the OS SKU requirement, it has a set of hardware requirements without which you simply can't launch Windows Sandbox. This includes Arm64/AMD64 architecture, 4GB of RAM, 1GB of free space, and at least two CPU cores. These mandates aren't very steep, but they may restrict utilization for some. Next, it is important to remember that while it is better to run untrusted .exe files or open suspicious websites from within Windows Sandbox rather than your primary environment, this is not foolproof. Certain sophisticated varieties of malware may still break free from the sandbox to wreak havoc on your PC, so you should keep that risk in mind anyway. Windows Sandbox offers decent kernel isolation, but malware is evolving all the time, too. In the same vein, do note that some advanced forms of malware can also recognize that they are being run in a virtualized environment. As such, they may alter their behavior dynamically to appear harmless inside the VM and then activate malicious activities as soon as they are transferred over to your host environment. That said, both the aforementioned risks apply to a traditional VM too, so this is just something to know about, not a diss against Windows Sandbox. Also, while it's great that Windows Sandbox is ephemeral, this can be a headache if you are doing extensive testing spread out across days or weeks. You would need to keep your instance up at all times and risk losing your progress at any second. Similarly, it's not possible to run multiple instances of Windows Sandbox, so a customized setup with various environments isn't really feasible. Moreover, inbox apps from the Microsoft Store like Calculator and Notepad aren't supported right now, and there is no Microsoft Store either. Optional Windows features cannot be enabled inside the Sandbox either. Finally, Windows Sandbox only virtualizes your current OS. You can't be running Windows 11, but virtualize Windows 7 inside the sandbox through native methods. Windows Sandbox or a traditional VM? Both Windows Sandbox and traditional VMs offer similar functionalities, but with different selling points. The former is more focused on the lightweight, resource-efficient, and simplified nature of the sandbox environment, while the latter emphasizes more customization options and freedom of use. At the end of the day, whether you end up using Windows Sandbox or a traditional VM depends on your preferences and use case. If you want a persistent environment with more configurability, a traditional VM is the way to go. Still, for almost everything else, Windows Sandbox is a great option, especially due to how quickly you can spin it up. A good rule of thumb would be to give Windows Sandbox a go first, find out in a few minutes if it meets your requirements, and switch to a traditional VM installation if it doesn't. Windows Sandbox is a very handy utility overall, and it's just a shame that not many people know about it due to it being an optional feature that you need to manually enable.
    • Windows 11 is getting a useful new audio feature by Taras Buria Photo: phamtu1509 Windows 11, in its current form, does not offer a quick and easy way to play audio over more than one device. If you have a bunch of audio devices connected and you want to play music on all of them, you have to tinker with third-party software to make it work. Apparently, Microsoft wants to change that with a new feature coming soon to Windows 11. @phantomofearth, the ever-giving source of Windows insights, discovered that the latest Windows 11 preview builds have a hidden toggle in quick settings that lets you share audio to multiple devices with just a few clicks. All it takes is clicking "Shared Audio" in the control center, selecting two or more available devices, and pressing "Share." As usual, there are no official announcements yet, so details about this feature remain unknown. Still, you can probably expect the new shared audio feature to make it to a Windows 11 preview build in the near future. In other Windows Insider news, Microsoft recently revealed that one of the recent taskbar changes was pulled from the operating system due to negative feedback. The company experimented with a simplified taskbar tray area, but later decided to nuke it because people did not like it. Still, there are plenty of other features coming soon to Windows 11. Check out our recent top 10 list here. Hopefully, all of them will make it to the Stable channel soon.
    • Chinese? It sounds extremely dangerous. I’ll reconsider buying a Meta Quest 3.
    • - What's your salary? Is it more than $100k a year? - Nah, it's $100 mil a year.
    • Compared to my ear buds which are the size of a matchbox, cover a much broader frequency range, and work everywhere without setup? Yeah, still not buying this as a replacement.
  • Recent Achievements

    • First Post
      nobody9 earned a badge
      First Post
    • One Month Later
      Ricky Chan earned a badge
      One Month Later
    • First Post
      leoniDAM earned a badge
      First Post
    • Reacting Well
      Ian_ earned a badge
      Reacting Well
    • One Month Later
      Ian_ earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      505
    2. 2
      ATLien_0
      206
    3. 3
      Michael Scrip
      206
    4. 4
      Xenon
      138
    5. 5
      +FloatingFatMan
      112
  • Tell a friend

    Love Neowin? Tell a friend!