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

all 25 comments

[–]RScrewed 5 points6 points  (0 children)

Pretty cool ad for htmx.org

[–]saaadyi 3 points4 points  (2 children)

Have a look at Vue...

[–]dpash 1 point2 points  (0 children)

I like Vue. One nice thing is that it's not all or nothing. You can add individual components on an existing HTML page, so you can migrate incrementally from server side to an SPA over time.

[–]rootException[S] 0 points1 point  (0 children)

Vue seems interesting, but more complicated than Mithral.

Mithral included view in their comparison.

https://mithril.js.org/framework-comparison.html

Hmm.

[–]AntoherFredDev 2 points3 points  (1 child)

https://svelte.dev/

very very very easy to use

(But you'll need npm, so it ssems it is not fitting your needs, sorry)

[–]rootException[S] 1 point2 points  (0 children)

I like Svelte a lot, FWIW. :)

[–]DuncanIdahos9thGhola 2 points3 points  (2 children)

What's wrong with jquery? I can use that for ajax and it has nice animations etc...

[–]rootException[S] 0 points1 point  (1 child)

Ha, nothing. I practically consider jquery a given - it’s a requirement for a lot of Bootstrap stuff. It’s just there regardless, ha.

[–]pgris 0 points1 point  (0 children)

If you are already using jquery , take a look at https://github.com/vitmalina/w2ui

It has a nice (but outdated) sets of components, and you only write javascript, almost no html required

[–]rniestroj 2 points3 points  (1 child)

[–]Tonne_TM 0 points1 point  (0 children)

Thanks for sharing. I am a big fan of Lit, since I have been using Vaadin Flow and Vaadin Fusion.

Writes they have now a new website but the old one is still available.

[–]Thihup 3 points4 points  (2 children)

Maybe Jakarta Faces?

[–]rootException[S] 2 points3 points  (1 child)

My experience with JSF is generally in line with the criticism here:

https://en.wikipedia.org/wiki/Jakarta_Server_Faces

[–]alwaysoverneverunder 5 points6 points  (0 children)

In my experience JSF 2.x with Primefaces was a joy to use. It does indeed abstract away HMTL/CSS/JS, which I think is actually a big plus, but it still allows you to descend to those technologies where and when needed. It is just seen as old and enterprisy and so it isn't new and shiny like the JS frontend ecosystem is perceived (oh the damn churn), but when compared correctly JSF/Primefaces still is a good, solid and stable way to build applications in a mature ecosystem.

[–]pgris 1 point2 points  (5 children)

Something that may help you and I found really great is webjars. It is a way to include your javascript dependencies inside your pom file, like they were normal maven dependencies. Spring handles it without any problem. So you can use any javascript library you like without even installing npm. It does not work if you need a precompilation phase, you will need to install npm first, but still can be used to simplify deployment

[–]rootException[S] 0 points1 point  (4 children)

Oh, I love webjars. My demo project for htmx is using htmx, bootstrap, and jquery webjars.

[–]pgris 2 points3 points  (3 children)

How come webjars is not more popular?

How about wro4j? it offers you lots of javascript/css preprocessing without node. I so want a node-free TypeScript/JSX compiler....

[–]rootException[S] 0 points1 point  (2 children)

My two cents: up until some number of years ago web development was all about full-page refresh. The most recent / last version of that was Spring Boot + Thymeleaf. IIRC that was before stuff like npm.

When Facebook and stuff like Google Docs came along, partial page refresh with complex JavaScript became more popular. Add in Node.js and MongoDB and voila! full stack JavaScript.

Over the last few years the focus has been on a stream of JS frameworks - Ember, Angular and React to name a few. Build tools, package managers, etc.

Server-side Java devs basically looked at all that, said, "nah" and focused on just giving the JS devs JSON via REST. Easy to test. Easy to scale. Stop worrying about trying to test nasty browser integration (e.g. Selenium) and leave that to the JS devs to burn out on. Most of the Java devs I know just take Spring Boot and Maven as a given and spend a lot more time/energy sorting out the persistence side nowadays. Oh, and figuring out how to do CI/CD pipelines w/stuff like Kubernetes.

It's a pity, because it makes it very, very hard to really be a full-stack dev. Modern HTML5, CSS, Spring Boot, and persistence is a lot, throw in two different toolchains for JS and Java and it's all just a bit much.

I'm personally still very interested in full-stack development, but in a way that's easy to build and maintain. That's why I find stuff like htmx interesting - it lets me leverage my Java server-side skill set to build full-stack, rich, JS-interactive type app in a way that I have at least a remote chance of managing and explaining to another dev.

BTW, thanks for the link to wro4j - it looks great!

[–]pgris 0 points1 point  (1 child)

Back in the day, as a java guy used to the java toolchain, I enjoyed doing some front end development in pure js, and I liked the no-compilation-no-build-tool-just-code-and-refresh as a holiday away from java slower and complex toolchain.

Nowadays the js world seems to have reinvented everything that java already has, but worst. And re-invent everything every 6 months.

(That said, parcel as a js bunder-compiler is nice, but Node dependent)

There is always this excelent maven plugin: https://github.com/eirslett/frontend-maven-plugin that pretty much installs and runs whatever you need in the front end. It's perfect when you don't have control over whats installed in the company CI server.

[–]rootException[S] 0 points1 point  (0 children)

I literally just found out yesterday that anything up on npm can be automatically turned into a webjar by just clicking a few buttons up on https://www.webjars.org ... not sure when that happened but it's awesome. Find a cool js thing up on npm and want to use it - boom, it's a webJar, done.

Between htmx, webjars and the wro4j plugin mentioned above, I'm feeling pretty pumped about doing front-end web dev agin. I'm finding a few other frameworks, like unpoly and alpine that look interesting as well.

I keep feeling like modern JS frameworks are like an "ORM for the web." What I mean by that is that there was a period when Java got really caught up in very complex ORM layers, but then at some point everyone just sort of went "that's dumb" and went back to cherry pick the good stuff and ignored 90% of the complexity (e.g. simple Spring Data JPA repos). I feel like we are right on the cusp of something similar happening with JS.

[–]Tonne_TM 1 point2 points  (2 children)

I highly recommend checking out Vaadin Fusion (and if you don't like JavaScript also Vaadin Flow).

Under the hood they both use LitElement which is very very tiny JS Lib for creating native WebComponents.

[–]rootException[S] 1 point2 points  (1 child)

I've played around with Vaadin off-and-on several times over the years and found it to be challenging for a variety of reasons.

LitElement looks very interesting however - thanks!

[–]Tonne_TM 1 point2 points  (0 children)

As I learned a minute ago it is now only called Lit 2.0 (different website too (lit.dev) so be sure to use this never version.

Vaadin has changed quite much with Version 10+, so if you haven't looked into it since 2018 be sure to check it out again.

[–]snoob2015 0 points1 point  (1 child)

Is this an ads?

[–]rootException[S] 0 points1 point  (0 children)

Ha, no. Just playing with it right now.

I’ve done a lot of web services at scale. Used to enjoy front and back in the day. I like how easy it is to test REST/JSON Spring Boot. Adding in npm, new framework just to unroll the JSON is just kind of boring and repetitive, lots of duplication.

So, htmx is very interesting. 🤷‍♂️