LiteMDA Design Version 0.2
2005-08-05 21:00
169 查看
LiteMDA Design Version 0.2
---- A top to bottom MDA/ORM designObjective:
High development efficiencyExcellent extensibility
Thinking in OO/AOP/C# 2.0
Be easy to use
1. User Interface (UI) Viewpoint
Business Objects (BO) can only be constructed by Business Object Factory (BOF) through Business Object Interfaces (BOI).The forms of the UI are not restricted. They can no matter be web pages, windows forms or any other modern ways like web services and so on.
All the details below UI layer are completely transparent to UI layer programmers. Things that can be seen at UI layer are only the transparent BOI instances constructed by BOF or other BOI instances, and the Domain Objects (DO) as BOI instances’ parameters and return values.
2. Business Logic Layer (BLL) Viewpoint
By now, although the word - “MDA” here means Model Driven Architecture as its traditional meaning, what be directly used or benefited from the model are still only the static DOs needed to be persisted and the associations of DOs, such as inheritance, aggregation, composition and so on, which means only the static attributes’ definition of the DO model benefit our framework, all the methods of DOs or the other information that can be provided by the model are being ignored. So the format of the DO Model can be any model format that can be used to describe static class objects with attributes and class objects’ associations. For example, E/R Model, UML Model is the two most common suitable model formats. To decouple our framework’s dependency to the model format, we defines an Intermediate Model Schema as the base DO Model format, which means all the models in other format should be converted to the intermediate model format first.The tools provided by our framework can help you generate the basic Domain Object Interfaces (DOI) and DOIs’ default implementing source codes automatically. You must include these auto-generated codes in your projects based on our framework, and generally, you should not modify them manually. Do not modify the auto-generated codes seems not easy before, but since C# 2.0, there is a new useful keyword – “partial” that make it possible for you to write codes for even a single class into several .cs source files, so we can keep the auto-generated codes not be modified and write our custom codes for the same class in separated source file. This is one of the reasons why I say this framework is thinking in C# 2.0. In this way, even the model is changed and we have to regenerate the some source codes, but it elegant that the custom codes written in separated source files will not be impacted by this kind of situations.
The BLL is the most important and most of the work that programmers should do in your project based on LiteMDA is in BLL. In this layer, programmers operate Domain Objects to complete business logics and expose interfaces that permitted to be use in the UI layer to BOF. Only exposed interfaces can be referenced by BOF, and then BOF can construct BOI instances for UI layer. The mapping from the BOIs to their implementing can be profiled in specified xml configuration files. In these files, in addition, you can not only add static injection options for BOI but also add dynamic waving options for BOs, too. This is the so called thinking in AOP.
For transaction, in LiteMDA design Ver 1.0, I design to make all the transactions in BLL setting in Xml, but it seems not easy to implement so in this design ver 0.2, I will not use such a transaction configuration file any more. Instead, all the transactions will be directly write in the custom Bos. As in traditional way, I will provide a Transaction Factory to construct all the transactions. And each BO and DO has a transaction attribute, if this attribute is set to a transaction instance, then operations will be in the specified transaction.
3. Persistence Layer (PL) Viewpoint
PL is a transparent layer. It provides transparent O/R Mapping from DO Model and DOs’ associations, such as inheritence, aggregation, composition and so on, to Relation Database (RDB) if your system use RDB, or it also can help DOs’ persisting to Object Oriented Database (OODB). PL provides two methods, “Save” and “Load”, for each DO. “Save” does writing and “Load” does reading. PL also provides generic base collection help classes for collection-kind DOs’ persistence. This function will be realized elegant through the new gneric support of C# 2.0. Although I plan to implement a ORM component for LiteMDA, I will also write some persistence adapter for third party persistence framework such as Nhibernate and NIbatis.Say something about “Save” and “Load”. In an article of idior, he critisize the “Save” and “Load” design in EJB, but I don’t agree with him, I think, “Save” and “Load” is a good design, they are the basic elements of Object Oriented Perstsence Design. And I will prove this in the LiteMDA implementing.
相关文章推荐
- LiteMDA Design Version 0.2
- 未能加载文件或程序集“System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”
- 在Android2.3.3即minSdkVersion 10上使用android.support.v4.widget.SwipeRefreshLayout和android.support.design
- ShadowStar Fast Editor Version: 0.2 查找选中文本
- UML Model/Relation Db Table Mapping Design For LiteMda - Draft
- Enterprise Application Achitecture Design Based on LiteMDA 0.5
- Teddy's Aspect Weaver Version 0.2 with Additional Custom Attribute Way Configuration
- 类型Universe无法解析程序集:System.Design,Version=4.0.0.0,Culture=neutral,PublickeyToken=......
- Could not load file or assembly "Microsoft.DataTransformationServices.Design,Version=12.0.0.0,Culture=neutral,PublicKeyToken=89845dcd8080cc91" or one of its dependencies.
- 使用POI分割纯文本Excel文件 Version0.2 支持XLSX\XLS
- Java6学习笔记57——多线程编程——线程的互斥(version 0.2)
- Enterprise Application Achitecture Design Based on LiteMDA 0.5
- Java6学习笔记59——多线程编程——线程的同步(version 0.2)
- 未能加载文件或程序集“System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”
- 分治法求点集中的最小距离 version 0.2
- 类型Universe 无法解析程序集 System.Design,Version=2.0.0.0
- 类型Universe 无法解析程序集 System.Design,Version=2.0.0.0
- [转载]Snake.Net 框架中的ORM(五) (Version 0.2 Beta)
- 类型Universe无法解析程序 集:System.Design,Version=2.0.0.0,Culture=neutral,PublickeyToken=b03f5f7f11d50a3a,
- 类型Universe无法解析程序 集:System.Design,Version=2.0.0.0