Mediar. Framework, a MVC Architecture

Source: Internet
Author: User

Several yearsProgramGradually accumulated some experience. When I see more and more architectures on the internet, I always want to write something. Finally, I am idle, combined with the projects I have done, and then learned from the Internet.So a naive architecture was created -Mediar. framework.. I believe it is really different, and I hope it will give you some inspiration.

MEdiar. FrameworkIsWinThe program architecture covers all layers from the underlying layer to the interface during development. It provides you with considerate care and evenCodeGenerate a tool for you70-95%Code, it can be said that it allows you to develop such as adding wings, allowing you to free up from the Code, to care about the real business. Some may ask how the performance is? Honestly, the performance is really not good, but it should be a piece of cake for clients with powerful resources.

The following describes the architecture in detail and sends a picture to see the structure:

 

The lowest layer is Data Access , Use MS Enterprise Library API Mainstream databases should support this feature. Model Yes Bizobject At the same time, the main business logic is also put in it. The interface is controlled by it, that is MVC Li Model. In UI Lihe UI . Factory Mainly create entities, collections, etc. And Factory Access the database in Model During initial activation, Factory Injected Model Medium , Each Model All have corresponding Factory . For services such as data dictionary, use Objectdataholder, And become Model Of course Objectdataholder To include another Model. objectcollectiondataholder Is used to process one-to-multiple relationships, in Model Contains a set of other entities . UI In comparison, it is a dumb, just do some binding and display settings. Because some business logic is still available Coreui Medium, Coreui There are some other daily interfaces, UI To Coreui . Customcontrol Is Packaged Grid View And Combo, Because some services need to be processed, you can also add some other controls. The next step is to prepare a verification number, Email Wait. Textbox .

 The entire process is like this, whenUIDuring initial activation,UIPage bindingModel, And finally callCoreui.CoreuiProcessingUIElement, andModel,ModelWill callFactory, factoryCallDataaccess, dataaccessObtain the data and return it.DataaccessSlaveMarshalbyrefobject From inheritance to remote deployment, you can deploy it on the server.

 The architecture has a small requirement on the table. All Tables must have these fields.

Uniqueid

Guid

Master Creation

Lastupdatedbyuser

String

 

Lastupdateddatetime

Datetime

 

Recordversion

Timestamp

 

 

It is not easy to write. Check the code. There is a download packageMDFFile, yesSQLFile, which can be appended to yourSQL.DAOGen-Meidar.csgenIs to generate a code template, but you need to installMygeneration

Related:
Mediar. Framework-An MVC Architecture
Mediar. Framework -- Object Mapping
Mediar. Framework -- use reflection to declare the remoting wellknown Service
Mediar. Framework -- business Implementation 1 (ui binding)

 

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.