何时使用Hibernate (Gavin King的回答)
2005-02-23 22:24
183 查看
You should use Hibernate if you have a nontrivial application (definition of nontrivial varies, but I usually think of Hibernate being less applicable to applications with only ten tables or so) that use an object-oriented domain model. Not every application needs a domain model, so not every application needs ORM. But if your application does a lot of business logic - rather than just displaying tabular data on a webpage - then a domain model is usually a good thing.
Hibernate really starts to shine in applications with very complex data models, with hundreds of tables and complex interrelationships. For this kind of application, Hibernate will take away a huge amount of coding effort (perhaps up to 25%, for some applications) and will result in an application that performs better than the alternative handcrafted JDBC. This is possible because some kinds of performance optimizations are very difficult to handcode: caching, outer-join fetching, transactional write-behind, etc.
Hibernate really starts to shine in applications with very complex data models, with hundreds of tables and complex interrelationships. For this kind of application, Hibernate will take away a huge amount of coding effort (perhaps up to 25%, for some applications) and will result in an application that performs better than the alternative handcrafted JDBC. This is possible because some kinds of performance optimizations are very difficult to handcode: caching, outer-join fetching, transactional write-behind, etc.
相关文章推荐
- 看stackoverflow大牛如何回答何时在ASP.NET中使用异步控制器?
- Hibernate缓存何时使用和如何使用
- Hibernate缓存何时使用和如何使用
- Hibernate缓存何时使用和如何使用
- 看stackoverflow大牛如何回答何时在ASP.NET中使用异步控制器?
- Hibernate缓存何时使用和如何使用?
- Hibernate缓存何时使用和如何使用
- 决定何时使用 DataGrid、DataList 或 Repeater
- 在Spring、Hibernate中使用Ehcache缓存
- Hibernate中一级缓存和二级缓存使用详解
- springboot中使用注解获取hibernate的session
- (转)【Hibernate总结系列】使用举例
- Hibernate和ibatis在同一个webapp中混合使用在spring中的配置方法
- hibernate注解属性 Mappedby、cascade 的使用
- 使用struts+spring+hibernate组装你的web应用架构
- 何时开始使用IDE工具
- android 何时使用Service 何时使用Thread
- hibernate 基本配置和使用
- hibernate3.5使用session.createQuery()查出数据与数据库不一致
- Hibernate 中使用oracle临时表