Web servers in D
Eugene Wissner via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Aug 24 23:15:35 PDT 2017
On Friday, 25 August 2017 at 05:25:09 UTC, Hasen Judy wrote:
> What libraries are people using to run webservers other than
> vibe.d?
>
> Don't get me wrong I like the async-io aspect of vibe.d but I
> don't like the weird template language and the fact that it
> caters to mongo crowd.
>
> I think for D to a have good web story it needs to appeal to
> serious backend developers, not hipsters who go after fads
> (mongodb is a fad, jade/haml is a fad).
>
> I probably need to combine several libraries, but the features
> I'm looking for are:
>
> - Spawn an HTTP server listening on a port, and routing
> requests to functions/delegates, without hiding the details of
> the http request/response objects (headers, cookies, etc).
>
> - Support for websockets
>
> - Runs delegates in fibers/coroutines
>
> - Basic database connectivity (No "orm" needed; just raw sql).
>
> - When iterating the result set of a sql query, has the ability
> to automatically map each row against a struct, and throw if
> the structure does not match.
>
> - More generally, map any arbitrary object (such as json) to a
> struct. Something like Zewo/Reflection package for swift[0].
>
> [0]: https://github.com/Zewo/Reflection
>
> I feel like Vibe.d satisfies my first 3 requirements, but for
> the rest I will probably have to look for something else.
There is collie [1]. Never used. Can't say a lot about it.
arsd [2] has a lot of interesting web stuff: event loop,
FastCGI/SimpleCGI; web-, DOM-, mail-utilities.
And the last but not least I'm running currently a small web
server serving static files based on tanya [3]. Once I'm ready to
write a web-framework on top of it, it would be what you mention:
no compile-time templates, no jade-style templates, since I
dislike these too. But unfortunately it is not something can be
used now.
[1] https://github.com/huntlabs/collie
[2] https://github.com/adamdruppe/arsd
[3] https://github.com/caraus-ecms/tanya
More information about the Digitalmars-d-learn
mailing list