APE(Ajax Push Engine)

24 篇文章 1 订阅
20 篇文章 0 订阅

 

翻译:Linvo

转帖请注明出处!

官方网站:http://www.ape-project.org

===============================

 

Getting Started with APE 

You will find on this page all the informations you need to get started with the APE Project. You were wondering how to use APE ? This place is for you. 

Don't hesitate to join our IRC Channel to ask questions : #ape-project@irc.freenode.net 

APE起步

该页面包含了你打算开始使用APE项目所需要的所有信息。你正想知道怎么使用APE?这里为你准备好了。

加入我们的IRC频道提问吧,不要犹豫:#ape-project@irc.freenode.net 

 

What is APE ? 

APE (Ajax Push Engine) is an Open Source technology allowing you to do real time data streaming through a web browser with no applets and no plugins. The project is divided in two part, the APE Server and the APE JavaScript Framework. 

The APE Server written in the C language enables data to be pushed to Rich Internet Application, while the APE JavaScript Framework (JSF) receive and send back data, deal them and display them. 

APE是什么?

APE(Ajax推送引擎)是一个开源技术,它可以帮你实现通过Web浏览器的实时数据流传输,而无需任何插件和小应用程序。该项目分为两个部分:APE服务器和APE JavaScript 框架。

APE服务器是个用C语言写的程序,支持向富Internet应用程序推送数据。而APE JavaScript框架(JSF)接收和发送数据,并处理和显示它们。

 

What do I need to start using APE ? 

The first thing you need to start using APE is to have knowledge in JavaScript programming. 

Moreover, you will need a Linux dedicated server in order to install the APE Server. (For now, the APE Server only installs on Linux 2.6.16+ Kernel) 

使用APE前的准备

开始使用APE前首先你需要具备一定JavaScript编程知识。

此外,你还需要个准备安装APE服务器的Linux服务器。(现在的APE服务器只支持2.6.16以上内核的Linux)

 

How do I run my own APE Server ? 

There are two different ways to use the APE Server on a dedicated server : 

APE has his own dedicated IP in order to use port 80 (See : How to configure the APE Server on port 80 ?) 

APE is used on a server where it gets along with Apache (See : How to configure the APE Server with Apache ?) 

Once you know what option you could (or want) to use, you'll need to download the lastest build of the APE Server, and follow the Setup Manual. Within few steps you will be able to start creating your own real time web application ! 

Notice that the first choice is highly more scalable (since data are not proxied through Apache). 

我该怎么运行自己的APE服务器?

这有两个不同方法来让APE服务器运行:

APE使用它自己的IP,从而使用80端口(看这里:怎么在80端口配置APE服务器?)

APE使用在一个带有Apache的服务器上(看这里:怎么通过Apache配置APE服务器?)

一旦你知道你要使用的选项,你需要下载最新版的APE服务器,然后参考安装手册。经过简单几步后,你就可以开始创建你自己的实时Web应用了!

注意:第一个选择是被推荐的(自从不再通过Apache来代理数据)。

 

And what about JavaScript ? 

Now your brand new APE Server is perfectly working, you may need to deal with the front end ! But, how do I communicate with the APE Server, you may ask ? 

As for that, we build a lightweight JavaScript Framework, that enables you to deal with all the server actions, send data to it, and real-time display those data in your Rich Internet Application. 

The JSF, is composed of a Core and Plugins. The Core is based on Mootools, but however plugins can be written with the use of the framework of your choice ! (Jquery, Dojo...) 

You do not need to care about the scary "XML HTTP Requests" and "How do I receive the data", the APE JSF handles everything ! It's now time to write your first plugin, and build your own real time application ! 

JavaScript呢?

现在你的新APE服务器已经完美的工作了,你需要处理前后端的问题了!但是,你可能会问:我怎么通过APE服务器来通讯呢?

为解决它,我们建立了一个轻量级的JavaScript框架,它支持你去处理所有的服务器动作、发送数据,以及那些数据在你的富Internet应用的实时显示。

这个JSF是由一个内核和一些插件组成。内核是基于Mootools,但是插件可以使用你喜欢的任何框架来编写!(JQuery,Dojo。。。)

你不必担心诸如“XML HTTP Requests”和“我怎么接收数据”这些问题,APE JSF会处理好每件事!是时候去编写你的第一个插件和建立第一个实时应用的时候了!

 

The APE Protocol 

The APE Protocol is the gateway of the communication between the APE Server and the APE JavaScript Framework. The basics of the Protocol works with RAW and Commands. 

APE协议

APE协议是位于APE服务器和APE JavaScript框架间的关卡。协议的基础是RAW和Commands。

 

Commands 

The APE Server is controllable via Commands sent by an external client (for exemple the APE JavaScript Framework. The Commands are sent via an HTTP request to the Server via GET or POST methods. 

Commands

APE服务器通过扩展客户端(例如APE JavaScript框架)发来的Commands来控制。Commands通过GET或POST方法,通过一个HTTP请求来发送。

 

RAW 

The answers of the server are called RAW and are sent as a JSON Object. Here is a non exhaustive list of RAWs : 

Received message, Login, Error, libape-controller data... 

RAW

服务器的应答称为RAW,并且以一个JSON对象来发送。这是关于RAWs的简单列表:

接收信息,登录,错误,控制数据。。。

 

Let's get started : First APE Tutorial 

Now you're familiar with the global working of the APE JSF, you should try to develop your first APE application while following our First Tutorial. 

开始行动吧:APE入门教程

现在你对APE JSF全局工作已经熟悉了,可以通过我们的入门教程试着开发你的第一个APE应用了。

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值