I've picked Chapter 11, which gives a compact overview of all the design patterns that are useful for structuring your web application in a way that will (almost) automatically make it independent of surrounding infrastructure, including the web framework you use.
In Part I we've been discovering these design patterns by refactoring different areas of a simple web application.
Verify that the requested change is possible given the current state of the entity, and that the entity won't end up in an invalid state: When an update to a particular field actually represents an action performed on the object, define a method for it.
The next time the application tries to save() an entity you look it up in the identity map.
This application service should then follow the standard pattern of retrieving an entity, making a change to it, and saving it again.