Web Programming in D
Martyn
martyn.developer at googlemail.com
Tue May 21 12:48:12 UTC 2024
On Tuesday, 21 May 2024 at 09:37:42 UTC, aberba wrote:
> Naa, htmx is niche too (except on hackernews). Along with many
> others in the same bucket.
>
> With that said, front-end requires a lot of iteration of the
> elements and styling and it'll be frustratingly slow working
> with a compiled language for that. Languages like like Go,
> Python, D, ruby are mainly suitable for backend. It doesn't
> make sense to not use these JavaScript libraries for front-end.
> React, vue, angular and svelte will be the top 4. I don't see
> why you'd want an alternative you'd have to wait for
> compilation after every single change (that is even if htmx was
> ported to D).
From my (and my teams) experience, it was not a frustratingly
slow process when working on the frontend with htmx.
Our Server side returns html. Thats it. Sure - do we need to
compile the code. Yes.. but we also created unit tests returning
said html with mock data. We can easily grab it and dump it into
the web browser to do our iteration and styling.
We do not use anything special.. just make use of the web
browsers built in tools, injecting sample html and mucking with
the CSS. Generally speaking, once we get our desired results, we
take our CSS changes from the browser and update our .css files
-- refresh/repeat. Same for any changes to our html output. Once
happy we test the htmx aspect of it.
Sure, we took a few days to get the hang of htmx and find our
flow. Now, it is just so much easier and productive when fixing
bugs or adding new features. We are skipping a lot of the
javascript side of it or a framework that adds additional layers
with components, actions, etc.
Niche might be the right word. It certainly is niche in our team.
I work with 6 developers and we can focus on getting the job done
rather than having to deal with (something like) React.
We also dont need to hire anyone (anymore) where react is
useful.. or even need to get a fulltime react dev. I can hire
devs where skills matter most yet can still jump on our web
projects when needed.
Our internal web portal is not small. It looks nice. It
transitions/animates nice. It still looks rather similar to our
previous one (in React) - it just avoids much of the javascript.
I honestly think Niche fits React as well. If it works for a
company or development team - more power to you.
More information about the Digitalmars-d
mailing list