摘要
以电子商城的开发为案例探讨了设计模式,并在表示层、业务层、数据访问层三个层次结构上分层使用设计模式。在系统开发中运用了多种重要的核心模式,比如MVC模式、观测者模式、策略模式、代理模式、DAO模式、外观模式、单例模式、简单工厂模式,并给出模式的实现。相对于传统的应用系统,该系统合理使用设计模式使得其结构严密、层次分明,具有更好的可重用性和可维护性。
In this Paper, an e-mall is used as a case study for design patterns. The design goes into the presentation layer, business layer and data access layer of the three-layered structure. Several important core design patterns has been applied such as the MVC pattern, Observer pattern, Strategy pattern, Proxy pattern, DAO pattern, Facade pattern, Singleton pattern and SimpleFactory pattern with Class diagram or implementation codes. Compared with traditional applications, the system has better reusability and maintainability.
出处
《电脑开发与应用》
2010年第1期48-50,52,共4页
Computer Development & Applications
关键词
设计模式
电子商城
表示层
业务层
数据访问层
design pattern, e mall, presentation layer, business layer, data access layer