1.E un algoritmo ricorsivo: Tutti le istanze di oggetti raggiungibili da un oggetto persistente...
-
Upload
perlita-massaro -
Category
Documents
-
view
219 -
download
2
Transcript of 1.E un algoritmo ricorsivo: Tutti le istanze di oggetti raggiungibili da un oggetto persistente...
1.E’ un algoritmo ricorsivo: Tutti le istanze di oggetti “raggiungibili” da un oggetto persistente diventano anch’essi persistenti.
Persistence ContextPersistence Context
Soluzione di NHibernate:Persistence by Reachability con Cascade
Associazione
Cascade
Behaviour
ContextContext
ContextContext
Context ProviderContext Provider
User Interface Layer
Business Layer
Data Access Layer
DAODAO DAODAO DAODAO
Context:
Identity MapUnit of WorkAutomatic Dirty CheckOptimistic ConcurrencyPessimistic ConcurrencyProxy per Lazy...
Context:
Identity MapUnit of WorkAutomatic Dirty CheckOptimistic ConcurrencyPessimistic ConcurrencyProxy per Lazy...
“...Hibernate’s job is to reduce the amount of code you have to write for the most common 90 percent of use cases (common CRUD and reporting)...”
“…Hibernate’s learning curve is high at first. In our experience, a developer needs at least two to four weeks to learn the basics. Don’t jump on Hibernate one week before your project deadline. It won’t save you…”
“…Finally, use SQL, JDBC, and stored procedures for the 5 percent of use cases you can’t implement with Hibernate, such as mass data manipulation
or complex reporting queries with vendor-specific SQL functions…”
[Gavin King, Hibernate in Action]