www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Web Programming in D

reply aberba <karabutaworld gmail.com> writes:
https://forum.dlang.org/post/cffdqyvthqvurbcpxvbo forum.dlang.org

On Thursday, 22 June 2023 at 06:15:47 UTC, Web Dev wrote:
 The D language is among the languages ​​that I have been 
 interested in for a long time, and it is pleasing to see that 
 there is an active community by following the forum for a while.

 As part of my job, I usually develop web software. There have 
 been projects where I have used Python, PHP and recently Go for 
 the backend.

 However, I recently thought of using the D language in web 
 projects as well. When I look at the frameworks developed on 
 the web, I see Hunt and Vibe.D options.

 I think Hunt is no longer in development but Vibe.D continues 
 to be developed.

 Has anyone done a web project with Vibe.D before? What are the 
 positive and negative aspects? Does it make sense to use the D 
 language on the web for now?
Personally I see nothing specifically wrong with vibe.d. I've talked to people using vibe.d professionally in the community too. The only major issue will be the few third-party packages. Everything else is doable. Vibe.d uses diet templates which can take a while to compile but that's about it.
Feb 07
next sibling parent reply Sergey <kornburn yandex.ru> writes:
On Thursday, 8 February 2024 at 00:47:52 UTC, aberba wrote:
 Personally I see nothing specifically wrong with vibe.d. I've 
 talked to people using vibe.d professionally in the community 
 too. The only major issue will be the few third-party packages. 
 Everything else is doable.

 Vibe.d uses diet templates which can take a while to compile 
 but that's about it.
Interesting. I thought the large number of packages is the main advantage of the vibe :D While disadvantages: - bad maintenance - a lot of code - hard to understand code => hard to fix bugs - slow compilation time - with diet it becomes even slower
Feb 08
parent aberba <karabutaworld gmail.com> writes:
On Thursday, 8 February 2024 at 10:21:29 UTC, Sergey wrote:
 On Thursday, 8 February 2024 at 00:47:52 UTC, aberba wrote:
 Personally I see nothing specifically wrong with vibe.d. I've 
 talked to people using vibe.d professionally in the community 
 too. The only major issue will be the few third-party 
 packages. Everything else is doable.

 Vibe.d uses diet templates which can take a while to compile 
 but that's about it.
Interesting. I thought the large number of packages is the main advantage of the vibe :D
Well vibe.d has the most packages in the D ecosystem for sure and what I would go for when using D. But it the context of all other web development languages/frameworks, vibe has very limited options. You'd need to write a lot more code yourself.
Feb 08
prev sibling next sibling parent reply Martyn <martyn.developer googlemail.com> writes:
On Thursday, 22 June 2023 at 06:15:47 UTC, Web Dev wrote:
 As part of my job, I usually develop web software. There have 
 been projects where I have used Python, PHP and recently Go for 
 the backend.
It seems where you work you have the flexibility to use different tools for different projects. I am not sure why you would do this - but I am sure there are many. I think the decision is likely a business one, rather than the language itself. D is certainly capable being used for Websites or REST APIs etc. If you work on your own then I guess you are free to use whatever language you want without any pushback. For me, even as a lead, if I hinted at the next project being in a different language (not just D) I would have a number of puzzled (and unhappy) faces in my team. If I entertain the idea we all decided to use another language for legit reasons in our next project, especially for web development, the contenders are likely to be the popular choices like:- - PHP - Python - Ruby - Go Blimey, even Rust could be a serious contender for the web space now. another? For our circumstances.. very little. Also, picking "popular" languages will help hiring new developers, or replace existing ones. I have toyed with D using Vibe.d and I do like it. However, it is a lot of bloat and diet can slow things down. While it could still actively maintained, it is unlikely to be as full featured to others in php, python, go, etc. Personally, I would not give up other technologies for it in the workplace. The risks are too high, especially with other team members and the "pointing fingers" blame culture. Although we I did push for D and something went terribly wrong, pointing fingers at me is valid. Your circumstances might be different, though.
Feb 08
parent reply Sergey <kornburn yandex.ru> writes:
On Thursday, 8 February 2024 at 12:25:49 UTC, Martyn wrote:
 as **full featured** to others in php, python, go, etc.
Thank you for your reply. I had an idea to create a kind of list of features of web-frameworks (to see what D ecosystem is lacking). Current source of data is this page https://en.wikipedia.org/wiki/Comparison_of_server-side_web_frameworks - it has "classic" list of features. Also I've checked documentation of some frameworks with features, that mentioned on their pages. Some features that usually mentioned: - Authorization (including oauth) - Middleware - DB interaction (ORM) - Routing, handlers - Caching - Sessions Would you be so kind to name some list of features (based on your real life experience) that are vital from your opinion and is not on the surface?
Feb 08
parent reply Martyn <martyn.developer googlemail.com> writes:
On Thursday, 8 February 2024 at 12:46:05 UTC, Sergey wrote:
 On Thursday, 8 February 2024 at 12:25:49 UTC, Martyn wrote:
 as **full featured** to others in php, python, go, etc.
.. snip
Please dont take my comment out of context.... you missed vital bits before it:- **it is unlikely to be** as full featured to others in php, python, go, etc. Despite this... Yes, I will admit it is disingenuous of me to make this claim. D (or vibe.d particularly) are not popular choices in the web world. As it is not popular, it is not as actively used so while "full featured" is inaccurate it is still prone to bugs that would likely be addressed and fixed with other popular alternatives. Everyones position is different. If you (or the original poster) are working solo or have a team with the **same mindset** to try/use D then thats a different story. You're all in it together! For me, I would be arguing to use D with my present (and past) team. **I would have to sell D, first** Even if I win them over with D's power and flexibility - The question would remain.. why should we use it over PHP, Python, Ruby, Go, Rust, Java, etc? Could we hire developers easily with D than Python? Its an obvious question. **I would have to sell DUB.** using Nuget. Again.. why D+DUB when you have package managers available for other popular alternatives. **I would have to sell vibe.d** In all honesty, I think I could sell vibe.d well for simple demonstrations. It might take a bit of time to get them accustomed to using Diet. Despite my efforts, I will likely lose the battle to use D. We will use a language that is popular, highly active, with web frameworks heavily tried and tested! When you think of a least popular choice, you naturally think "what could be missing? Does it needs to play catchup?" My comment is not in any way pooping on D or libraries like vibe.d. I do appreciate the effort that has gone into the project. However, it is difficult to push for D+vibe.d because there is a risk compared to using other, more popular frameworks out there in python, php, go, etc? Last note -- if i was with a team who were all positive to using the D language (and even things like Vibe.d)... **I would be all in!** So please dont think I am being negative. This is just my answer to questions like "Should I use D for my next web project" - it depends.
Feb 08
parent reply Sergey <kornburn yandex.ru> writes:
On Thursday, 8 February 2024 at 14:36:48 UTC, Martyn wrote:
 On Thursday, 8 February 2024 at 12:46:05 UTC, Sergey wrote:
 On Thursday, 8 February 2024 at 12:25:49 UTC, Martyn wrote:
 as **full featured** to others in php, python, go, etc.
.. snip
Please dont take my comment out of context.... you missed vital bits before it:- **it is unlikely to be** as full featured to others in php, python, go, etc.
Don't get me wrong, I didn't have any context of getting vibe in production. And your point from first message also was very clear and I definitely understood it. There are many points why it is almost impossible to bring D into production, at least with current level of the development (which is not about compiler itself or even ecosystem, but about the risks and userbase). But my question was more about features for web-frameworks not related to D. Just features themself. And their usability in other frameworks.
Feb 08
next sibling parent aberba <karabutaworld gmail.com> writes:
On Thursday, 8 February 2024 at 15:50:41 UTC, Sergey wrote:
 On Thursday, 8 February 2024 at 14:36:48 UTC, Martyn wrote:
 On Thursday, 8 February 2024 at 12:46:05 UTC, Sergey wrote:
 On Thursday, 8 February 2024 at 12:25:49 UTC, Martyn wrote:
 as **full featured** to others in php, python, go, etc.
.. snip
Please dont take my comment out of context.... you missed vital bits before it:- **it is unlikely to be** as full featured to others in php, python, go, etc.
Don't get me wrong, I didn't have any context of getting vibe in production. And your point from first message also was very clear and I definitely understood it. There are many points why it is almost impossible to bring D into production, at least with current level of the development (which is not about compiler itself or even ecosystem, but about the risks and userbase). But my question was more about features for web-frameworks not related to D. Just features themself. And their usability in other frameworks.
Vibe.d is actually very packed with features. It however has got it's own way of doing session and auth using high level APIs which I'm not a fun of their design. With that said, I see nothing that can't be done in vibe.d. For example, Node.js has express framework which is very popular for web. Arguably more popular than those traditional (python, vibe.d. Vibe.d has auth (can do oauth), session, has orms available, crypto/hashing, websocket, etc. The D community is mostly centered around system programming and many folks here who might not be developing full stack web professionally are too critical of vibe.d in ways that IMO are unrealistic. By that criteria, node.js (JavaScript) wouldn't even be qualify to be used for anything. Node.js (JavaScript) is the top language for web dev both serverside and clientside.
Feb 08
prev sibling parent reply karitoy <karitoy gmail.com> writes:
On Thursday, 8 February 2024 at 15:50:41 UTC, Sergey wrote:
 On Thursday, 8 February 2024 at 14:36:48 UTC, Martyn wrote:
 On Thursday, 8 February 2024 at 12:46:05 UTC, Sergey wrote:
 On Thursday, 8 February 2024 at 12:25:49 UTC, Martyn wrote:
 as **full featured** to others in php, python, go, etc.
.. snip
Please dont take my comment out of context.... you missed vital bits before it:- **it is unlikely to be** as full featured to others in php, python, go, etc.
Don't get me wrong, I didn't have any context of getting vibe in production. And your point from first message also was very clear and I definitely understood it. There are many points why it is almost impossible to bring D into production, at least with current level of the development (which is not about compiler itself or even ecosystem, but about the risks and userbase). But my question was more about features for web-frameworks not related to D. Just features themself. And their usability in other frameworks.
Hi Sergey, if you are just about to learn Vibe.d, I have written a tutorial on it here: https://reyvaleza.gitbook.io/vibe.d-tutorial/ You can take a cursory look at that tutorial and see if Vibe.d has the features you are looking for.
Feb 26
parent Sergey <kornburn yandex.ru> writes:
On Monday, 26 February 2024 at 13:43:56 UTC, karitoy wrote:
 has the features you are looking for.
Hi, Yeah I'm aware of this tutorial and thanks for creating it :) But I'm mostly interested in some comparison and feature-list. So people will be able to check them easily. Compare different solutions and make the decision. Because as previously were mentioned in the thread it is quite hard to bring non-mainstream language and non-mainstream solution to real projects.
Feb 26
prev sibling parent Emmanuel Danso Nyarko <emmankoko519 gmail.com> writes:
On Thursday, 8 February 2024 at 00:47:52 UTC, aberba wrote:
 https://forum.dlang.org/post/cffdqyvthqvurbcpxvbo forum.dlang.org

 On Thursday, 22 June 2023 at 06:15:47 UTC, Web Dev wrote:
 [...]
Personally I see nothing specifically wrong with vibe.d. I've talked to people using vibe.d professionally in the community too. The only major issue will be the few third-party packages. Everything else is doable. Vibe.d uses diet templates which can take a while to compile but that's about it.
emmankoko5199 gmail.com. can you ping me?
Feb 26