Mastering Hibernate

Ramin Rad

  • 出版商: Packt Publishing
  • 出版日期: 2016-05-13
  • 售價: $1,420
  • 貴賓價: 9.5$1,349
  • 語言: 英文
  • 頁數: 204
  • 裝訂: Paperback
  • ISBN: 1782175334
  • ISBN-13: 9781782175339
  • 相關分類: Java 相關技術
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Key Features

  • Understand the internals of Hibernate and its architecture, and how it manages Entities, Events, Versioning, Filters, and Cache
  • Observe how Hibernate bridges the gap between object-oriented concepts and relational models
  • Discover how Hibernate can address architectural concerns such as Transaction, Database Multi-tenancy, Clustering, and Database Shards

Book Description

Hibernate has been so successful since its inception that it even influenced the Java Enterprise Edition specification in that the Java Persistence API was dramatically changed to do it the Hibernate way. Hibernate is the tool that solves the complex problem of Object Relational Mapping. It can be used in both Java Enterprise applications as well as .Net applications. Additionally, it can be used for both SQL and NoSQL data stores.

Some developers learn the basics of Hibernate and hit the ground quickly. But when demands go beyond the basics, they take a reactive approach instead of learning the fundamentals and core concepts. However, the secret to success for any good developer is knowing and understanding the tools at your disposal. It's time to learn about your tool to use it better

This book first explores the internals of Hibernate by discussing what occurs inside a Hibernate session and how Entities are managed. Then, we cover core topics such as mapping, querying, caching, and we demonstrate how to use a wide range of very useful annotations.

Additionally, you will learn how to create event listeners or interceptors utilizing the improved architecture in the latest version of Hibernate.

What you will learn

  • Understand the internals of a Hibernate session and how Entities are managed
  • Declare better mapping between entity classes and database tables
  • Manage entity associations and collections
  • Fetch data not just by entity ID, but also using HQL, Criteria Objects, Filters, and Native SQL
  • Observe the first and second level caches and find out how to manage them
  • Collect statistics and metrics data for further observation
  • Make your application work with multi-tenant databases

About the Author

Ramin Rad has been working as a software professional for the last 20 years, living in Washington DC area. He studied mathematics and computer science in the academic world, and he cares deeply for the art of software development.

He is also a musician, a guitarist, who performs regularly in the DC area and beyond. His artistic side is significant because he believes that writing software is more art than science, following the philosophy of the likes of Donald Knuth, who wrote the Art of Computer Programming series.

Currently, he is a director and a solution architect at a large international software product and services company, focusing on enterprise, mobile, and cloud-based solutions.

Table of Contents

  1. Entity and Session
  2. Advanced Mapping
  3. Working with Annotations
  4. Advanced Fetching
  5. Hibernate Cache
  6. Events, Interceptors, and Envers
  7. Metrics and Statistics
  8. Addressing Architecture
  9. EJB and Spring Context

商品描述(中文翻譯)

主要特點



  • 了解 Hibernate 的內部結構和架構,以及它如何管理實體、事件、版本控制、過濾器和快取

  • 觀察 Hibernate 如何彌合面向對象的概念和關聯模型之間的差距

  • 發現 Hibernate 如何應對事務、多租戶數據庫、集群和數據庫分片等架構問題

書籍描述


Hibernate 自問世以來一直非常成功,甚至對 Java Enterprise Edition 規範產生了影響,使得 Java 持久化 API 在很大程度上改變,以符合 Hibernate 的方式。Hibernate 是解決對象關聯映射的強大工具,既可用於 Java 企業應用程序,也可用於 .Net 應用程序。此外,它還可用於 SQL 和 NoSQL 數據存儲。


一些開發人員學習了 Hibernate 的基礎知識後就能快速上手。但是,當需求超出基礎時,他們往往採取反應式的方法,而不是學習基礎知識和核心概念。然而,對於任何優秀的開發人員來說,成功的秘訣在於瞭解和掌握所使用的工具。現在是時候學習如何更好地使用你的工具了。


本書首先通過討論 Hibernate 會話內部發生的事情以及如何管理實體來探索 Hibernate 的內部結構。然後,我們涵蓋了映射、查詢、快取等核心主題,並演示了如何使用各種非常有用的註釋。


此外,您還將學習如何使用最新版本的 Hibernate 中改進的架構創建事件監聽器或攔截器。

你將學到什麼



  • 瞭解 Hibernate 會話的內部結構以及如何管理實體

  • 更好地聲明實體類和數據庫表之間的映射

  • 管理實體關聯和集合

  • 不僅通過實體 ID,還可以使用 HQL、標準查詢對象、過濾器和本地 SQL 檢索數據

  • 觀察一級和二級快取,並瞭解如何管理它們

  • 收集統計和指標數據以進一步觀察

  • 使您的應用程序與多租戶數據庫配合使用

關於作者


Ramin Rad 在過去的 20 年中一直從事軟件專業工作,居住在華盛頓特區。他在學術界學習了數學和計算機科學,並對軟件開發的藝術深感興趣。


他還是一位音樂家和吉他手,在華盛頓特區及其他地方定期演出。他的藝術一面非常重要,因為他認為編寫軟件更多的是藝術而不是科學,遵循像 Donald Knuth(《計算機程序設計的藝術》系列的作者)這樣的哲學。


目前,他是一家大型國際軟件產品和服務公司的董事和解決方案架構師,專注於企業、移動和基於雲的解決方案。

目錄



  1. 實體和會話

  2. 高級映射

  3. 使用註釋

  4. 高級檢索

  5. Hibernate 快取

  6. 事件、攔截器和 Envers

  7. 指標和統計

  8. 解決架構問題

  9. EJB 和 Spring 上下文