I have no problem at the backend. Java takes care of me there. But Frontend OMG - what a pile of mess, remind me of my unclean room or even worse. I don't want to hear anything about HTML/XHTML, CSS and JavaScript (any flavor or jQuery too) trio. I just want to create a web project using ONE language ( not those three). My craving for simplicity .No spaghetti of code with flying logic at the front end. And I am not talking about a single page application. But even if somehow
that is also possible without HTML/CSS/JS then the it will be icing on the cake. One last time let me say it - I hate the front end in its current state :(<p>Appreciate your views. Thanks :)
In the ancient times (12y ago) I managed to build a reasonably complicated 10+ GUI view / 1k+ user WebApp using Java only. I used GWT[1] and Sencha's Ext-GWT, now called GXT[2]<p>Depending on your needs, in 2021 I don't recommend starting with these. The reason I used it was that you could actually create widget-based SPAs using Java only (no JS, no CSS, no HTML), had excellent debugging support, and prototyping was fast.<p>But the webapp was more functional than pleasing in appearance. For an intranet tool / configuration utility etc. I might consider it again, but anything else where you want attract possible new users... I think you have to learn modern web dev stacks.<p>[1]: <a href="http://www.gwtproject.org/" rel="nofollow">http://www.gwtproject.org/</a><p>[2]: <a href="https://www.sencha.com/products/gxt/" rel="nofollow">https://www.sencha.com/products/gxt/</a>
You probably <i>can</i> do it, but should you? You can build a house using only cardboard, or write a book using only words shorter than six letters. The result is not simplicity, though. The result is an idiosyncratic oddity that will have you swimming upstream, something no one else can understand, with huge usability and interoperability problems.<p>You can’t get around the unfortunate fact that web browsers only render HTML, CSS, and Javascript. Yes, the front-end landscape is a complicated mess, and it takes time to learn. Many frameworks and libraries exist to abstract and hide a lot of the mess — take your pick. Eventually you either understand and can work with HTML, CSS, and JS or you don’t. If you don’t you will limit what you can accomplish, and your job prospects.
You can generate web pages writing only javascript to create elements.<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/API/Document/cr...</a><p>It's really roundabout and pointless, but you can do it.<p>You can avoid having to write any HTML or CSS, and only write javascript.<p>I suppose the minimal html web page would be:<p><script src="./main"></script><p>That's all the HTML you'd have to write, and the rest would be javascript inside main.js
Seems to me there should be a place for writing a Progressive Web App with server-side rendering, and have the server side rendering be written in Java (or C# or any other server side language). It would need boilerplate HTML and JS to make the connection, and then use the same protocols to update the web page.<p>You'd still need to grapple with the fact that it's going to ultimately render the structure into the DOM (which is basically the same structure as HTML) and use CSS to style it, but you could at least use native language features to support it. You just can't avoid the fact that any web browser app has to think like a web browser. HTML and CSS aren't really languages; they're data structures that just happen to have a DSL for composing them.<p>I mean, if you wanted it to REALLY be Java you could use Java Web Start (no longer supported, but descendants of it exist). But then you're not really writing for the web; you're writing Java desktop apps that just happen to use a browser for delivery.
Is it worth mentioning that you can embed a GTK+ GUI in a webpage[1]?<p>I've personally never tried it, and there are Java bindings for GTK+ I think.<p>[1] - <a href="https://developer.gnome.org/gtk3/stable/gtk-broadway.html" rel="nofollow">https://developer.gnome.org/gtk3/stable/gtk-broadway.html</a>
As a dev mostly working on embedded system, I can understand your rejection of web tech. Yes, it is a mess.<p>I tried many different solutions. Best experience for UI for me was QT for "standard" applications on desktops (C++, I think it is available for Java, though).<p>At some point I pushed through and learned the current web stack. I don't build the nicest looking apps, I have little experience in typography or design, but I think it is still a useful tool to have in your box. And JS isn't that terrible as people say it is.<p>I don't buy into the newest lib to develop against, but for my use cases that isn't necessary anyway.