[–] [S] 1 point 2 hours ago

Hypermedia APIs (i.e. HTML) are specific to the layout of your application, so there is almost never any reason you’d want to insert someone else’s HTML into your page. All you have to do is make sure you only call your own routes (htmx 2 will actually disable calling other domains by default).

Although I do control the routes, its seems like it's not common. One way is a reverse proxy so the component server is forwarded on /components path on the client. So the client can still call relative routs.

  • source
  • parent
  • context
  • [–] [S] 1 point 2 hours ago

    I think I should clarify: This isn't a public library (yet). It's a system I'm creating in our company for usage within our products.

    I thought about web components and actually created a few. But this hypermedia approach with HTMX is much simpler to develop and maintain, and since some of the components are very heavy, the server side rendering takes load off of clients and makes complex renderings possible.

    Can you elaborate why do you think HTMX doesn't fit this usage? With webcomponents, the flow will be like this:

    1. Client fetch data from source
    2. Client render the data within tge component

    With this hypermedia approach the flow looks like this

    1. The client requests component with data from source from server
    2. Server fetches the data, (possibly validates it)
    3. Server renders the component
    4. Server sends component to client
  • source
  • parent
  • context
  •  

    cross-posted from: https://programming.dev/post/54211132

    Hi people. I'm creating a system using HTMX
    It's a server using clj-kit, which renders "components" using hiccup and HTMX based on the requests.
    A component generator basically. But it also has some JSON APIs which return pure data.

    The details don't matter. It just exposes REST APIs, user calls REST API with their own custom params and get their custom component.

    The goal is so this can be used for progressive rewrite and enhancement of legacy systems, and the components to be usable in multiple systems, reducing work.
    In order for the user of the system to be able to use these components, they should also add HTMX to their client, and call the service. for example

    <div hx-get="https://component.service/componentx?data-url=https%3A%2F%2Fdata.source%2Fdata" hx-trigger="load">
    

    This is the architecture I thought of. Is this ok? This HTMX article on security says it's not ok to call HTMX with external sources. So what is the best way you suggest to create such system?

    I'm halfway through it already, but I would like to hear what others have to say and your suggestions. Maybe HTMX isn't the right choice at all? I felt like it is.

    Thank you.

     

    Hi people. I'm creating a system using HTMX
    It's a server using clj-kit, which renders "components" using hiccup and HTMX based on the requests.
    A component generator basically. But it also has some JSON APIs which return pure data.

    The details don't matter. It just exposes REST APIs, user calls REST API with their own custom params and get their custom component.

    The goal is so this can be used for progressive rewrite and enhancement of legacy systems, and the components to be usable in multiple systems, reducing work.
    In order for the user of the system to be able to use these components, they should also add HTMX to their client, and call the service. for example

    <div hx-get="https://component.service/componentx?data-url=https%3A%2F%2Fdata.source%2Fdata" hx-trigger="load">
    

    This is the architecture I thought of. Is this ok? This HTMX article on security says it's not ok to call HTMX with external sources. So what is the best way you suggest to create such system?

    I'm halfway through it already, but I would like to hear what others have to say and your suggestions. Maybe HTMX isn't the right choice at all? I felt like it is.

    Thank you.

    [–] [S] 1 point 3 days ago (1 child)

    Thank you for your explanation.

    My work revolves mostly around large enterprise software, so I guess this fits me.

    But can you elaborate why not write a game engine with it? Game engines are also very complex.
    Do you say because of the performance hit of multiple layers of abstractions?

  • source
  • parent
  • context
  • [–] [S] 3 points 4 days ago

    I'm not talking about the "clean code" approach. I'm talking about "clean architecture" for software design.

    I have also heard things about how the multiple levels of abstraction in Clean Architecture can lead to worse performance, but we can always optimize the bottlenecks and skip the abstractions if needed. I also don't have any actual benchmark of how much is the performance hit.

  • source
  • parent
  • context
  •  

    cross-posted from: https://programming.dev/post/54023908

    Hi!

    I've never read any of Uncle Bob's books. But I have taken interest in "Clean Architecture" as it seems like a good solution to make mid to large sized projects simple to understand and maintain.

    I think MVC gets too much coupling and fails at larger projects, same with n-tier. But I'm not sure about anything right now (software design is a very complicated problem after all).

    So I was wondering if you friends who have used Clean Architecture in production can share your knowledge and experience with me about this design?

    Is it actually good and worth investing in?

    Footnote:

    I'm especially weighing this architecture because Uncle Bob's writings are really hit and miss. I don't see him as a master or guru so I take everything he says with a grain of salt.

     

    cross-posted from: https://programming.dev/post/54023908

    Hi!

    I've never read any of Uncle Bob's books. But I have taken interest in "Clean Architecture" as it seems like a good solution to make mid to large sized projects simple to understand and maintain.

    I think MVC gets too much coupling and fails at larger projects, same with n-tier. But I'm not sure about anything right now (software design is a very complicated problem after all).

    So I was wondering if you friends who have used Clean Architecture in production can share your knowledge and experience with me about this design?

    Is it actually good and worth investing in?

    Footnote:

    I'm especially weighing this architecture because Uncle Bob's writings are really hit and miss. I don't see him as a master or guru so I take everything he says with a grain of salt.

     

    cross-posted from: https://programming.dev/post/54023908

    Hi!

    I've never read any of Uncle Bob's books. But I have taken interest in "Clean Architecture" as it seems like a good solution to make mid to large sized projects simple to understand and maintain.

    I think MVC gets too much coupling and fails at larger projects, same with n-tier. But I'm not sure about anything right now (software design is a very complicated problem after all).

    So I was wondering if you friends who have used Clean Architecture in production can share your knowledge and experience with me about this design?

    Is it actually good and worth investing in?

    Footnote:

    I'm especially weighing this architecture because Uncle Bob's writings are really hit and miss. I don't see him as a master or guru so I take everything he says with a grain of salt.

     

    Hi!

    I've never read any of Uncle Bob's books. But I have taken interest in "Clean Architecture" as it seems like a good solution to make mid to large sized projects simple to understand and maintain.

    I think MVC gets too much coupling and fails at larger projects, same with n-tier. But I'm not sure about anything right now (software design is a very complicated problem after all).

    So I was wondering if you friends who have used Clean Architecture in production can share your knowledge and experience with me about this design?

    Is it actually good and worth investing in?

    Footnote:

    I'm especially weighing this architecture because Uncle Bob's writings are really hit and miss. I don't see him as a master or guru so I take everything he says with a grain of salt.

     

    Hi.

    I'm curious what architecture do you use for medium to large Clojure applications? MVC, Clean Architecture, N-tier?

    What were your experience with them? What do you recommend?

    I'm asking this question in general to discuss the common architectural patterns in Clojure, but I'm also creating a somewhat complex "micro" service with clj-kit and I'm interested in learning how to organize and architect it.

     

    cross-posted from: https://programming.dev/post/53556505

    Git repo

    Convert Outlooks' horrendous .pst file to standard .vcf vCard and import to any vCard compatible client (your phone, radicale, thunderbird, etc.)


    Why I made this?

    I decided to move my whole org to ThunderBird to be free from forced proprietary formats. And I created this Java CLI app (Because Java had the java-libpst to work with PST files) to do it. I converted ~500 contacts successfully and we are free from Outlook at last.


    This has worked for us, and I tried to make it as robust as possible. If you see any issues, please open an issue or PR.

    LLM disclaimer: I used OpenCode + BigPickle to create this but I wouldn't call it vibecoded. I spent ~2 days on it so far and let the LLM help me. Hope it helps.

     

    cross-posted from: https://programming.dev/post/53556505

    Git repo

    Convert Outlooks' horrendous .pst file to standard .vcf vCard and import to any vCard compatible client (your phone, radicale, thunderbird, etc.)


    Why I made this?

    I decided to move my whole org to ThunderBird to be free from forced proprietary formats. And I created this Java CLI app (Because Java had the java-libpst to work with PST files) to do it. I converted ~500 contacts successfully and we are free from Outlook at last.


    This has worked for us, and I tried to make it as robust as possible. If you see any issues, please open an issue or PR.

    LLM disclaimer: I used OpenCode + BigPickle to create this but I wouldn't call it vibecoded. I spent ~2 days on it so far and let the LLM help me. Hope it helps.

    AI Disclosure:

    • Implementation - Generated
    • Testing - Generated
    • Review - Assisted
    • Deployment - Pair
     

    Git repo

    Convert Outlooks' horrendous .pst file to standard .vcf vCard and import to any vCard compatible client (your phone, radicale, thunderbird, etc.)


    Why I made this?

    I decided to move my whole org to ThunderBird to be free from forced proprietary formats. And I created this Java CLI app (Because Java had the java-libpst to work with PST files) to do it. I converted ~500 contacts successfully and we are free from Outlook at last.


    This has worked for us, and I tried to make it as robust as possible. If you see any issues, please open an issue or PR. My goal for sharing it is so more people can get out of outlook because the address book thing was a huge blocker for us, for quite a while.

    LLM disclaimer: I used OpenCode + BigPickle to create this but I wouldn't call it vibecoded. I spent ~2 days on it so far and let the LLM help me. Hope it helps.

     

    Hi guys. Just a heads up that Nym is total garbage. It has horrible, prototype-level apps. And the connection is so unstable. You'll be lucky if you connect at all. I used mullvad before and it would take 1-3s to connect. Nym takes at least 30s to connect, IF it connects at all.

    Tge only reason I bought it was the very cheap price. But a cheap price isn't worth it if it's not even working.

     

    cross-posted from: https://lemmy.thewooskeys.com/post/1269207

    FOSS calc and conversion

    A friend of mine made a cool calculator and unit converter. It parses natural English phrases like "how many inches are in 3 feet?" and "300 miles / 65 mph in hours and minutes" and "download 10GB 1Gbps". You can access it from web (including PWA), CLI or as a library. It has a strong FOSS philosophy behind it.

    view more: next ›