We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byHalie Musgrave
Modified about 1 year ago
NHibernate Object/Relational Persistence for.NET
A little bit of background information…
.NET port of the Hibernate project (Java)
Mature architecture and proven concepts, already in use in many enterprise Java applications
Already quite popular in the.NET world as well
Popularity seems to be increasing :)
General Philosophy Of NHibernate
It’s all about POCO
Should work on most databases
As few constraints on your code as possible
Full OO support: inheritance, polymorphism, composition, single-valued and many-valued associations
Maximize performance and flexibility
Keep your code clean
Ideally suited for OLTP scenarios (web applications, service layers, …)
Rich feature set
Large, active, helpful and growing user base
Plenty of articles, blog posts and documentation available
It’s Open Source (LGPL)!
Not suited (at all) for bulk data processing
No code generation, and no designer support either
Bad reputation in some companies due to lazy coding ( = abuse of lazy loading )
Plenty of outdated articles, blog posts and documentation available
It’s Open Source! (some companies just don’t like that)
Let’s look at some of the things we can do with NHibernate…
Managing associations between classes in a transparent manner
Allows you to persist object graphs with one instruction
Needs to be configured for each association => fine-grained control over cascade settings
Hold on… why was every member in the Order class virtual?
I wouldn’t want to debug that either :)
Storing data in the database in an easy manner is great and all, but what about getting it out again?
Querying with NHibernate
Hibernate Query Language
It’s an Object Oriented query language
Makes it easier to compose queries dynamically from code.
LINQ… still not fully supported
Wouldn’t it be great if we could execute multiple queries in only one database roundtrip?
Can we efficiently update multiple records in one roundtrip as well?
As of NHibernate 2.1, we can do this with some new HQL statements
Data Modification With HQL
What about caching? Do we need to do that manually?
Of course not :)
Second Level Cache
Second Level Cache data is available to all sessions
We can cache entity instances…
But we can also cache the results of queries…
This is ideal for static (reference) data or even data that doesn’t change frequently
How does the cache deal with modified data, though?
We’ll update the database and the cache
NHibernate will never cache anything in the Second Level Cache automatically
It needs to be configured on a per-entity and per-query basis
All the caching power you want, without having to pollute your code
Only use this for data that doesn’t change frequently though
But where is the cache’s data stored?
That’s up to you… multiple providers are available: ASP.NET cache, MemCached, Velocity, Prevalence, …
At this point, I’m almost running out of time and there is a lot more interesting stuff that we won’t get to cover.
Like optimistic concurrency strategies…
Or pessimistic locking strategies…
Or the various identifier strategies…
Or the various inheritance strategies…
Or how automatic dirty tracking works…
Or how you can implement your own dirty tracking…
Or custom user types…
Or how to deal with entities that were detached from the session…
Or the generation of DDL scripts, for your specific database…
Or the various mapping strategies for complex domain models…
We didn’t cover any of the many extensibility points either…
Maybe some other time :)
If you want to learn more, be sure to visit
Oh, and check out my blog if you liked this presentation:
Introduction to NHibernate By Andrew Smith. The Basics Object Relation Mapper Maps POCOs to database tables Based on Java Hibernate. V stable Generates.
NHibernate in Action Web Seminar at UMLChina By Pierre Henri Kuaté 2008/08/27
.NET Database Technologies: Open-Source Frameworks.
Rock Solid Data Access Kevin McKelvin
Object Oriented Analysis and Design 1 Chapter 7 Database Design UML Specification for Data Modeling The Relational Data Model and Object Model Persistence.
Hibernate Persistence. What is Persistence Persist data to database or other storage. In OO world, persistence means persist object to external storage.
Oct * Brad Tutterow. VS 2008.NET 3.5LINQ Entity Framework The ADO.NET Entity Framework is part of Microsoft’s next generation of.NET technologies.
V 6, Mats Strandberg ORM With Hibernate.
JBoss Cache. Cache A place to temporarily store data that is expensive or difficult to compute or retrieve. Caches should be fast to access. May or may.
Object/Relational Mapping with Hibernate Practical ORM.
Best 3 Software Development Languages. Hibernate Training Hibernate is a high-performance object-relational mapping tool and query service. Hibernate.
Hibernate 1. Introduction ORM goal: Take advantage of the things SQL databases do well, without leaving the Java language of objects and classes. ORM.
1 Mapping to Relational Databases Presented by Ramona Su.
Hibernate Basics. Basics What is persistence? Persistence in Object Oriented Applications? Paradigm Mismatch. The Problem of Granularity. The Problem.
Persistence – Iteration 4 Vancouver Bootcamp Aaron Zeckoski
Topic : Hibernate 1 Kaster Nurmukan. An ORM tool Used in data layer of applications Implements JPA.
Topic : Hibernate 1 Kaster Nurmukan. An ORM tool The problem fixed by ORM Advantage Hibernate Hibernate Basic –Hibernate sessionFactory –Hibernate Session.
What is Architecture Architecture is a subjective thing, a shared understanding of a system’s design by the expert developers on a project In the.
October 2014 HYBRIS ARCHITECTURE & TECHNOLOGY 01 OVERVIEW.
J-Interop Open Source Java COM Bridge. Contents What is it ? Comparison with Java Native interface Comparison with J-Integra® for COM Benefits of using.
An Object/Relational Mapping tool Free and open source Simplifies storage of object data in a relational database Removes the need to write and maintain.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
Best Institutes offering Software Development courses.
Session-01. Hibernate Framework ? Why we use Hibernate ?
Ganymede Simultaneous Release | © 2008 by Springsite B.V., The Netherlands made available under the EPL v1.0 Teneo Ganymede Simultaneous Release.
CHAPTER 14 USING RELATIONAL DATABASES TO PROVIDE OBJECT PERSISTENCE (ONLINE) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database.
2 A bank application needs to access information from the customer database and integrate it with loan credit history information stored in a legacy database.
Hibernate Java Persistence API. What is Persistence Persistence: The continued or prolonged existence of something. Most Applications Achieve Persistence.
Sean Chambers. ORM stands for Object Relational Mapper Maps your POCO (plain old clr objects) to your relational model using XML config Relieves.
Fall CIS 764 Database Systems Engineering L18.2 : Object Relational Mapping … ….Object persistence.
Slide 1 of 9 Presenting 24x7 Scheduler The art of computer automation Press PageDown key or click to advance.
Object persistence with Hibernate in Decision Deck 1.1 Gilles Dodinet 2 nd Decision Deck Workshop 2008, February.
Hibernate 3.0. What is Hibernate Hibernate is a free, open source Java package that makes it easy to work with relational databases. Hibernate makes it.
Presented by Vishy Grandhi. Architecture (Week 1) ◦ Development Environments ◦ Model driven architecture ◦ Licensing and configuration AOT (Week 2)
COM vs. CORBA. What are They? COM: The Component Object Model is a software architecture that allows programs to be built from parts from different software.
Singleton Academy, Pune. Course syllabus Singleton Academy Pune – Course Syllabus1.
XStudio Quick Overview Eric Gavaldo 1.1. What XStudio is a Test Management System that: – Gathers all your tests (generation of test plans) – Builds your.
ORM Basics Repository Pattern, Models, Entity Manager Ivan Yonkov Technical Trainer Software University
Enterprise Object Framework. What is EOF? Enterprise Objects Framework is a set of tools and resources that help you create applications that work with.
A Workflow Engine with Multi-Level Parallelism Supports Qifeng Huang and Yan Huang School of Computer Science Cardiff University
Portals: Architecture & Best Practices Greg Hinkle February 2005.
Basic features ● Document database ● Paid deployment ● JSON ● C#, HTTP REST, Java ● version 3.0.
The POSTGRES Next - Generation Database Management System Michael Stonebraker Greg Kemnitz Presented by: Nirav S. Sheth.
Thinking of Drupal 8? Get started with the resources.
The Top 10 Reasons Why Federated Can’t Succeed And Why it Will Anyway.
Who I am What is NHibernate? ◦ Object Relational Mapper ◦ A framework for building advanced frameworks ◦ Ported from Java ◦ A wide NHibernate ecosystem.
Introduction to ECO Malcolm Groves
A U.S. Department of Energy Office of Science Laboratory Operated by The University of Chicago Argonne National Laboratory Office of Science U.S. Department.
CS520 Web Programming Object-Relational Mapping with Hibernate and JPA (I) Chengyu Sun California State University, Los Angeles.
Module Road Map The Scope of the Problem A range of potential problems Lost Updates User A reads a record User B reads the same record User A makes changes.
© 2017 SlidePlayer.com Inc. All rights reserved.