@odrotbohm@chaos.social avatar

odrotbohm

@odrotbohm@chaos.social

Frameworks & Architecture in the Spring team @ VMware, OpenSource, all things Spring, Java, data, DDD, REST, software architecture, drums & music. He/him.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

frankel, to random
@frankel@mastodon.top avatar

I recently read a post on "6 Ways To Pass Parameters to API". Though the title is a bit misleading, as it’s unrelated to REST, it does an excellent job listing all ways to send parameters to a Spring application. I want to do the same for ; it’s beneficial when you write a custom plugin.

https://blog.frankel.ch/pass-parameters-apisix/

odrotbohm,
@odrotbohm@chaos.social avatar

@frankel The one way to pass parameters is as… drumroll as parameter. 🙄🤷‍♂️

odrotbohm,
@odrotbohm@chaos.social avatar

@frankel There’s just no „x ways“ to transfer parameters. There’s one. Because HTTP knows exactly one concept of a request parameter. Except you deliberately misinterpret what „a parameter“ is and tunnel it through other mechanisms. Which is abusing the protocol.

odrotbohm,
@odrotbohm@chaos.social avatar

@frankel Yes.

odrotbohm,
@odrotbohm@chaos.social avatar

@frankel I am not a fan of posts that misrepresent what they’re doing in their titles. Just as the original post it lists different ways to pass any kind of data but speaks of „passing parameters“. It feels like folks want to deliberately not understand the thing they claim to talk about. Words have meaning. Your post might be fine in general. But it’s riding a broken horse.

odrotbohm, to random
@odrotbohm@chaos.social avatar

A new community for women software architects: https://www.architecther.co.uk/ 👏 (via @ahl)

scy, to webdev
@scy@chaos.social avatar

I've spent a few days playing around with , and I'd like some insights from people who are using it in production. Doesn't need to be a paid project, but more than just "my pet experiment".

What are you using it for?

Like, to me it feels as if either the backend needs to be really tailored to HTMX, with HTML fragments and custom headers and stuff, or you need to start writing non-trivial amounts of JS in the frontend for anything but the most basic tasks.

odrotbohm,
@odrotbohm@chaos.social avatar

@scy It doesn’t. If in doubt serve the entire page, HTMX is gonna swap out the page and it still feels snappier. From that on, you might leverage your template engines ability to render and serve partials, but that’s an optional albeit pretty common approach.

odrotbohm,
@odrotbohm@chaos.social avatar

@scy You asked a generic question, you get a generic answer. 🙃 doesn’t have to be a template. What matter is whether you can render snippets of HTML. A chat sounds like an easy enough todo thing as it’s basically appending divs. HTMX has native support for SSE, so depending how your server stack can deal with those, you should be able to get away without any custom JavaScript.

odrotbohm,
@odrotbohm@chaos.social avatar

@scy Out of band swaps is what you’re looking for. Those allow you to send multiple partials that HTMX would put into the right place. You could return a single chat message besides some other div with an event (just make them sibling elements with the proper hx:swap each) and HTMX takes care of the rest. IIRC replace by ID is the default.

odrotbohm,
@odrotbohm@chaos.social avatar

@scy I was replying to the „does it need to be tailored to HTMX“ part. You didn’t mention anything about a chat in the first post either, which is a very specific use case. OOB swaps are a first-class concept. Returning exactly the elements I want to have updated feels pretty natural to me.

odrotbohm,
@odrotbohm@chaos.social avatar

@scy I think part of the challenge is that you conveyed two questions at once. A broad one (“What do you use it for?”) and a very specific one (“how don’t solve this one special thing for my chat app?”). That’s hard to respond to on social media.

On the former: I’ve built pretty complex dashboards for a commercial product in the SBOM space, some health care related CRM-like UI and some advanced examples primarily focusing on integrating micro-frontends.

odrotbohm,
@odrotbohm@chaos.social avatar

@scy It feels like you’re overthinking it a little. The server sends HTML, you send the server forms, state is in the URI, nowhere else. If you think in these constraints (the constraints of the web essentially) things usually fall in place easily.

odrotbohm,
@odrotbohm@chaos.social avatar

@scy @pa You’d send a form with the data to be changed, the server renders all elements that need to be replaced with new data. You return those to the client and HTMX replaces all elements you send. No custom JavaScript required.

odrotbohm,
@odrotbohm@chaos.social avatar

@scy @pa I see. That “change username“ functionality existed before? How did you handle that on the server?

odrotbohm,
@odrotbohm@chaos.social avatar

@scy @pa HTMX really plays to its strengths when you can both handle form submissions and produce HTML. It’s the antidote to the client messing with JSON and turning this into HTML eventually. I guess with a constrained server-side, HTMX is not of much help.

odrotbohm, to random
@odrotbohm@chaos.social avatar
odrotbohm, to random
@odrotbohm@chaos.social avatar

“Our results suggest that improving code maintainability from very high to excellent pays off. The returns in the upper end of the quality spectrum are not diminishing — they are increasing. This underscores that exceptional code quality is not only a developer’s vanity metric.” — https://arxiv.org/pdf/2401.13407.pdf (PDF)

odrotbohm, to random
@odrotbohm@chaos.social avatar

Briefly thought about submitting to the call for papers of . Skimmed through the diversity of the program of their topic days' tracks (women / men):

1 / 9
0 / 9
0 / 6
0 / 5
0 / 6
0 / 12 (Track: Entwickler:innen (!))
0 / 5
2 / 7

Seriously? Wow. 🙄

odrotbohm, to random
@odrotbohm@chaos.social avatar

If you want to avoid solving the problems of large, distributed systems, build small, non-distributed ones.

odrotbohm, to random
@odrotbohm@chaos.social avatar

Coming in 1.2 (currently available in snapshots): open application modules. Particularly helpful to gradually migrate existing projects to it. 🍃📦https://docs.spring.io/spring-modulith/reference/1.2-SNAPSHOT/fundamentals.html#modules.advanced.open

odrotbohm, to random
@odrotbohm@chaos.social avatar

Integrations 0.19 released! Improvements in code generation, dependency setup and rules. Use BOM version 2023.1.2. https://github.com/xmolecules/jmolecules-integrations/releases/tag/0.19.0

odrotbohm, to random
@odrotbohm@chaos.social avatar

If you are a self- or partially employed developer (URMs preferred), based in Germany and would like help working on for 6 month, feel free to get in touch. I’d be willing to help getting the funding application in shape. https://mastodon.social/@PrototypeFund/111855136020891211

shochdoerfer, to random German
@shochdoerfer@phpc.social avatar

Learning about Monolith at @majug today...

odrotbohm,
@odrotbohm@chaos.social avatar

@shochdoerfer @majug Modulith! ☝️😬

odrotbohm, to random
@odrotbohm@chaos.social avatar
shochdoerfer, to random
@shochdoerfer@phpc.social avatar

Never thought I would say it, but constructor property promotion is really a neat feature in PHP.
I really miss it in some other programming languages...

odrotbohm,
@odrotbohm@chaos.social avatar

@shochdoerfer Nice! Java has this for records. I’ve heard it’s coming for plain classes, too, but it looks like you got there first! 🙂

odrotbohm, to TimeTravel
@odrotbohm@chaos.social avatar

TIL about , a tool to exclude build target folders for various tech stacks from a backup. Be sure to install the latest head (for support) and have your folder permissions set correctly (I had to fix mine to see my projects). https://github.com/stevegrunwell/asimov

  • All
  • Subscribed
  • Moderated
  • Favorites
  • normalnudes
  • tsrsr
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • hgfsjryuu7
  • Youngstown
  • InstantRegret
  • slotface
  • khanakhh
  • rosin
  • ngwrru68w68
  • kavyap
  • PowerRangers
  • Leos
  • tacticalgear
  • cubers
  • everett
  • vwfavf
  • ethstaker
  • osvaldo12
  • Durango
  • mdbf
  • modclub
  • cisconetworking
  • GTA5RPClips
  • tester
  • anitta
  • All magazines