计算机应用与软件2016,Vol.33Issue(9):7-9,37,4.DOI:10.3969/j.issn.1000-386x.2016.09.002
基于函数式编程语言的事件驱动模型的设计与实现
DESIGN AND IMPLEMENTATION OF EVENT-DRIVEN MODEL BASED ON FUNCTIONAL PROGRAMMING LANGUAGE
摘要
Abstract
Functional programming language (FPL)has been widely used in the development of mobile games,such as Lua and JavaScript on client,Ruby,Erlang and JavaScript on server.However,most of the designs in regard to mobile game development framework are based on traditional object-oriented method,they do not make good use of the characteristics of FPL.In this paper,focuses on the communication in modules of project code,we designed and implemented an event-driven model applicable to FPL,named FPEDM,by referring the observer pattern of object-oriented programming (OOP)and existing open source framework of FPL Node.js.The model is simple and easy to use,has strong scalability,low coupling dependency with specific mobile game projects,and good reusability.By applying it to project development, the development efficiency can be greatly improved,the complexity of the project framework can be simplified as well.关键词
函数式编程/事件驱动模型Key words
Functional programming/Event-driven model分类
信息技术与安全科学引用本文复制引用
刘德财,高建华..基于函数式编程语言的事件驱动模型的设计与实现[J].计算机应用与软件,2016,33(9):7-9,37,4.基金项目
国家自然科学基金项目(61073163);上海市企业自主创新专项资金项目(沪CXY-2013-88)。 ()