The Design Patterns Used in PetStore 2. Command
2004-12-26 17:40
429 查看
A facade's effectiveness is limited, since complex applications can cause the facade's API to grow too large. This is the case with the sample application. Rather than continuing to add methods to the session facade class, the petstore application implements a command pattern on top of the facade. A command pattern encapsulates each application function in a separate class. Each command instance represents a single request for an application service along with data necessary to perform the service.
Implementing a controller with a command pattern not only simplifies a session facade interface , it also keeps the controller implementation cleaner by encapsulating event- and request-handling tasks into smaller objects.
Implementing a controller with a command pattern not only simplifies a session facade interface , it also keeps the controller implementation cleaner by encapsulating event- and request-handling tasks into smaller objects.
相关文章推荐
- The Design Patterns Used in PetStore 1. Facade
- Microsoft .NET Pet Shop 3.x: Design Patterns and Architecture of the .NET Pet Shop
- Discover the Design Patterns You're Already Using in the .NET Framework
- (轉貼) Microsoft .NET PetShop 3.x:Design Patterns and Architecture of the .NET Pet Shop (.NET) (PetShop) (N-Tier)
- Discover the Design Patterns You're Already Using in the .NET Framework(MSDN)
- The Use of Design Patterns In Game Development
- CocoaPods报错:The dependency `AFNetworking ` is not used in any concrete target
- OUI-10022:The target area /oracle/oraInventory cannot be used because it is in an invalid state.
- Design Patterns in Android:模板方法模式
- The model used to open the store is incompatible with the one used to create the store
- The model used to open the store is incompatible with the one used to create the store
- Core Data异常: model used to open the store is incompatible with the one used to create the store
- Ten most commonly used design patterns
- The Design of Sites: Patterns, Principles, and Processes for Crafting a Customer-Centered Web Experience
- CocoaPods报错:The dependency `AFNetworking ` is not used in any concrete target
- Design Patterns in iOS — Class Clusters
- have a better understand of the coordinate used in 3D
- cocoa pods 报[!] The dependency `SDWebImage (~> 2.7)` is not used in any concrete target.
- Learning JavaScript Design Patterns The Constructor Pattern
- Learning JavaScript Design Patterns The Observer Pattern