Mo+面向模型的編程語言
Mo+ 是首個(gè)完全支持面向模型開發(fā)的編程語言和集成開發(fā)環(huán)境。Model Oriented Development (MOD) 可以讓你通過簡單、模型聚焦的方法進(jìn)行開發(fā)。你可以將模型信息轉(zhuǎn)換成源碼。
模型示例:
<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%%>
}
}
%%>評(píng)論
圖片
表情
