Home

Awesome

Forming

Forming, is a lightweight architecture as code language. 轻量级架构即代码语言

Architecture 3.0 based frameworks.

Usage

// todo

Samples

  1. concept declare with struct & behavior
concept Blog(Displayable, Ownable) {
    struct {
        title, slug, description, gen_description, content, featured_image: String;
        id, user_id, site_id: Integer;
        created, updated: datetime;
    }
    behavior {
        get_absolute_url(): String;
        validate_unique();
        publish_date_since(): datetime;
        published(): Integer;
        save(blog: Blog);
        delete(id: Integer);
    }
}
  1. api declare
api for BlogPost {
    in { title: String, description: String }
    out { blog: Blog }
    pre_cond {
       '字符串不为空': not empty
    }
    pre_cond {
       '博客不为空': 'not empty'
    }
} 
  1. concept space
space Blog {
   package: 'com.phodal.blog', // or path
   type: 'Entity',
   items: { Blog, BlogCategory, BlogCategories, BlogRelatedPosts, Comments }
}
  1. from CSV, uml and swagger (todo)
concepts => file(\"concepts.csv\")

concept  Blog {
    behavior { }
    struct uml::dir('').class('Blog')
}

Todo

TBD:

Documents

Refs

License

@ 2021 This code is distributed under the MIT license. See LICENSE in this directory.