研究了软件工程中的多种设计模式在洪水预报调度系统中的应用.应用桥梁模式实现洪水预报调度系统的体系结构设计与数据存取、应用策略模式实现洪水预报调度模型管理、应用迭代子模式和装饰模式实现预报调度方案管理、应用代理模式实现用户权限管理、应用单例模式实现数据库连接池的管理等.实现了模块的松耦合关系,增加了系统的可维护性和复用性.该系统采用W eb浏览器和Java窗口两种显示界面,运行时可根据环境自动选择不同的通信方式与系统业务逻辑功能模块进行交互.
Several design patterns in software engineering were studied for the purpose of applying them to the system of flood forecast and operation (SFFO). The bridge pattern was employed to design the architecture of SFFO and the data access; the strategy pattern was used to manage the models of SFFO; the iterator pattern and the decorator pattern were employed in the alternatives management; the proxy pattern was used for managing the users'authorities; and the singleton pattern was used for the database connection pool. The patterns used in the software can achieve the loose coupling relationship between different modules and increase the maintainability and reusability of SFFO. Two types of display interfaces, Web browser and Java window, were developed in this system. When SFFO is running, it can choose the communication manner automatically and interact with the functional module of system business logic according to the operating environment.