From Ape Wiki
Contents |
[edit] Getting Started with APE
On this page you will find all the information you need to get started with the APE Project. If you were wondering how to use APE, then this place is for you.
Don't hesitate to join our IRC Channel to ask questions : #ape-project@irc.freenode.net
[edit] 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 (APE JSF).
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.
The APE Server is extensible using server-side JavaScript modules. Information on how to do this may be found at the helpful article How to write server-side JS modules. That is, you have the same language on both client and server side !
For further information, please check out our About Page
[edit] What do I need to start using APE ?
The first thing you need to start using APE is to have knowledge of JavaScript programming.
Moreover, you will need a computer with Linux or MacOS (a virtual machine on Windows works too) in order to install the APE Server.
[edit] 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).
[edit] 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 !
Read more about the APE JavaScript Framework for further details.
[edit] 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.
[edit] Commands
The APE Server is controllable via Commands sent by an external client (for example the APE JavaScript Framework). The Commands are sent via an HTTP request to the Server via GET or POST methods.
[edit] 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, ...
[edit] Channels
A user can join (or be forced to join) a channel. There is no limit to the number of a channels that a user can join. What are channels for, you ask? They're just a way to send data to multiple users at once.
[edit] Hints
- Although the APE JavaScript Framework uses MooTools, you can use any framework (such as jQuery, MooTools, etc.) to write your code.
- The APE Server uses SpiderMonkey - with Just In Time JavaScript debugging enabled via TraceMonkey - in order to load Server Side JavaScript (SSJS) files.
- The whole server API is asynchronous and nonblocking; this includes HTTP requests and MySQL queries.
- The APE Server ships with our own server version of MooTools (again, your client-side code may or may not use MooTools).
[edit] Let's get started : First APE Tutorial
Now you're familiar with the overall working of the APE JSF, you should try to develop your first APE application while following our tutorials.


