Information System Development Platform openexpressapp-application model ApplicationModel

Source: Internet
Author: User
ArticleDirectory
    • The application model runs through the entire architecture layer.
    • Model follow what
    • ApplicationModel
    • Command Model

The system architecture of openexpressapp.Application ModelIt is used as a metadata throughout the entire architecture, and the application model runs on the openexpressapp framework. The application model is the core of OEA. Only by understanding the application model can OEA be better used.

The application model runs through the entire architecture layer.

OEA wants to get rid of repeated technical work, abstract some common functions, organize and summarize some common models based on a large number of practices. Under the model-based description,We are more concerned with what, not how. Openexpressapp platform modeling tool Plan supports Enterprise Architecture Modeling (EA), interface modeling (UI), command extension (command), Domain Modeling (domain), Rule modeling (rule) report and workflow ).Currently, OEA's application models mainly include the UI model and command model.

Models can be defined in multiple ways, suchCode, Attribute identifier and ModelingCurrently, OEA supports class attribute identifiers to generate application models. This is generally used in simple applications.In the software, we plan to add modeling tools, so we do not need to identify the UI model in the class library.

ApplicationModel

Since we use models for development, there must be a place to store models. In OEA, both the UI model and command model are placed in the ApplicationModel static class.

Code
    /// ApplicationProgramModel
    Public   Static   Class ApplicationModel
{
/// All command objects in the Application
Public   Static   Readonly Commandcollection commands =   New Commandcollection ();
/// Default set of all business object models Public   Static   Readonly Observablecollection < Businessobjectinfo > Defaultbusinessobjectinfos =   New Observablecollection < Businessobjectinfo > ();
  /// Search for the metadata of the Business Object Model corresponding to the specified type , If not found, a new one is generated and stored.
Public   Static Businessobjectinfo addbusinessobject (type botype)
{
Businessobjectinfo info =   Null ;
Businessobjectinfodict. trygetvalue (botype, Out Info );
If (Info =   Null )
{
Info =   New Businessobjectinfo (botype );
Businessobjectinfodict. Add (botype, Info );
If (Info. isdefaultobject)
{
Defaultbusinessobjectinfos. Add (Info );
}
}
Return Info;
}
Public   Static Businessobjectinfo getbusinessobjectinfo (type botype)
{
Businessobjectinfo info =   Null ;
Businessobjectinfodict. trygetvalue (botype, Out Info );
If ( Null   = Info)
{
Info = Addbusinessobject (botype );
}
Return Info;
}
}

There are three important classes in the application model:

    1. Businessobjectinfo: Business Object Information, called through ApplicationModel. addbusinessobject
    2. Businessobjectpropertyinfo: Property Information, generated in the businessobjectinfo Constructor
    3. Businessobjectspropertyinfo: Sub-Object Property Information, generated in the businessobjectinfo Constructor
Code
Public  Businessobjectinfo(TypeBotype)
{
...
Foreach (Propertyinfo item In Botype. getproperties ())
{
If (Item. hasmarked < Entitypropertyattribute > ())
{
Bopropertyinfos. Add ( New Businessobjectpropertyinfo (item, This ));
}
If (Item. hasmarked < Associationattribute > ())
{
Associationattribute ATTR = Item. getsingleattribute < Associationattribute > ();
Bospropertyinfos. Add ( New Businessobjectspropertyinfo (item, ATTR, This ));
If (ATTR. showintree)
{
Treechildpropertyinfo = Item;
}
}
}
} Ui Model

Openexpressapp-Built-in support for Attribute editing

Openexpressapp-Built-in list editing

Openexpressapp, information system development platform-understanding the core element objectview

Information System Development Platform openexpressapp-autoui Automatic Generation Interface

Command Model

Openexpressapp-command Extension Mechanism of Information System Development Platform

More information:Openexpressappframework for open source information system development platform

 

Welcome to reprint, reprint Please note: Reprinted from Zhou jingen [http://zhoujg.cnblogs.com/]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.