Spring VS. HiveMind 优点缺点大比拼|中国IT实验室
来源:百度文库 编辑:神马文学网 时间:2024/06/12 03:24:25
Spring VS. HiveMind 优点缺点大比拼
ChinaITLab收集整理2005-8-13保存本文推荐给好友收藏本站
在如下方面HiveMind优于Spring:
* HiveMind强制针对接口编程;
* HiveMind使用module概念来分组管理service,利于并行和迭代开发;
* HiveMind使用的配置文件格式更清楚简明,特别是将接口和实现统一定义成1个service,而Spring可能要定义好几个bean元素;
* 在增加或移去interceptor时,HiveMind只要修改1行配置文件,而Spring至少要修改两个bean元素;
* 在定义interceptor时,HiveMind采用javassist类库,性能优于Spring采用的JDK proxy。
在如下方面Spring优于HiveMind:
* Spring的AOP框架较为成熟,编写interceptor的难度较低。
* Spring内建和Hibernate的集成,HiveMind尚未内建该集成。
* Spring的transaction management支持各种transaction API,如JDBC、JDO、JTA等等。
基于以上发现,建议在下一项目中采用HiveMind。因为已经自行开发了HiveMind和Hibernate的集成以及简单的transaction management代码,因而在下一项目中并不特别需要Spring的相应功能。不过,当前HiveMind是1.0-rc2版,一旦发布1.0-release版则应尽快升级。
[Spring VS. HiveMind]:
* Service Oriented?
Spring : Yes.
HiveMind : Yes.
* How to define a Service?
Spring :
Define a POJO. (在Spring术语中称之为bean,但实际上是POJO。)
配置文件:
HiveMind:
Define an interface and core implementation POJO.
配置文件:service-point元素。
Comments:
HiveMind强制针对接口编程,优于Spring。
* 是否提供service的namespace?
Spring:
仅仅使用id属性来唯一识别service。
支持多配置文件。
HiveMind:
提供Module概念用于管理service namespace,类似于java中的package。
支持多个配置文件。
Comments:
HiveMind略优。
* Service Lifecycle?
Spring:
2 Lifecycle models: Singleton, Prototype.
HiveMind:
4 Lifecycle models: Primitive, Singleton, Threaded, Pooled.
Comments:
最常用的就是Singleton模型。虽然HiveMind模型多于Spring,但不构成优势。
* Who manages service?
Spring: BeanFactory or ApplicationContext.
HiveMind: Registry.
* Dependency Injection?
Spring: yes. type-2 and type-3 supported.
HiveMind: yes. type-2 and type-3 supported.
* Service Depenency Injection?
Spring:
使用ref元素。
HiveMind:
在配置文件中使用set-service元素。
Comments:
在更换实现时,HiveMind因强制针对接口编程而占有优势。
* Intializing and finalizing methods?
Spring :
init-method="init()"
destroy-method="cleanup()"/>
/>
HiveMind:
不支持finalizing method。
Comments:
Spring略优。
* How to configure AOP?
Spring:
Tony
51
Custom string property value
class="org.springframework.aop.framework.ProxyFactoryBean"
>
com.mycompany.Person
property>
HiveMind:
Comments:
Spring将接口和核心实现分开定义成两个bean,HiveMind则统一定义成一个service。
这点上HiveMind优于Spring。
Spring的AOP框架较为成熟。HiveMin的Interpreter factory仍需要降低编写难度。
HiveMind采用javassist,性能上优于Spring采用JDK proxy。
* How to configure declarative transaction management?
Spring: 采用AOP。
class="org.springframework.transaction.interceptor.TransactionProxyFac
toryBean">
property>
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED,readOnly
HiveMind: 没有内建支持。我自行开发了一个TransactionInterceptor
Comments:
在Spring中如果需要混合使用TransactionInterceptor和其他Interceptor,需要定义多个bean。增大了维护成本。
Spring支持JTA等各种Transaction manager。
HiveMind配置文件更加清楚简明。但不没有提供JTA集成很致命。
_xyz
ChinaITLab收集整理2005-8-13保存本文推荐给好友收藏本站
在如下方面HiveMind优于Spring:
* HiveMind强制针对接口编程;
* HiveMind使用module概念来分组管理service,利于并行和迭代开发;
* HiveMind使用的配置文件格式更清楚简明,特别是将接口和实现统一定义成1个service,而Spring可能要定义好几个bean元素;
* 在增加或移去interceptor时,HiveMind只要修改1行配置文件,而Spring至少要修改两个bean元素;
* 在定义interceptor时,HiveMind采用javassist类库,性能优于Spring采用的JDK proxy。
在如下方面Spring优于HiveMind:
* Spring的AOP框架较为成熟,编写interceptor的难度较低。
* Spring内建和Hibernate的集成,HiveMind尚未内建该集成。
* Spring的transaction management支持各种transaction API,如JDBC、JDO、JTA等等。
基于以上发现,建议在下一项目中采用HiveMind。因为已经自行开发了HiveMind和Hibernate的集成以及简单的transaction management代码,因而在下一项目中并不特别需要Spring的相应功能。不过,当前HiveMind是1.0-rc2版,一旦发布1.0-release版则应尽快升级。
[Spring VS. HiveMind]:
* Service Oriented?
Spring : Yes.
HiveMind : Yes.
* How to define a Service?
Spring :
Define a POJO. (在Spring术语中称之为bean,但实际上是POJO。)
配置文件:
HiveMind:
Define an interface and core implementation POJO.
配置文件:service-point元素。
Comments:
HiveMind强制针对接口编程,优于Spring。
* 是否提供service的namespace?
Spring:
仅仅使用id属性来唯一识别service。
支持多配置文件。
HiveMind:
提供Module概念用于管理service namespace,类似于java中的package。
支持多个配置文件。
Comments:
HiveMind略优。
* Service Lifecycle?
Spring:
2 Lifecycle models: Singleton, Prototype.
HiveMind:
4 Lifecycle models: Primitive, Singleton, Threaded, Pooled.
Comments:
最常用的就是Singleton模型。虽然HiveMind模型多于Spring,但不构成优势。
* Who manages service?
Spring: BeanFactory or ApplicationContext.
HiveMind: Registry.
* Dependency Injection?
Spring: yes. type-2 and type-3 supported.
HiveMind: yes. type-2 and type-3 supported.
* Service Depenency Injection?
Spring:
使用ref元素。
HiveMind:
在配置文件中使用set-service元素。
Comments:
在更换实现时,HiveMind因强制针对接口编程而占有优势。
* Intializing and finalizing methods?
Spring :
destroy-method="cleanup()"/>
/>
HiveMind:
不支持finalizing method。
Comments:
Spring略优。
* How to configure AOP?
Spring:
>
property>
HiveMind:
Comments:
Spring将接口和核心实现分开定义成两个bean,HiveMind则统一定义成一个service。
这点上HiveMind优于Spring。
Spring的AOP框架较为成熟。HiveMin的Interpreter factory仍需要降低编写难度。
HiveMind采用javassist,性能上优于Spring采用JDK proxy。
* How to configure declarative transaction management?
Spring: 采用AOP。
toryBean">
property>
HiveMind: 没有内建支持。我自行开发了一个TransactionInterceptor
Comments:
在Spring中如果需要混合使用TransactionInterceptor和其他Interceptor,需要定义多个bean。增大了维护成本。
Spring支持JTA等各种Transaction manager。
HiveMind配置文件更加清楚简明。但不没有提供JTA集成很致命。
_xyz
Spring VS. HiveMind 优点缺点大比拼|中国IT实验室
Java编程语言如何完善自己的缺点-Java频道-中国IT实验室
Session详解|中国IT实验室
杨天石谈蒋介石:他有两大优点五大缺点
当优点变成缺点
木蜡油优点缺点
Oracle9i学习笔记|中国IT认证实验室
RouterOS2.96脚本详解|中国IT实验室
IPv6安全威胁|中国IT实验室
【楠蓉书香】ADSL防御黑客攻击的十大方法|中国IT实验室
网络吞吐量大 网速缓慢,是什么引起的?-Cisco频道-中国IT实验室
网络吞吐量大 网速缓慢,是什么引起的?-Cisco频道-中国IT实验室3
问卷调查法的优点缺点
windows 7 优点和缺点
缺点与优点的界线
缺点与优点的界线.
【转帖】别老说中国的缺点,也来说说中国的优点吧
西方人眼中的中国和中国人:有多少优点就有多少缺点!
西方人眼中的中国和中国人:有多少优点就有多少缺点
西方人眼中的中国和中国人:有多少优点就有多少缺点。
浅谈:E-ink(电子墨水)的优点与缺点-中国中部印刷网
超女五强VS花样美少女 花样魅力大比拼(组图)
超女五强VS花样美少女 花样魅力大比拼(组图)
清纯发型大比拼:尹恩惠VS宋慧乔