1 / 46

Persisting Rich Domain Models Using NHibernate

Persisting Rich Domain Models Using NHibernate. IStarShip. Agenda. Intro Basics (Mapping / Session) More mapping and querying options Detached objects (update / merge) Componet & Value types Inheritance Concurrency Legacy databases Performance Common Errors / Problems. NHibernate.

gayora
Download Presentation

Persisting Rich Domain Models Using 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. Persisting Rich Domain Models Using NHibernate

  2. IStarShip

  3. Agenda • Intro • Basics (Mapping / Session) • More mapping and querying options • Detached objects (update / merge) • Componet & Value types • Inheritance • Concurrency • Legacy databases • Performance • Common Errors / Problems

  4. NHibernate • Origins in Java (Hiberante 2001) • First release 2004 • Last release 2.1.2 (Nov 2009) • Upcoming 3.0 release (Summer 2010) • http://nhforge.org/

  5. Transparent persistance

  6. MAPPing

  7. Mapping

  8. Identity Map/L1 Cache ISession Unit of Work

  9. maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems.

  10. DEMo

  11. idgenerators sequence increment native assigned seqhilo hilo identity foreign guid uuid.string guid.comb uuid.hex

  12. id generator - identity

  13. id generator - hilo

  14. id generator - hilo

  15. PRoxy

  16. PRoxy

  17. PRoxy

  18. Fetch Select / Lazy /N plus 1

  19. Fetch join

  20. inverse false

  21. Cascade • none • save-update • delete • delete-orphan • all • all-delete-orphan

  22. value objects

  23. Components

  24. Components

  25. Components

  26. inheritance • table per class hierarchy • table per subclass • table per concrete class

  27. Model

  28. Table PER CLass

  29. concurrency

  30. Concurrency

  31. Concurrency - version

  32. Concurrency - version

  33. Concurrency - timestamp

  34. legacy • Composite primary keys • Relations on non-primary keys • Join • SQL Queries • DB Generated fields

  35. Property-ref

  36. Sql queries

  37. generated - insert

  38. performance • Batching • Eager loading (eliminate N+1) • Query Cache • L2 Cache

  39. Batching

  40. Batching

  41. i could go on an on... • NHibernate = endless number of features 

  42. resources • http://nhforge.org/ • http://ayende.com/blog • http://www.codinginstinct.com • http://sharparchitecture.net/ Torkel.odegaard@gmail.com http://tlo.googlecode.com/svn/trunk/presentations/nhibernate_elevate

More Related