面向模型的编程语言 Mo+

GPLv3
C# 查看源码»
Windows
2017-01-30
红薯

Mo+ 是首个完全支持面向模型开发的编程语言和集成开发环境。Model Oriented Development (MOD) 可以让你通过简单、模型聚焦的方法进行开发。你可以将模型信息转换成源码。

MoPlusUI.png

MoPlusWorkflow.png

模型示例:

<Solution>
    <SolutionName>MyOrders</SolutionName>
    <TemplatePath>
        C:\MyCodeTemplates\EntityAndPropertyReport.mpt
    </TemplatePath>
    <FeatureList>
        <Feature>
            <FeatureName>Orders</FeatureName>
            <EntityList>
                <Entity>
                    <EntityName>Customer</EntityName>
                    <PropertyList>
                        <Property>
                            <PropertyName>CustomerID</PropertyName>
                        </Property>
                        <Property>
                            <PropertyName>CustomerName</PropertyName>
                        </Property>
                    </PropertyList>
                </Entity>
                <Entity>
                    <EntityName>Order</EntityName>
                    <PropertyList>
                        <Property>
                            <PropertyName>OrderID</PropertyName>
                        </Property>
                        <Property>
                            <PropertyName>OrderName</PropertyName>
                        </Property>
                        <Property>
                            <PropertyName>CustomerID</PropertyName>
                        </Property>
                    </PropertyList>
                </Entity>
            </EntityList>
        </Feature>
    </FeatureList>
</Solution>

代码模板

<CONFIG>
    NAME EntityAndPropertyReport
    CATEGORY Test
    NODE Solution
    TOPLEVEL True
</CONFIG>
<CONTENT>
<%%-List of entities and their properties:%%>
<%%:
foreach (Entity)
{
    <%%-
    Entity: %%><%%=EntityName%%>
    foreach (Property)
    {
        <%%-
        Property: %%><%%=PropertyName%%>
    }
}
%%>
加载中

评论(0)

暂无评论

暂无资讯

暂无问答

暂无博客

返回顶部
顶部