D Web Services Application Potential?

Rikki Cattermole via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 26 21:11:45 PDT 2015


On 27/07/2015 6:18 a.m., Brandon Ragland wrote:
> On Sunday, 26 July 2015 at 04:33:57 UTC, Rikki Cattermole wrote:
>> On 26/07/2015 10:47 a.m., Brandon Ragland wrote:
>>> [...]
>>
>> I wrote Cmsed[0], web service framework which uses Vibe.d and Dvorm
>> (ORM)[1].
>> They are both sunsetted.
>>
>> I'm currently working on a web server[2] that will ultimately replace
>> a good bit of what Vibe.d is currently being used for. Which will be
>> using libasync[3] (backend for vibe.d but purely in D) instead of Vibe.d.
>>
>> Of course progress is slow and my current set of code is not up in the
>> repository as I wrote it on stream[4]. My intention is there, is once
>> std.experimental.image gets more boring again / can't do much on
>> stream I'll start work on it again. Once it comparable to what I've
>> got on repo, I'll update it.
>> In terms of what the web server will be like, Apache httpd config
>> syntax[5] but a LOT more dynamic ala JSP style.
>>
>> Once web server is done then I'll continue with my web service
>> framework based upon Cmsed. Most of that code is ready to go. It's
>> just things like reloading and templates that need rewriting.
>>
>> [0] https://github.com/rikkimax/cmsed
>> [1] https://github.com/rikkimax/dvorm
>> [2] https://github.com/DNetDev/webserver
>> [3] https://github.com/etcimon/libasync
>> [4] https://www.livecoding.tv/alphaglosined/
>> [5] https://github.com/DNetDev/apache_httpd_format
>
> The idea of a JSP like system would bring a lot of the Java guys over to D.
>
> JSP has JSTL and EL markup on the JSP pages that work well with servlets
> and EJBs.
>
> I've been fooling around the repos posted here and thinking about what
> it might take to get a framework on top of vibe.d to perform similar
> functions as a Java container.
>
> I appreciate the links / responses guys. It's always worth the read.
>
> -Brandon

What I currently have is code templates as follows:

<?lua
	echo("<p>" .. consumeNextText() .. "</p>")
?>

Hi there, this is some text!
Woopity doo.

<?lua
	include_text("<?lua echo(\"boo\") ?>")
?>

So it would output something like:
<p>
Hi there, this is some text!
Woopity doo.
</p>boo

The languages supported would have to be known and configured at compile 
time. But theoretically other languages such as Squirrel and PHP should 
work.
D on the other hand, would be ugh hard.

I will be supporting the ability to pass in e.g. data models and even 
query them. Thanks to reflection that I've added since Cmsed.


More information about the Digitalmars-d mailing list