摘要
提出了柔性多态设计思想,即固化接口定义,由子类多态派发函数实现对真实函数的功能调用。应用这种设计,仅修改所属模块就可以完成相应功能的增加、删除、修改,父类接口及相关联各模块均不用变化。也就是说当需求分析变化时,程序改动最小。
In this article, an idea of flexible polymorphism design is proposed, namely fixing the interface define and executing the real function through the polymorphic dispatch function. Applying this design, only reprogram of relevant modules is needed to add, update and delete the appropriate functions, while parent interfaces and other relevant modules needs not to be changed. That is to say that the least change is needed when requirement analysis changes.
出处
《计算机时代》
2012年第2期25-27,共3页
Computer Era
关键词
柔性多态
固化接口
派发函数
模块
flexible polymorphism
fixing interface
dispatch function
module