Java Reference
In-Depth Information
An effective way to develop a domain model is to first analyze the use cases and
talk to the customer to create the initial domain model, which consists primarily of
the classes and their attributes and associations. Then analyze the requirements to
identify the methods that the domain model must expose to its client. After that,
implement those methods using a test-driven development process.
To avoid dealing with persistence issues, it is usually a good idea to use mock
objects to simulate the database access code. This enables you to focus on getting
the business logic right. It also speeds up the tests for the domain model classes by
eliminating the overhead of the database. At some point, of course, you have to
map the persistent objects to the database and implement the database access
code. The next chapter shows you how to do this.
Search WWH ::




Custom Search