Web Programming in D
aberba
karabutaworld at gmail.com
Tue May 21 09:37:42 UTC 2024
On Tuesday, 21 May 2024 at 06:54:35 UTC, Sergey wrote:
> On Tuesday, 21 May 2024 at 03:37:11 UTC, aberba wrote:
>>
>> For backend only webdev, I see no issue with using vibe.d
>> besides not getting more options of third-party library for
>> cloud services in D.
>
> Speed? (both compilation and RpS)
>
>> The major complaint was that vibe.d has a slow html templating
>> library (diet) but that was about it.
>>
>> These days, front-end libraries/frameworks ( react, angular,
>> vue, svelte) are often used anyways.
>
> Recently htmx is gaining some popularity as well, which is not
> supported by D currently afaik.
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).
React has hot-reload in most frameworks where you see results of
changes instantly...ensure fast iteration especially when styling
elements. It's something like this vide.d's diet templates simply
cannot match.
And why compiled languages like D are IMO suitable for back-end
especially with safety (GC) and strict type checking.
>
>> I personally would consider vibe.d for backend only when
>> building "large" apps due to the von mentioned above.
>
> But what are the benefits for large apps comparing to other
> solutions?
D is faster than Java, JavaScript, ruby, Python. It's uncommon to
find a language that reads like JavaScript by runs as fast as
C++. As long as D code isn't time consuming to write or
unnecessarily complicated, it checks many boxes except the lack
of third-party packages for cloud services...aws, AI, dbms, web
scraping, etc.
But personally, D has most of the main ones, you may just have to
manually write a few more. I don't use D professionally mainly
because of ecosystem reasons... because the JavaScript ecosystem
is so rich these days for productivity although performance sucks
for backend. But it's still within acceptable range.
More information about the Digitalmars-d
mailing list