江汉大学学报(自然科学版) ›› 2011, Vol. 39 ›› Issue (2): 56-60.

• ·计算机科学· • 上一篇    下一篇

基于闭包的JavaScript面向对象编程框架

李轶   

  1. 江汉大学 数学与计算机科学学院, 湖北 武汉 430056
  • 收稿日期:2011-03-28 出版日期:2011-03-20 发布日期:2013-12-30
  • 作者简介:李轶(1976—),男,湖北武汉人,实验师,硕士,主要从事网络管理研究.

Object-oriented Programming Framework based on JavaScript Closure

LI Yi   

  1. School of Mathematics and Computer Science, Jianghan University, Wuhan 430056, Hubei, China
  • Received:2011-03-28 Online:2011-03-20 Published:2013-12-30

摘要: Web技术的发展促使开发者对JavaScript语言提出了更多要求.为提高Web应用的开发效率及质量, 构建了一个基于JavaScript闭包的面向对象编程框架.通过闭包的运用, 实现了基于类面向对象编程封装、 继承及多态的特征.在此基础上, 给出了框架使用示例.

关键词: 闭包, 类, 面向对象

Abstract: With the development of Web technology, developers have more language feature requirements on JavaScript. In order to improve development efficiency and quality of web applications, an object-oriented programming framework based on JavaScript closure was built. By using closure, the framework realized all features of object-oriented programming based on class, including encapsulation, inheritance and polymorphism. And moreover, gives a demonstration example of the framework.

Key words: closure, class, object-oriented

中图分类号: