期刊文献+

单例模式及其扩展在Web开发中的应用分析 被引量:3

Application Analysis of Singleton Pattern and its Extension in Web Development
在线阅读 下载PDF
导出
摘要 单例模式是一种Web开发中广泛应用的设计模式,应用该模式的类只能在类体内部实例化本类唯一的实例对象,并通过该类的静态成员方法提供给整个应用程序,起到全局共享的作用.该种模式的应用可以降低应用程序的资源耗费、提高运行效率,但当系统任务繁重或一个实例对象难以胜任时,就显得捉襟见肘,多例模式作为单例模式的扩展,通过生成有限个实例对象,既能避免类体本身实例对象的无序生成,又很好的解决了单个实例对象所不能完成的任务,可以说是单例模式优点的延续和扩展. The singleton pattem is a design pattem used for Web development,the class instantiate the only object inside the class applied the singleton pattern, and provide the object to the whole application through the static methods of the class, play a shared global role. Application of this kind of mode can reduce the application's resource consumption and improve operational efficiency. But it is difficult when competency system task or an instance exists only. Multiple instances model is as an extension of singleton pattern. It can avoid disorderly generating the class body object through generating a finite object instance.It is a very good solution to finish the task unfinished by the only object also. This model can be said to be continuation and expansion of the singleton pattern.
作者 刘耀钦
出处 《计算机系统应用》 2014年第5期218-221,共4页 Computer Systems & Applications
关键词 模式 单例 多例 变量 patter singleton multiple instances variables
  • 相关文献

参考文献4

  • 1Freeman E, Freeman E, Sierra K, Bates B. Head First设计模式.北京:中国电力出版社,2005:169-177.
  • 2McArthur K.PHP高级程序设计模式、框架与测试.北京:人民邮电出版社,2009:17.25.
  • 3夏浩波.单例模式的设计与应用[J].电脑开发与应用,2011,24(1):58-59. 被引量:8
  • 4深入理解PHP内核:Thinking In PHP Internals.http://www.php-internals.com/book/?p=chapt06/06·00-一memory-management.2013.10.

二级参考文献5

  • 1李英军.设计模式:可复用面向对象软件的基础[M].北京:机械工业出版社,2007.
  • 2Robert C Martin,Micah Martin著,邓辉,孙鸣译.敏捷软件开发:原则、模式与实践(c#版)[M].北京:人民邮电出版社,2008.
  • 3Alan Shalloway,James R Trott.设计模式精解[M].北京:清华大学出版社,2004.
  • 4Alan Shalloway,James R Trott.设计模式解析[M].北京:人民邮电出版社,2006.
  • 5刘淼淼,惠忠文,郝万东.基于Visual C++6.0的SolidWorks二次开发技术[J].电脑开发与应用,2010,23(4):55-57. 被引量:5

共引文献7

同被引文献20

引证文献3

二级引证文献3

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部