1 / 92

NHibernate

NHibernate. Object/Relational Persistence for .NET. A little bit of background information…. .NET port of the Hibernate project (Java). Mature architecture and proven c oncepts, already in use in many enterprise Java applications. Already quite popular in the .NET world as well.

mary
Download Presentation

NHibernate

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. NHibernate Object/Relational Persistence for .NET

  2. A little bit of background information…

  3. .NET port of the Hibernate project (Java)

  4. Mature architecture and proven concepts, already in use in many enterprise Java applications

  5. Already quite popular in the .NET world as well

  6. Popularity seems to be increasing :)

  7. General Philosophy Of NHibernate

  8. It’s all about POCO

  9. Should work on most databases

  10. As few constraints on your code as possible

  11. Full OO support: inheritance, polymorphism, composition, single-valued and many-valued associations

  12. Maximize performance and flexibility

  13. Keep your code clean

  14. Strong Points

  15. Ideally suited for OLTP scenarios (web applications, service layers, …)

  16. Database independence

  17. Rich feature set

  18. Mature

  19. Extensible architecture

  20. Large, active, helpful and growing user base

  21. Plenty of articles, blog posts and documentation available

  22. It’s Open Source (LGPL)!

  23. Weak Points

  24. Not suited (at all) for bulk data processing

  25. No code generation, and no designer support either

  26. Bad reputation in some companies due to lazy coding ( = abuse of lazy loading )

  27. Plenty of outdated articles, blog posts and documentation available

  28. It’s Open Source! (some companies just don’t like that)

  29. Let’s look at some of the things we can do with NHibernate…

  30. Transitive Persistence

  31. Managing associations between classes in a transparent manner

  32. Allows you to persist object graphs with one instruction

  33. Needs to be configured for each association => fine-grained control over cascade settings

  34. Hold on… why was every member in the Order class virtual?

  35. I wouldn’t want to debug that either :)

  36. Storing data in the database in an easy manner is great and all, but what about getting it out again?

  37. Querying with NHibernate

  38. Hibernate Query Language

  39. It’s an Object Oriented query language

  40. Criteria API

  41. Makes it easier to compose queries dynamically from code.

  42. LINQ… still not fully supported

  43. Wouldn’t it be great if we could execute multiple queries in only one database roundtrip?

  44. Future Queries

More Related