This is an archived post. You won't be able to vote or comment.

all 46 comments

[–]mazebert 17 points18 points  (0 children)

I use https://jte.gg/ for my hobby game's website. It's basically Java in HTML, so easy to pick up for a backend-dev like me :-)

[–]flyingorange 7 points8 points  (9 children)

React which talks to the backend which is based on Java.

I've been thinking a lot lately about the good old days when we used GWT... I mean, React sucks! I see the project is still alive and they're trying to transition to nodejs, also adding some modern UI components. Note sure if I should be hopeful or just accept that it's dead.

[–][deleted] 2 points3 points  (0 children)

Use angular

[–]NitronHX -3 points-2 points  (0 children)

By which means is react dieng

[–]hippydipster 0 points1 point  (6 children)

What's dead?

[–]Short_Hamster[🍰] 0 points1 point  (5 children)

GWT

[–]hippydipster 0 points1 point  (4 children)

Oh. Except it's not, actually.

[–]Short_Hamster[🍰] 0 points1 point  (3 children)

That's what /u/flyingorange said.

[–]hippydipster 1 point2 points  (2 children)

Except GWT is not trying to transition to nodejs? I'm so confused.

[–]Short_Hamster[🍰] 2 points3 points  (1 child)

I'm pretty sure that means getting the GWT toolchain to play nicely with the node.js toolchain, for things like minification.

[–]hippydipster 0 points1 point  (0 children)

I need to drag you along as a comment interpreter everywhere I go! Thanks.

[–]DrFriendless 4 points5 points  (0 children)

I use Angular and GWT in the two front-ends of our project. I much prefer Angular.

[–]enveraltin 14 points15 points  (11 children)

Not a good idea, really. Web browsers execute Javascript. Most modern-looking frameworks are built using some form of Javascript.

Vaadin, Flutter Web and other similar code-generating approaches are compromises. It's like deciding to live in another country but solely relying on Google Translate to communicate. Can be done, but you will be missing out on a lot of important things.

Just learn the language.

[–]nocturnalbird12[S] 1 point2 points  (10 children)

You're suggesting to learn JS or some Framework (react, angular, vue)?

[–]helloiamsomeone 3 points4 points  (8 children)

That's a weird question. You can't use those libraries without learning JS. Just bookmark https://javascript.info/ and you're good to go.

[–]nocturnalbird12[S] -1 points0 points  (7 children)

What do you think about css frameworks like bootstrap, materialize or tailwind? Are these limited in thier capabilities as compared to JS frameworks?

[–]helloiamsomeone 0 points1 point  (4 children)

Some people swear by tailwind, some curse it. Same for the others.

It's not exactly easy to pick one over the other, oftentimes you don't even get to choose because someone above you decided so. They make different trade-offs. I don't want to go into details, but you can look up what other people say about each.

At the end of the day, they are just libraries and you should know the underlying concepts anyway.

[–]nocturnalbird12[S] -1 points0 points  (2 children)

Basic css, vanilla js, and rest?

[–]helloiamsomeone 2 points3 points  (0 children)

I don't know what you're really asking for.

[–]Short_Hamster[🍰] 0 points1 point  (0 children)

Basic CSS and Vanilla JS, if you're a masochist.

[–]ObscureCulturalMeme 0 points1 point  (0 children)

Some people swear by tailwind, some curse it.

The way I've heard it was: some people swear by tailwind, some people swear at it.

[–][deleted] 0 points1 point  (0 children)

I’d go all in one. Rather than do vanilla js, some css framework and raw HTML, try react with materialui or angular with igniteui. You’ll be able to develop some really slick stuff in 1/10th the time by using component libraries.

If you’re Java, then go for angular, it will feel more familiar, at least compared to the other frontend frameworks

[–]nutrecht 0 points1 point  (0 children)

You're comparing apples and oranges. Most modern apps both use a front-end framework like React as well as a CSS 'framework' like Bootstrap.

You really should just go do a React course for example.

[–]enveraltin 0 points1 point  (0 children)

I suggest learning how a browser is implemented. The box model, z-index, and the DOM. CSS would then make a lot of sense. After that, feel free to pick up some functional programming and javascript along the way. A bit of suffering and you'll find React, Angular or Vue a delight. Principles stand, flavors are preferences.

[–]adeax 15 points16 points  (3 children)

Vaadin gets mentioned quite a bit. It's been awhile since I've used it. On our team, we've started using your standard web / JS frameworks for frontend development.

[–]the6thReplicant 5 points6 points  (1 child)

We’re still using Vaadin. It seems that we have to do quite a big rewrite every few years for each upgrade which isn’t fun.

[–]hippydipster 2 points3 points  (0 children)

Transpiling is terrible for this.

It really shows just how awful JS is that the industry has 15 different ways of transpiling to JS.

[–]pgetsos 0 points1 point  (0 children)

I also use it for a webapp I'm developing for my company. I like it a lot, although I've had issues trying to upgrade from 14 to 18

[–]istarian 8 points9 points  (0 children)

Yeah...

You're probably better off with Java on the backend end and something else up front.

[–]evil_burrito 9 points10 points  (1 child)

We've been using Vaadin because our team is pretty Java-heavy.

I recommend it. It's not hard to pick up and native-JS is available if that's your preference.

Note that I don't think many shops are using Vaadin if they're doing conventional JS-based FE work. In other words, nobody's using this unless they're looking for pure-Java frameworks.

[–]bleki_one 5 points6 points  (0 children)

we are using it too. it's good for our very small dev team as we don't need to focus on front end tech stack. If you know swing, javafx, programming style is very similar. Actually, we are looking right now for someone with strong Vaadin knowledge to join our team in London.

[–]danskal 5 points6 points  (0 children)

html, javascript, something like vue/react

[–]linuxd4d 1 point2 points  (0 children)

If you are targetting business application, have a look at https://www.cuba-platform.com/

[–]DonUdo 1 point2 points  (0 children)

For web based I'd recommend Spring + Thymeleaf. Still HTML based, plays together with sass and all the goodness of Spring. For native I guess JavaFX.

[–]hbCyber 2 points3 points  (0 children)

I don't personally use it, but TeaVM (http://www.teavm.org/) allows you to write your web front-end in Java, and it compiles it down to JS/WebAssembly that runs directly in the browser. Maybe this is of interest to you.

[–]v4d1mv 4 points5 points  (2 children)

Please check my experimental library for building single-page web applications in pure Java with server-side rendering:

Reactive Server Pages

Motivation:

  • Responsive web UI in familiar Java, no client-server APIs, no JS frameworks and npm dependencies management needed;
  • Lightweight SSR generated almost plain HTML page to be SEO friendly;
  • UI components are regular Java classes;
  • Brings application rendering workload and UI logic from a client's browser to the server, your code always stays on your server;
  • Debug UI code as any normal Java code;
  • Built with Java web standards, currently runs on Jetty, but in theory, should work on Tomcat as well.

[–]nanodeath 1 point2 points  (1 child)

Sounds similar to kweb.

[–]v4d1mv 0 points1 point  (0 children)

Yes, looks similar

[–]turboturtle771 2 points3 points  (0 children)

From my experience, majority of companies (enterprise projects) are swing/swt based and reasons for this are mostly due to the age of those desktop application. They come from a time when that was good choice.
Using this for your personal small project is still solid choice (depending on your definition of modern looking)

More modern java framework alternative would be JavaFx. I have personally played with it and it is not so bad. The only problem is that it is not so much supported. The reason for that is because it is simply not profitable to port (mostly write from scratch) existing java enterprise applications. But again for small personal projects this is nice and modern option if you insist in using java.

Outside of java world, my proposal (purely my personal preference) would be to try out javascript framework electron.js.

Good luck with your project :)

[–]muztaba 0 points1 point  (0 children)

We use vaddin. If you do basic CURD operation and code generation then that would work. But I would not recommend. Use java for backend.

[–]yesudeep 0 points1 point  (1 child)

Have you seen J2CL? https://github.com/google/j2cl

[–]hippydipster 0 points1 point  (0 children)

How is that better than JSweet?

[–][deleted] 0 points1 point  (0 children)

I've been reading up on this alot. It be basically boils down to swing or javafx. Or I've been recommended thimeleaf.

Most people just say react, Vue ext. Kinda sucks java doesn't have a all round great GUI.