首页> 中文期刊> 《计算机应用与软件》 >基于函数式编程语言的事件驱动模型的设计与实现

基于函数式编程语言的事件驱动模型的设计与实现

     

摘要

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.%函数式编程语言在移动游戏研发中使用十分普遍,例如客户端的 Lua、JavaScript,服务端的 Ruby、Erlang、JavaScript。但目前对移动游戏开发框架的设计大多是基于传统面向对象的方法,并没有很好地利用函数式编程语言的特性。针对项目代码模块的通信问题,通过借鉴面向对象(OOP)中的观察者模式以及现有的函数式编程语言的开源框架 Node.js,设计并实现一种适用于函数式编程语言的事件驱动模型 FPEDM(Functional Programming Event Driven Model)。该模型具有简单易用,扩展性强,与移动游戏软件耦合度低、复用性好的特点,应用到项目开发中可大大提高开发效率,简化项目框架的复杂度。

著录项

相似文献

  • 中文文献
  • 外文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号