web development in D

Adam D. Ruppe destructionator at gmail.com
Sat May 21 09:18:39 PDT 2011


Yea, the Dynamic Web Rendering thread just went over this, so
shouldn't be hard to find that thread.

It went into discussing my method and got a little long, but the
summary is:

You can write web apps in D using the standard CGI interface or
a long lived process (embedded http server or whatever.)

My code works best with standard CGI, cgi.d in here:
http://arsdnet.net/dcode/

I also have an httpd.d (requires netman.d) that lets the cgi
interface work with an embedded server, but it's single threaded
so that can be a problem. It's not production ready.

Regular cgi though works with other existing web servers, is
easy to use, and actually performs quite well.

(You'll find a lot of people complaining on the internet that
CGI is slow, but check the date on those articles and see if they
are using Perl or native compiled binaries.

Usually they are very old and using an interpreter - that's why
it is slow. A native binary over cgi is quite fast.)



The stuff you build on top of cgi can be whatever you want. I
personally use my dom.d and web.d modules for templating and
some automatic code generation, but you can spin your own libs
too.


More information about the Digitalmars-d-learn mailing list