www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Diamond MVC / Template Engine - v2.0.4 Released

reply bauss <jj_1337 live.dk> writes:
So I finally got around having time in my life to work with 
Diamond, which also meant fixing a few things in it, such as 
making it compatible with the latest version of DMD.

Version 2.0.4 includes the following additions:

* Support for escaped expressions using  $=expression;
* Compiles with latest version of DMD (Fixed an issue with 
compile-time AA's)
* New view functionality for rendering (View the wiki for more 
information.)
* Redirection functionality for controllers (View the wiki for 
more information.)

Github: https://github.com/bausshf/Diamond
Dub: https://code.dlang.org/packages/diamond (Currently waiting 
for the registry to update, so manual fetches from Github are 
required until the registry updates to 2.0.4 -- been waiting the 
past 2 hours or so and it seems like the registry has some issues 
atm. so hopefully that's fixed soon.)

Previous releases can be found here:
https://github.com/bausshf/Diamond/releases

-- To people who hasn't seen this project before --

What is Diamond?

Diamond is a MVC / Template library written in Diamond. It was 
written originally as an alternative to the Diet templates in 
vibe.d, but now its functonality and capabilities are far beyond 
templating only.

What does Diamond depend on?

Diamond can be used stand-alone without depending on any 
third-party libraries, other than the standard library Phobos. It 
has 3 types of usage, websites and webservices, where it's used 
on-top of vibe.d and as a stand-alone mvc/template library.

What is the dependency to vibe.d?

Diamond was originally written to be used in a hobby project as 
an alternative syntax to the "standard" diet templates. Thus it 
was originally build on-top vibe.d as a pure website template. It 
has now evolved to be able to run stand-alone however.

What syntax does Diamond use?

Diamond is heavily inspired by the ASP.NET razor syntax, but 
still differs a lot from it. You can read more about that in the 
wiki under Syntax Reference or the comparison with ASP.NET Razor

What advantages does Diamond have over Diet?

It let's you control the markup entirely, can be integrated with 
any-type of D code, not limited to vibe.d and can be used as 
standard template library for any type of project such as email 
templates etc. It also allows for special rendering, easy 
controller implementations and management of request data, 
response etc.
Oct 13 2017
parent reply bauss <jj_1337 live.dk> writes:
On Friday, 13 October 2017 at 07:16:14 UTC, bauss wrote:
 So I finally got around having time in my life to work with 
 Diamond, which also meant fixing a few things in it, such as 
 making it compatible with the latest version of DMD.

 Version 2.0.4 includes the following additions:
I apologize; it's supposed to be version 0.2.4
Oct 13 2017
parent bauss <jj_1337 live.dk> writes:
On Friday, 13 October 2017 at 07:23:03 UTC, bauss wrote:
 On Friday, 13 October 2017 at 07:16:14 UTC, bauss wrote:
 So I finally got around having time in my life to work with 
 Diamond, which also meant fixing a few things in it, such as 
 making it compatible with the latest version of DMD.

 Version 2.0.4 includes the following additions:
I apologize; it's supposed to be version 0.2.4
I noticed a mistake again that I did with previous version "0.2.32" of course it wouldn't make "0.2.4" latest version, because 32 is above 4. So I have updated the version to 0.3.0, which I probably should have made it originally.
Oct 13 2017