MAMMON <[EMAIL PROTECTED]> writes: > So does NH really achieve Persistence Ignorance?
IMNSHO it's a dumb idea to try to make your business layer completly persistence ingnorant (in the way you suggest), because there is some persistence in the background and you are developing a complex system. Having really pure POCOs with absolut none constraints, where you program as if no persitence exists, is like having a team of a hundred developers writing code with no constraints (at least no coding conventions) and hoping all will be well, working, and good looking in the end. Complex systems needs decisions and constraints and conventions. There are very important. And especially the heart of your system is influenced by these decisions and constraints. Deal with it! The crucial idea of presistence ignorance is to try to help to make clear decisions. You should not use NHibernate and ISessions all over your code -- but this is not because otherwise it would be so easy to exchange your ORM (it never is), but because you need this to better structure your software, because otherwise you have no chance of ever get this complex system really working (not to mention to adapt the system for future changes). So NHibernate requires some constructors or all properties virtual? Never mind. Rules of thumb like persistence ignorance should guide you, they are not strict laws and you won't be shot if you follow common sense. :) -- Until the next mail..., Stefan.
pgpYOflTWKOpD.pgp
Description: PGP signature