plane
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:asychronous,event driven,framework
plane is an asynchronous event driven framework.
It just introduce a new way of writting code. 
Let's thinking in an asynchronous way.

A fantastic way of programming
every things go asynchronously,no multipule callbacks,only events.Every thing is an event,get config is an event and etc.


Get started
see examples/helloworld.js

How it works?
xtower.js abstract events controller as an tower at an airport with fire,on,remove events.
plane.js reads event producer file to reg every thing to tower waitting for firing.

Documents
xtower.on the same as EventEmitter.on
xtower.remove the  same as EventEmitter.removeListener
xtower.fire
	emit the event when the event has a listener.the callback's last parameter is the xtower self.

plane.fly(path,cb) 
	path is the absolute file path which your events stay
	cb is the callback which init process finishes which does not guarantee the event is reg at the xtower.

exports.evt_hello  = function() {
	console.log('hello world from plane');
};
the code above gets you a event called hello which will log a hello world

exports.evt_hello_world  = function() {
	console.log('hello world from plane');
};
the code above gets you a event called hello.world which will log a hello world

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。