Thread overview
Vibe.d and NodeJs with Express
Jul 12, 2020
greatsam4sure
Jul 12, 2020
Sebastiaan Koppe
Jul 12, 2020
Greatsam4sure
Jul 12, 2020
aberba
Jul 15, 2020
bauss
Jul 15, 2020
aberba
July 12, 2020
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. My believe is that most JavaScript library will work with Vibe. 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
July 12, 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.

How much speed do you need? I doubt you really need every last millisecond, at which point ease of development takes over.  Instead it might be better to look at which third party libraries you need. D has got most you need but you might end up needing something which isn't there. If you are ready to code that yourself then go for D for sure.

> 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.

If the app stays small that can work but you can also look at something a bit more modern. Angular, react, vue or svelte, there are plenty to pick from.

> My believe is that most JavaScript library will work with Vibe. D out of the box.

Of course. You just end up writing an rest or graphql backend in D and connect it to a frontend.
July 12, 2020
On Sunday, 12 July 2020 at 10:44:13 UTC, Sebastiaan Koppe wrote:
> On Sunday, 12 July 2020 at 10:01:54 UTC, greatsam4sure wrote:
>> [...]
>
> How much speed do you need? I doubt you really need every last millisecond, at which point ease of development takes over.  Instead it might be better to look at which third party libraries you need. D has got most you need but you might end up needing something which isn't there. If you are ready to code that yourself then go for D for sure.
>
>> [...]
>
> If the app stays small that can work but you can also look at something a bit more modern. Angular, react, vue or svelte, there are plenty to pick from.
>
>> [...]
>
> Of course. You just end up writing an rest or graphql backend in D and connect it to a frontend.



Thanks really appreciate it.
July 12, 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. My believe is that most JavaScript library will work with Vibe. 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 reasons.

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 everything.


D is enjoyable to use nevertheless. I'm looking at doing another side project when time permits...or even continue my blog series (aberba.com)


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.
July 15, 2020
On Sunday, 12 July 2020 at 19:16:32 UTC, aberba wrote:
> 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...


I'm one of the few but then again I don't use a lot of external packages either other than what vibe.d really depends on.

I implement most things I need myself; mostly because when I find someone that has a package for what I need it's either too abstract, too generic or isn't really "simple" to implement.
July 15, 2020
On Wednesday, 15 July 2020 at 04:19:57 UTC, bauss wrote:
> On Sunday, 12 July 2020 at 19:16:32 UTC, aberba wrote:
>> 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...

> I implement most things I need myself;

That's when you have time and compelling reason to do that. Most at times I don't. And dub packages mostly works fine...why I like it when there's several options to choose from.