ORM工具介绍 NHibernate, EntitySpaces, and LLBLGen Pro 功能分析
The three alternatives that I want to briefly discuss are NHibernate, EntitySpaces, and LLBLGen Pro.I am going to focus on the qualities of a good ORM tool,the criteria are as follows:
三种ORM工具是:NHibernate, EntitySpaces, and LLBLGen Pro。我以下列标准来分析这三种工具的性能。
Object-to-database mapping: This is the single most important aspect of an ORM tool. An ORM tool must have the ability to map business objects to back-end database tables by using some sort of metadata mapping.
对象与数据库的映射:这是ORM工具最重要的一个方面,一个ORM工具必须可以使用某些元数据映射工具将业务对象映射到后端数据库表。
Object caching: As the name indicates, this functionality enables object/data caching to improve performance in the persistence layer.
对象缓存:同名所示,这个功能将对象或数据缓存来提高持久层的性能。
GUI mapping: A good ORM should have a UI that enables you to visualize the mapping and creation of metadata.
图形映射工具:一个好的ORM最好能有一个图形化工具,可视化的映射和创建元数据。
Multiple database platform support: An ORM should offer portability from one RDBMS provider to another; this is one of the key advantages of using ORM.
多数据库服务器的支持:ORM应该可以与数据库管理系统无关,可以将对象映射到多种数据库服务器。这是使用ORM关键优势之一。
Dynamic querying: Another important aspect of ORM, and the bane of DBAs everywhere, is dynamic query support. This means that the ORM tool offers projections and classless querying, or dynamic SQL based on user input.
动态查询:ORM另一个重要的方面,让DBA困扰,就是动态查询支持。ORM提供基于用户的输入构造动态sql,提供各种查询和投射。
Lazy loading: The purpose of lazy loading is to optimize memory utilization of database servers by prioritizing components that need to be loaded into memory when a program is started.
延迟加载:它的目的是优化数据服务器的内存利用率,当程序启动后优先加载那些需要加入到内存的对象,不需要加载的推后加载。
Nonintrusive persistence: Nonintrusive persistence means that there is no need to extend or inherit from any function, class, interface, or anything else provider-specific.
非侵入式持久化:不需要从其他Function Class Interface或其他特定的Privider扩展或继承。
Reference:(Nonintrusive persistence means that there is no need to extend or inherit from any function, class, interface, or anything else provider-specific. LINQ to SQL supports this concept,because you can use a custom class that does not have any provider-specific technology,and still have it participate in the ORM process. It’s not as black-and-white with the Entity Framework because EF does not support nonintrusive persistence. EF does support the use of the IPOCO pattern, which you will explore later, but natively you are required to inheritfrom and extend EF-specific technology to use this ORMNonintrusive persistence means that there is no need to extend or inherit from any function,
class, interface, or anything else provider-specific. LINQ to SQL supports this concept,
because you can use a custom class that does not have any provider-specific technology,
and still have it participate in the ORM process. It’s not as black-and-white with the Entity
Framework because EF does not support nonintrusive persistence. EF does support the
use of the IPOCO pattern, which you will explore later, but natively you are required to inherit
from and extend EF-specific technology to use this ORM
Nonintrusive persistence means that there is no need to extend or inherit from any function,
class, interface, or anything else provider-specific. LINQ to SQL supports this concept,
because you can use a custom class that does not have any provider-specific technology,
and still have it participate in the ORM process. It’s not as black-and-white with the Entity
Framework because EF does not support nonintrusive persistence. EF does support the
use of the IPOCO pattern, which you will explore later, but natively you are required to inherit
from and extend EF-specific technology to use this ORM
Nonintrusive persistence means that there is no need to extend or inherit from any function,
class, interface, or anything else provider-specific. LINQ to SQL supports this concept,
because you can use a custom class that does not have any provider-specific technology,
and still have it participate in the ORM process. It’s not as black-and-white with the Entity
Framework because EF does not support nonintrusive persistence. EF does support the
use of the IPOCO pattern, which you will explore later, but natively you are required to inherit
from and extend EF-specific technology to use this ORM
Nonintrusive persistence means that there is no need to extend or inherit from any function,
class, interface, or anything else provider-specific. LINQ to SQL supports this concept,
because you can use a custom class that does not have any provider-specific technology,
and still have it participate in the ORM process. It’s not as black-and-white with the Entity
Framework because EF does not support nonintrusive persistence. EF does support the
use of the IPOCO pattern, which you will explore later, but natively you are required to inherit
from and extend EF-specific technology to use this ORM )
Code generation: The purists will insist that there is no place for code generation in ORM, because a well-thought-out object model should be coded by hand. In my opinion, a successful ORM will optionally support some form of code generation.
自动生成代码:纯粹主义者会坚持在ORM不应该有这项功能,因为好的对象模型应该手工来写代码。我的观点一个成功的ORM最好还是有自动生成代码功能。
Multiple object-oriented framework support: This is when a product offers compatibility with multiple object-oriented languages and development environments.
多面向对象框架支持:与多种面向对象语言和开发环境的兼容。
Stored procedure support: An ORM tool should support dynamic querying and stored procedures.
支持存储过程:ORM应该支持动态查询和存储过程。
三种ORM工具是:NHibernate, EntitySpaces, and LLBLGen Pro。我以下列标准来分析这三种工具的性能。
Object-to-database mapping: This is the single most important aspect of an ORM tool. An ORM tool must have the ability to map business objects to back-end database tables by using some sort of metadata mapping.
对象与数据库的映射:这是ORM工具最重要的一个方面,一个ORM工具必须可以使用某些元数据映射工具将业务对象映射到后端数据库表。
Object caching: As the name indicates, this functionality enables object/data caching to improve performance in the persistence layer.
对象缓存:同名所示,这个功能将对象或数据缓存来提高持久层的性能。
GUI mapping: A good ORM should have a UI that enables you to visualize the mapping and creation of metadata.
图形映射工具:一个好的ORM最好能有一个图形化工具,可视化的映射和创建元数据。
Multiple database platform support: An ORM should offer portability from one RDBMS provider to another; this is one of the key advantages of using ORM.
多数据库服务器的支持:ORM应该可以与数据库管理系统无关,可以将对象映射到多种数据库服务器。这是使用ORM关键优势之一。
Dynamic querying: Another important aspect of ORM, and the bane of DBAs everywhere, is dynamic query support. This means that the ORM tool offers projections and classless querying, or dynamic SQL based on user input.
动态查询:ORM另一个重要的方面,让DBA困扰,就是动态查询支持。ORM提供基于用户的输入构造动态sql,提供各种查询和投射。
Lazy loading: The purpose of lazy loading is to optimize memory utilization of database servers by prioritizing components that need to be loaded into memory when a program is started.
延迟加载:它的目的是优化数据服务器的内存利用率,当程序启动后优先加载那些需要加入到内存的对象,不需要加载的推后加载。
Nonintrusive persistence: Nonintrusive persistence means that there is no need to extend or inherit from any function, class, interface, or anything else provider-specific.
非侵入式持久化:不需要从其他Function Class Interface或其他特定的Privider扩展或继承。
Reference:(Nonintrusive persistence means that there is no need to extend or inherit from any function, class, interface, or anything else provider-specific. LINQ to SQL supports this concept,because you can use a custom class that does not have any provider-specific technology,and still have it participate in the ORM process. It’s not as black-and-white with the Entity Framework because EF does not support nonintrusive persistence. EF does support the use of the IPOCO pattern, which you will explore later, but natively you are required to inheritfrom and extend EF-specific technology to use this ORM
Code generation: The purists will insist that there is no place for code generation in ORM, because a well-thought-out object model should be coded by hand. In my opinion, a successful ORM will optionally support some form of code generation.
自动生成代码:纯粹主义者会坚持在ORM不应该有这项功能,因为好的对象模型应该手工来写代码。我的观点一个成功的ORM最好还是有自动生成代码功能。
Multiple object-oriented framework support: This is when a product offers compatibility with multiple object-oriented languages and development environments.
多面向对象框架支持:与多种面向对象语言和开发环境的兼容。
Stored procedure support: An ORM tool should support dynamic querying and stored procedures.
支持存储过程:ORM应该支持动态查询和存储过程。
posted on 2009-08-31 23:07 Utopia Coming 阅读(963) 评论(0) 编辑 收藏 举报