You can edit almost every page by Creating an account. Otherwise, see the FAQ.

Diamond MVC

From EverybodyWiki Bios & Wiki


Diamond
Original author(s)Jacob Jensen
Developer(s)Jacob Jensen / bausshf
Initial releaseMay 17, 2016
Stable release
2.4.6 / November 6, 2017
Written inD language
Engine
    Operating systemCross-platform
    TypeWeb framework,Model-view-controller,Web template system
    LicenseMIT License
    Website[1]

    Search Diamond MVC on Amazon.

    Diamond is an open-source software web framework and web template system originally build as an alternative to Diet templates in vibe.d, however it now has standalone-support, but still uses vibe.d for its web support. It's heavily inspired by ASP.NET Razor for its template syntax, as well the model-view-controller implementation. Diamond is written entirely in the D programming language.

    Features[edit]

    Performance[edit]

    Diamond has an exceptional performance, because it processes its templates at compile time and thus it doesn't have to do much parsing on each request. At the same time it depends on vibe.d as its web backend, which itself is a powerful engine.

    MVC (Model-view-controller)[edit]

    Diamond primarily uses the model-view-controller pattern for processing. However using the model-view-controller pattern isn't required and is completely optional.

    Syntax[edit]

    The syntax of Diamond is heavily inspired by ASP.NET Razor, but still differs and has its own set of rules.

    Below is an example of a simple view with a layout, displaying the syntax of Diamond templates.

    Layout.dd:

    @<doctype>
    <html>
    <head>
      <title>@<title></title>
    </head>
    <body>
      @<view>
    </body>
    </html>

    Home.dd:

    @[
      layout:
        layout
    ---
      controller:
        HomeController
    ---
      model:
        Home
    ---
      route:
        home
    ---
      placeHolders:
        [
          "title": "Home"
        ]
    ]
    
    @:import std.datetime : Clock;
    
    The time is: <b>@=Clock.currTime();</b>
    
    @:if (model) {
      <span>Passed a model with: @=model.foo;</span>
    }
    @:else {
      <span>Passed no model.</span>
    }

    Authentication[edit]

    Diamond supports a very flexible integration of authentication with roles.

    ACL[edit]

    Diamond has ACL build-in with an easy API that can be used along with its build-in authentication.

    RESTful[edit]

    Combined with the ACL Diamond has the possibility to be completely RESTful.

    Cookies/Sessions[edit]

    Diamond implements an easy-to-use cookie/session API.

    Network Restrictions[edit]

    The applications written in Diamond can be restricted to specific networks, either globally or per controller actions.

    Unittesting[edit]

    Unittesting is build-in and can easily be integrated with applications using Diamond.

    Object-relational-mapping[edit]

    Diamond supports object-relational-mapping, easily integrated with its MySql engine.

    See also[edit]

    References[edit]

    External links[edit]

    [1] [2] [3]


    This article "Diamond MVC" is from Wikipedia. The list of its authors can be seen in its historical. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.