IoC/AOP实践之CastleProject编译
2010-04-17 12:19
459 查看
Castle project是非常优秀的开源项目,我们耳熟能详的至少有ActiveRecord和MonoRail(可惜MS 的MVC出来以后没什么市场了).
项目主页: http://www.castleproject.org/
为了降低项目开发中的代码耦合性,暂时使用Castle project中的Windsor和AspectSharp来实现IoC/AOP。
IoC介绍: http://zh.wikipedia.org/zh-cn/%E6%8E%A7%E5%88%B6%E5%8F%8D%E8%BD%AC
AOP介绍:http://zh.wikipedia.org/zh-cn/AOP
下载源代码:http://sourceforge.net/projects/castle/
编译CastleProject需要解决比较多的项目依赖性问题:
NANT构建环境:http://nant.sourceforge.net/
Antlr语言解析器:http://www.antlr.org/
Log4Net和NLog:http://logging.apache.org/log4net/index.html
NUnit:单元测试:http://www.nunit.org/
最重要的是需要.NET framework 2.0 SDK
1.将下载的Castle Project源代码解压,把需要的nunit.framework/antlr/log4net/等拷贝到ShareLib/net下。设置环境变量,Path中增加NANT的bin目录。
2.根据需要,对build文件进行适当的修改,将default.build中的fileset修改为:
既:不构建Components/ActiveRecord/MonoRail
3.Cmd模式下:
构建Debug版本:
nant -D:common.testrunner.enabled=false
构建Release版本:
nant -D:common.testrunner.enabled=false -buildfile:release.build package-net-2.0
至此构建成功,下一篇文章将讲述如何配置Windsor+AspectSharp
项目主页: http://www.castleproject.org/
为了降低项目开发中的代码耦合性,暂时使用Castle project中的Windsor和AspectSharp来实现IoC/AOP。
IoC介绍: http://zh.wikipedia.org/zh-cn/%E6%8E%A7%E5%88%B6%E5%8F%8D%E8%BD%AC
AOP介绍:http://zh.wikipedia.org/zh-cn/AOP
下载源代码:http://sourceforge.net/projects/castle/
编译CastleProject需要解决比较多的项目依赖性问题:
NANT构建环境:http://nant.sourceforge.net/
Antlr语言解析器:http://www.antlr.org/
Log4Net和NLog:http://logging.apache.org/log4net/index.html
NUnit:单元测试:http://www.nunit.org/
最重要的是需要.NET framework 2.0 SDK
1.将下载的Castle Project源代码解压,把需要的nunit.framework/antlr/log4net/等拷贝到ShareLib/net下。设置环境变量,Path中增加NANT的bin目录。
2.根据需要,对build文件进行适当的修改,将default.build中的fileset修改为:
<fileset id="buildfiles.all"> <!-- Files have to be in dependency order --> <include name="Core/core.build" /> <!-- <include name="Services/services.build" /> --> <include name="Tools/Tools.build" /> <include name="InversionOfControl/InversionOfControl.build" /> <!-- <include name="Components/components.build" -->/> <!-- <include name="ActiveRecord/activerecord.build" /> <include name="MonoRail/monorail.build" /> --> <include name="AspectSharp/aspectsharp.build" /> <include name="Facilities/facilities.build" /> </fileset>
既:不构建Components/ActiveRecord/MonoRail
3.Cmd模式下:
构建Debug版本:
nant -D:common.testrunner.enabled=false
构建Release版本:
nant -D:common.testrunner.enabled=false -buildfile:release.build package-net-2.0
至此构建成功,下一篇文章将讲述如何配置Windsor+AspectSharp
相关文章推荐
- 关于AOP和IOC的资料(Castle & Spring)
- Castle IOC容器实践之EnterpriseLibrary Configuration Facility
- SOA实践 -- 使用IoC和AOP重构SOA应用
- Castle IOC容器实践之Startable Facility(二)
- Castle.Windsor IOC/AOP的使用
- Castle IOC容器实践之Startable Facility(二)
- Castle IOC容器实践之TypedFactory Facility(二)
- Castle框架中的IOC和AOP机制
- Castle IOC容器实践之TypedFactory Facility(一)
- Castle IOC容器实践之TypedFactory Facility(二)
- Castle IOC容器实践之Startable Facility(一)
- Castle IOC容器实践之TypedFactory Facility(一)
- Castle IOC容器实践之Startable Facility(二)
- Castle IOC容器实践之Startable Facility(一)
- spring.net、castle windsor、unity实现aop、ioc的方式和简单区别
- Castle IOC容器实践之TypedFactory Facility(二)
- IOC DI AOP Interception
- BouncyCastle JCE实践(六)
- IoC和AOP的理解
- -Dmaven.multiModuleProjectDirectory system propery is not set.【eclipse使用maven3.3插件进行编译的时候报错,按照里面的修改】