单例模式及其扩展在Web开发中的应用分析
DOI:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:


Application Analysis of Singleton Pattern and its Extension in Web Development
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 增强出版
  • |
  • 文章评论
    摘要:

    单例模式是一种Web开发中广泛应用的设计模式,应用该模式的类只能在类体内部实例化本类唯一的实例对象,并通过该类的静态成员方法提供给整个应用程序,起到全局共享的作用. 该种模式的应用可以降低应用程序的资源耗费、提高运行效率,但当系统任务繁重或一个实例对象难以胜任时,就显得捉襟见肘,多例模式作为单例模式的扩展,通过生成有限个实例对象,既能避免类体本身实例对象的无序生成,又很好的解决了单个实例对象所不能完成的任务,可以说是单例模式优点的延续和扩展.

    Abstract:

    The singleton pattern is a design pattern 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.

    参考文献
    相似文献
    引证文献
引用本文

刘耀钦.单例模式及其扩展在Web开发中的应用分析.计算机系统应用,2014,23(5):218-221

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2013-09-20
  • 最后修改日期:2013-10-25
  • 录用日期:
  • 在线发布日期: 2014-05-29
  • 出版日期:
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京海淀区中关村南四街4号 中科院软件园区 7号楼305房间,邮政编码:100190
电话:010-62661041 传真: Email:csa (a) iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号