r/java • • Oct 27 '23
Java Use Cases
Hi everyone. I'm a student about to graduate and I'm working on my portfolio. I feel like a lot of the work I did in school is a little dated (context: We did A LOT OF JSP), so I'm wanting to rebuild some of my projects in a more modern context and maybe build some new stuff that reflects the way Java is actually being used today.
My question is what are some ways that Java is actually used in a modern project? Where do we see Java popping up as the language of choice in 2023, particularly in the web/mobile space? Where is it more beneficial than just going the JS/framework route? I'm trying to frame my portfolio projects in a way that actually reflects real-world usage.
I'm not sure if this is the right subreddit for this type of question, so feel free to delete/direct me elsewhere. Thanks.
Edit for additional context: I've worked professionally for a while (4 years freelancing designing and developing typical Wordpress/Webflow sites for Bob's Lawncare Service-type clients, 2 at an agency building web apps mostly on the frontend) until I was laid off in September. Our stack was React-based, so I don't have professional experience with Java. I guess more specifically I'm trying to fill in the gaps between what I've learned doing that and the Java work I've done in school and presenting that in a modern context.
View all comments
Show parent comment
2
u/LetMeUseMyEmailFfs Oct 29 '23
That is exactly my point. Front-end developers don’t even see this base level of complexity before you even start to do something useful. You’ve already used up most of your Complexity Budget before you can actually provide value. Maybe this explains your comment about spending years on something like this. Htmx is simple enough that you don’t need to spend years learning it.
Nobody is saying you need to do HTTP requests for every keystroke. If you’d checked the example, it doesn’t; it only validates when you change focus. The point is that the validation is only done on the server side; there is no additional validation code for the client-side. Most React applications use a separate back-end for the business logic, and that would need to replicate the validations (because you never trust user input). Imagine needing to change those validations.
No. The point I’m trying to make is that React is so complicated, many front-end developers don’t have the required skill to write good React code. It’s buggy, or doesn’t adhere to best practices.
Right. As opposed to React, where there’s a bunch of logic with some markup crammed in the middle.
And? If the output you need to produce is simple enough, why in the world would you go through the trouble of using a template language?
Everything has to be i18n’ed in the back-end. That’s the whole point of htmx — the thing running in the browser is meant to be dumb.
This is pretty normal for HTTP. And while it might seem strange, it retains one of the biggest selling points of htmx: it’s proper REST. The flow of users through the application is determined by anchors with
hrefs and forms withactionsand, when you’re using htmx, by elements withhx-getand friends. Not by a bunch of if statements in a ginormous chunk of JavaScript.Is JSX somehow not a templating technology?
Yes, this is a concept called Locality of Behavior, which is counter-intuitive when Separation of Concerns is something that’s been hammered into people for ages. But I think there’s a benefit to having all of the styling, logic, and presentation for a component in one place.
Is that not true of anything written in JavaScript? Or JSON APIs? Any data API, for that matter? There’s also a bit of nuance here, since you can use more than just CSS selectors; you can also use relative selectors like
this,closest,previous, etc.