What type is repository pattern in?
问题 In general, I know that there are 3 big types of design pattern Creational Pattern (Factory, Singleton, etc) Structural Pattern (Composite, Adapter, Proxy, etc) Behavioral Pattern (Specification, Command, etc) But I dont know which type I can put the Repository pattern in. Is Repository pattern in one of three above type? Or is it kind of in the middle of (2) and (3) pattern? 回答1: Repository can be viewed as a special kind of Façade (structural) but also as a special kind of Factory