@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

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

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 #HTMX, 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.

#WebDev

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

Happy 20th birthday, ! ๐ŸŽ‚๐Ÿพ๐Ÿฅณ๐Ÿƒ https://spring.io/blog/2004/03/24/spring-framework-1-0-final-released/

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

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

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

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

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
  • โ€ข
  • megavids
  • kavyap
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • osvaldo12
  • everett
  • Youngstown
  • khanakhh
  • slotface
  • rosin
  • thenastyranch
  • ngwrru68w68
  • Durango
  • JUstTest
  • normalnudes
  • ethstaker
  • GTA5RPClips
  • modclub
  • cisconetworking
  • mdbf
  • tacticalgear
  • cubers
  • provamag3
  • tester
  • anitta
  • Leos
  • lostlight
  • All magazines