I finally got around and fixed the last corners here and there.
If you wonder what Diamond is, then it's a library for developing
full-stack MVC web-applications based on vibe.d.
It contains a lot of features (Which you can see in the READ ME)
To name a few of the key features:
* Full control over requests / responses when wanted.
* "Websettings" file that lets you control requests / responses
* Before a request is handled.
* After a request has been handled.
* When an error occurres.
* When a page or controller action wasn't found.
* When a static file has been requested.
* Multiple static file paths
* Let's you bind to multiple ip addresses and ports.
* Let's you control default headers for each type of request
(default, static files, errors, not found etc.)
* Uses vibe.d for backend, so it's very powerful and all vibe.d
features can be used with Diamond
* Easy control over the application's type using *static if*
* isWeb (true for both web-servers and web-apis.)
* isWebServer (true for web-servers)
* isWebApi (true for web-apis)
* isWeb, isWebServer and isWebApi will be false for standalone.
* ACL & Authentication tied to it
* Separate authentication that can be used either with or without
* CSRF Protection
* Easy integrated cookie/session API.
* The network can be restricted to specific ips.
* Route rewriting
* Database Integration & Object Relational Mapping
* Specialized Routes (Can fetch resources external internal or
* Views are parsed at compile-time, thus rendering of views are
* Views can have layout views
* Views have a metadata section that lets you change view
configurations such as its controller, model, layout, route and
* Views have placeholders and layout view's can access the render
* Views can encode their data
* Has a rich syntax that allows for complex and innovative
* Easy access to the current request / response using the
properties: *httpRequest* and *httpResponse*
* Can render other views within itself
* Any type of D code can be written within views.
* Allows for sections, which is useful to only render a part of
the view. (Very useful for responsive designs)
* Can be passed to controllers by their base view
* Layout views can be changed dynamically
* Expensive views can be cached.
* Controller actions are mapped through attributes. (By default
the route name will be the name of the function.)
* If wanted actions can be mapped manually, but that's a legacy
* Controller actions can easily control how the response is
handled, as they require a status returned
* Status.success (Will continue to handle the request.)
* Status.end (Will end the request; useful for json responses
etc. *Note: using the json() function already does it for you.)*
* Status.notFound (Will issue a 404 status for the response.)
* Can map mandatory actions that are executed on every requests.
(Useful for authentication etc.)
* Easy integrated authentication (Can be combined with ACL)
* Specific actions can be restricted to specific ips.
After 2.7.0 I have decided to drop backward compatibility as
2.7.0 barely introduces any major breaking changes, but it fixes
a lot of issues and now works with vibe.d 0.8.2 and mysql-native
Since last announced update the following has been added:
* i18n messages can now be added dynamically.
* Support for mysql-native 2.1.0
* Support for vibe.d 0.8.2
* Removed backward compatibility with older vibe.d versions
* Slowly moving away from shared static constructors. (Currently
Diamond implements a main function for a start.)
* Better internal usage of placeholders (They now append to the
view's content, instead of using std.array.replace.)
* Removed the rootPath property from the View class, because it
was expensive and kind of useless.
* You can now retrieve placeholder values from views
* Route creation was made public
* Added new view functionality such as the ability to delay view
render for layouts etc.
* Added the ability to use a single view for routing
* Added a view constructor extension type
Other than that minor optimizations and bug fixes has also taken
Dub: https://code.dlang.org/packages/diamond (Currently waiting
for dub to update the package!)
In the last announcement for Diamond I said I'd implement a SEO
API and SOAP support and it's still planned, but it wasn't
prioritized like updating to vibe.d 0.8.2 and mysql-native 2.1.0
I still plan to implement it within the near future!
I think Diamond has reached a stable phase, which means I can
focus on adding tutorials, examples etc.
I also need to pick up working on the official Diamond website,
but I have a lot of actual paid work that I can't just put away
at the moment, so my time working on actual Diamond is limited
I'd like to give a special thanks to everyone who contributes to
D, vibe.d and mysql-native, because without them Diamond wouldn't
be where it's at!
Thank you for your time!