LiteMda - my thinking in mda and aop - framework diagram draft
2005-07-11 13:51
555 查看
![](http://images.cnblogs.com/cnblogs_com/teddyma/LiteMdaFramework.png)
关于该方案的基本设计思路是这样的:
首先,代码生成的基础还是数据库表,但是,提供一个从XMI生成Tables的工具,以支持从UML类图到对应Tables的自动生成,并支持以自定义类型作为其他类的属性的数据类型;
接着,基于这些Tables,可以生成映射到DomainObjects及为其增加持久化支持的Xml Profile,Xml Profile For Domain Objects基本和其他的o/r映射的xml文件类似,Xml Profile For Persistation则是独立出来的提供关于各个DomainObject的CRUD及其它复杂的自定义的与对应数据库表存取相关的操作,附加操作需要关联到给定sql语句或者存储过程;
然后,基于上面生成并根据需要修改的Xml Profiles,由框架辅助工具生成相应的DomainObjects和Persisters的接口和默认实现,这里生成接口(各个层面的代码都先生成接口)的目的一是使参数和返回数据采用接口而与具体的代码实现分离,二为了支持各个层面的AOP,目前来讲,个人觉得在业务层织入就够了,原则上不应该修改生成的源码,如果需要织入,撰写需要的织入代码并修改Profile就可以了;
在上一步生成并扩充的Xml Profile For Persistation的基础上,自动生成默认的Xml Profile For Business/AOP/Transaction,默认生成的代码只指定由数据库外键指定的级联删除事务,可由用户扩充事务及AOP支持的配置信息;
最后就可以由框架提供的Business Manager来解析并执行具体的业务调用了,对于,特殊业务代码,可以采用AOP的方式,织入或代替默认生成的代码中的部分函数或类,所有UI层的业务代码调用原则上只需访问调用Business Manager的统一接口就可以了。
相关文章推荐
- LiteMda - my thinking in mda and aop - framework diagram draft
- Binding Entities and Their Children to Java JSP Form Elements in Spring Framework MVC
- the thinking use of DOM in my project
- Add, Update and Delete Objects in Entity Framework 4.0
- 使用maven打包jar后 执行jar包问题,Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefi
- Chicago Boss: a server framework inspired by Rails and written in Erlang
- Developers’ Must-have: the new Microsoft All-In-One Code Framework Sample Browser and 3500+ samples
- A web-scraping framework written in Javascript, using PhantomJS and jQuery pjscrape
- thinking in Ruby and Rails: rails的params参数原来是个方法
- Use a Spring InitBinder to Resolve Type Mismatch and Bind Exceptions in POST from Spring Framework M
- .NET(C#) Internals: as a developer, .net framework in my eyes
- Referenced file contains errors (http://www.springframework.org/schema/aop/spring-aop-3.0.xsd). For more information, right click on the message in th
- Install And Use Laravel Framework In Fedora25
- Insider Computer Fraud: An In-depth Framework for Detecting and Defending against Insider IT Attacks
- Thinking in ReactJS and Flux
- What is Managed Code and Unmanaged Code in .Net Framework
- In .NET framework remoting and webservice two technologies understanding and practical application
- .NET错误The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework
- How to hide my site and my document link in the right-top corner of sharepoint 2010
- My honor is my life, both grow in one; take honor from me, and my life is done.