Chapter 10. A field guide to objects
This chapter covers
- Different types of objects you’ll find in a typical web application
- How different types of objects work together
- In which application layer these objects live
- How these layers are related
So far we’ve discussed style guidelines for object design. These are meant to be general-purpose rules that can be applied everywhere, but this doesn’t mean that all the objects in your application will look the same. Some objects will have lots of query methods and some will have only command methods. Some will have a mix of both, but with a certain ratio of them. You may find that different types of objects often share certain characteristics, which results in pattern names to be invented for them. For instance, developers will talk about “entities,” “value objects,” or “application services” to indicate the nature of the object they’re talking about.