Chapter 9. Writing real-world domain models
This chapter covers
- Domain-model development processes
- Legacy schema mapping
- Understanding persistence ignorance
- Implementing business logic
- Data binding in the GUI
- Obtaining DataSets from entities
Having read this book so far, you should be familiar with what a business entity looks like, what a domain model is, and roughly how a domain model is formed. Our examples have aimed to keep things simple, so we haven’t yet introduced you to the processes and techniques that will help you tackle real-world projects.
The first part of this chapter looks at the various starting points of an NHibernate project and then explains how you can leverage automation and generation to help build the other layers. Until now, you’ve been manually implementing entities by hand. You can save much time by using the tools described here to automatically generate domain-model entities, database schema, and even mapping definitions.