Vibe.d and NodeJs with Express
karabutaworld at gmail.com
Sun Jul 12 19:16:32 UTC 2020
On Sunday, 12 July 2020 at 10:01:54 UTC, greatsam4sure wrote:
> I am thinking of building an App with Vibe. D or NodeJS but my
> topmost priority is speed and ease of development due to third
> party libraries integration. I know Vibe. D is faster than
> NodeJS and I love to use Dlang. My question is can I eat my
> cake and have it if I go with Dlang and Vibe. D. I have being
> able to use jQuery and bootstrap with vibe. D and it work well.
> D out of the box. The application with use database heavily,
> can I work easily with database in vibe. D. For me I would love
> to use D for it raw power and speed.
> Please this is a post to criticize D but to encourage me to use
> it. I need pros and cons
It depends. Most cases nodejs will work just fine for performance
Im my last major side project I tried to use vibe.d and even
though I enjoy using D, I was slowed down by...
1) figuring vibe.d APIs out,
2) compilation speed (considering using something like nodemom,
the nodejs express server just restarts on save)... I believe
there's a way to do that in vibe.d by using a program that
monitors file changes but wasn't a low hanging fruit so I just
recompiled manual. Was very annoying but something like LDC or
GDC would have made it worst. Compilation speed is very important
for quick iterations... something you'll be doing 1000s of times.
3) packages, now it might be better though. But I've always felt
that there's not a lot of people using D for complete web dev
projects... packages was lacking. When doing a full stack job you
then realise having packages for just about everything you need,
gets the job done. Honestly was my main major issue. Yeah, main
major :) Tried to build "sanival" for form data validation
server-side (like validator.js) but gave up as project idea fell
apart. Was very early stage...not much code was written then.
Since then I haven't had chance to use D for such.
4. Help resources and people to ask for help. Now community is
increasing so I'm sure it shouldn't be an issue. D community is
very welcoming and helpful. That I really appreciate. However
there's not a lot people doing web or stuff to Google. I did
start blogging about D for web dev on my website to improve this.
Random people actually liked it... considering my stuff are meh :)
That was about two yrs ago. New packages are now in dub. Even
then every language suffers from sdks for interfacing with cloud
services. AWS S3, Google services etc. Frankly something that
makes nodejs very compelling cus there's packages for just about
D is enjoyable to use nevertheless. I'm looking at doing another
side project when time permits...or even continue my blog series
So for me...its not mostly about the language itself but how I'm
able to get things done.
I'm looking to improve resources discovery and availability in D
for beginners too. Something I keep thinking about. Will
hopefully share something soon.
More information about the Digitalmars-d-learn