All Projects → DiamondMVC → Diamond

DiamondMVC / Diamond

Licence: mit
Diamond is a full-stack web-framework written in The D Programming Language using vibe.d

Programming Languages

d
599 projects
dlang
54 projects

Projects that are alternatives of or similar to Diamond

MVVM-Design-Pattern-Demo
An Xcode 9 project written in Swift 4 code designed using the MVVM design pattern, truly extolling the virtues of MVVM over MVC.
Stars: ✭ 31 (-82.08%)
Mutual labels:  mvc, view, controller, model
Modelassistant
Elegant library to manage the interactions between view and model in Swift
Stars: ✭ 26 (-84.97%)
Mutual labels:  controller, model, mvc, view
Hunt Framework
A Web framework for D Programming Language. Full-stack high-performance.
Stars: ✭ 256 (+47.98%)
Mutual labels:  webservice, orm, mvc, template-engine
Elefant
Elefant, the refreshingly simple PHP CMS and web framework.
Stars: ✭ 188 (+8.67%)
Mutual labels:  orm, mvc, template-engine
Flexml
🚀基于Litho的Android高性能动态业务容器。
Stars: ✭ 225 (+30.06%)
Mutual labels:  mvc, view, template-engine
Kvantum
An intellectual (HTTP/HTTPS) web server with support for server side templating (Crush, Apache Velocity and JTwig)
Stars: ✭ 17 (-90.17%)
Mutual labels:  template-engine, web-server, webserver
php-mvc
Mini framework para aplicaciones PHP con el patrón MVC
Stars: ✭ 35 (-79.77%)
Mutual labels:  view, controller, model
Furion
Make .NET development easier, more versatile, and more popular.
Stars: ✭ 902 (+421.39%)
Mutual labels:  webapi, mvc, razor
Wpemerge
A modern, MVC-powered WordPress as a CMS workflow. 🚀
Stars: ✭ 348 (+101.16%)
Mutual labels:  controller, mvc, view
Cppwebframework
​The C++ Web Framework (CWF) is a MVC web framework, Open Source, under MIT License, using C++ with Qt to be used in the development of web applications.
Stars: ✭ 348 (+101.16%)
Mutual labels:  webservice, mvc, webserver
Saea
SAEA.Socket is a high-performance IOCP framework TCP based on dotnet standard 2.0; Src contains its application test scenarios, such as websocket,rpc, redis driver, MVC WebAPI, lightweight message server, ultra large file transmission, etc. SAEA.Socket是一个高性能IOCP框架的 TCP,基于dotnet standard 2.0;Src中含有其应用测试场景,例如websocket、rpc、redis驱动、MVC WebAPI、轻量级消息服务器、超大文件传输等
Stars: ✭ 318 (+83.82%)
Mutual labels:  webapi, mvc, webserver
Treefrog Framework
TreeFrog Framework : High-speed C++ MVC Framework for Web Application
Stars: ✭ 885 (+411.56%)
Mutual labels:  orm, webserver, template-engine
Codegen
A model-view based code generator written in Java
Stars: ✭ 36 (-79.19%)
Mutual labels:  model, mvc, view
Jkmvc
Jkmvc is an elegant, powerful and lightweight MVC & ORM framework built using kotlin. It aims to be swift, secure, and small. It will turn java's heavy development into kotlin's simple pleasure. No spring.
Stars: ✭ 86 (-50.29%)
Mutual labels:  orm, mvc
Dbwebapi
(Migrated from CodePlex) DbWebApi is a .Net library that implement an entirely generic Web API (RESTful) for HTTP clients to call database (Oracle & SQL Server) stored procedures or functions in a managed way out-of-the-box without any configuration or coding.
Stars: ✭ 84 (-51.45%)
Mutual labels:  webapi, razor
Slickone
A Quick Enterprise Web Framework for Information System 企业级Web快速开发框架
Stars: ✭ 87 (-49.71%)
Mutual labels:  webapi, mvc
Twig
Twig - less is more's web server for golang
Stars: ✭ 98 (-43.35%)
Mutual labels:  webapi, webserver
Butterfly
🔥 蝴蝶--【简单】【稳定】【好用】的 Python web 框架🦋 除 Python 2.7,无其他依赖; 🦋 butterfly 是一个 RPC 风格 web 框架,同时也是微服务框架,自带消息队列通信机制实现分布式
Stars: ✭ 82 (-52.6%)
Mutual labels:  orm, mvc
Gdb
Generic Data Binder (GDB) for jQuery is a framework agnostic and extremely easy to use 2 way data binder. GDB binds views and models in realtime with live two-way binding and no hefty framework necessary.
Stars: ✭ 90 (-47.98%)
Mutual labels:  model, template-engine
Audit.net
An extensible framework to audit executing operations in .NET and .NET Core.
Stars: ✭ 1,647 (+852.02%)
Mutual labels:  webapi, mvc

Diamond

DONATE OS LOC Dub version License

Diamond is a powerful full-stack web-framework written in the D Programming Language.

Diamond can be used to write powerful websites, webapis or as stand-alone as a template parser.

Website: https://diamondmvc.org/

Key-Features

Key features of Diamond

Goals

  • To provide a powerful consistent API
    • The API of Diamond should be rich of features, but still with powerful performance and the style should be consistent all over.
  • High performance without complexity
    • The performance of Diamond should be high without making the API complex to use.
  • Compile-time template parsing
    • Templates are parsed at compile-time and thus produce very little run-time overhead.
  • Easy-to-use and feature-rich template syntax
    • The syntax of templates should be feature-rich, with an easy-to-use syntax.
    • It should be easy to create advanced templates without complex looking code.
  • Secure & less error-prone API
    • The API of Diamond should provide security to battle error-prone code, enabling code to be written "bug-free".
  • Enterprise development
  • Diamond should be stable enough and have enough features to be used in enterprise and commercial work.
  • Always free & open-source
    • Diamond should always remain free and open-source, no matter the framework's size or popularity.
  • As little dependencies as possible
    • The less dependencies Diamond has, the better.
    • library dependencies for database drivers etc. are okay
  • Cross-platform
    • Should always be able to support all platforms that vibe.d/DMD supports.
  • Natural development feeling
    • Using Diamond should feel natural without annoyance, so you can focus more on developing your application, rather than setting up Diamond.

Dependencies

Package Version Description
vibe.d 0.8.3 Used as the backend for Diamond's web applications. From 3.0.0 vibe.d will be an optional dependency.
DMD/Phobos 2.072.2 - 2.077.0 The standard library of D and thus a required dependency.
Mysql-native 2.2.1 A native wrapper for Mysql. It's a dependency, because of the MySql ORM.
ddbc X.X.X A database wrapper in D to a lot of database systems. Diamond will be using it for PostgreSQL, Sqlite and MSSQL.

Example (2.X.X)

View

Layout:

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

View:

@[
  layout:
    layout
---
  route:
    home
---
  model:
    Home
---
  controller:
    HomeController
---
  placeholders:
    [
      "title": "Home"
    ]
]

<p>Hello @=model.name;!</p>

Controller

module controllers.homecontroller;

import diamond.controllers;

final class HomeController(TView) : Controller!TView
{
  this(TView view)
  {
    super(view);
  }
  
  /// / || /home
  @HttpDefault Status defaultAction()
  {
    view.model = new Home("World!");
    
    return Status.success;
  }
  
  /// /home/setname/{name}
  @HttpAction(HttpPost) Status setName()
  {
    auto name = this.getByIndex!string(0);
    view.model = new Home(name);
    
    return Status.success;
  }
}

Model

module models.home;

final class Home
{
  private:
  string _name;
  
  public:
  final:
  this(string name)
  {
    _name = name;
  }
  
  @property
  {
    string name() { return _name; }
  }
}

Example (3.X.X)

View

Layout:

@(doctype)
<html>
<head>
  <title>Website - @(title)</title>
</head>
<body>
  @(view)
</body>
</html>

View:

@[
  layout:
    layout
---
  route:
    home
---
  model:
    Home
---
  controller:
    HomeController
---
  placeholders:
    [
      "title": "Home"
    ]
]

<p>Hello @=model.name;!</p>

Controller (View)

module controllers.homecontroller;

import diamond.controllers;

final class HomeController(TView) : WebController!TView
{
  this(TView view)
  {
    super(view);
  }
  
  /// / || /home
  @HttpDefault Status defaultAction()
  {
    view.model = new Home("World!");
    
    return Status.success;
  }
  
  /// /home/setname/{name}
  @HttpAction(HttpPost) Status setName(string name)
  {
    view.model = new Home(name);
    
    return Status.success;
  }
}

Controller (Api)

module controllers.usercontroller;

import diamond.controllers;

final class UserController : ApiController
{
  this(HttpClient client)
  {
    super(client);
  }
  
  /// /user/update
  @HttpAction(HttpPost) Status update(UserModel user)
  {
    // Do stuff ...
    
    return Status.success;
  }
}

Model

module models.home;

final class Home
{
  private:
  string _name;
  
  public:
  final:
  this(string name)
  {
    _name = name;
  }
  
  @property
  {
    string name() { return _name; }
  }
}

...

module models.user;

final class User
{
  public:
  string name;
  int age;
}

FAQ

See: https://diamondmvc.org/faq

Are there any syntax guide-lines?

See: https://diamondmvc.org/docs/views/#syntax

Installing (Web)

See: https://diamondmvc.org/download

Installing (Standalone)

Not supported since 3.0.0

Contributing

See: https://diamondmvc.org/contribute

Version & Branch Support

Diamond only supports up to the 3 latest minor versions of itself, including pre-release versions.

If a version is not supported its working branch is deleted.

Anything below 2.10.0 is no longer supported, because earlier versions are not adviced to use unless necessary.

2.10.0+ is generally backward compatible, but 3.0.0 is not.

Currently supported versions: 2.10.0 - 3.0.0

No longer supported (Only available in release.): < 2.10.0

Note: 3.0.0 is not yet supported, but the master branch is 3.0.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].