Beruflich Dokumente
Kultur Dokumente
0 Developer Manual 1
1. Introduction
This document is an introduction to the application development in eyeOS 2.0. It
is required to know PHP and Javascript to read this document.
Client Server
The platform is created over a client-server architecture, where eyeOS is the
server and the client usually is a web browser.
1.3. EyeOS directory structure
It is important to know how eyeOS is organized to be able to develop
applications. In eyeOS everything has a specific place to be located.
The eyeOS directory tree can be summarized as seen below:
eyeos/apps: Directory where the applications are located.
eyeos/extern: Files visible from outside, as CSS style sheets, images, etc…
eyeos/extras: Extra files.
eyeos/system: System directory, it contains services, libraries, the kernel and
global configurations.
eyeos/users: Users directory with all their documents and configuration files.
eyeos/workgroups: It contains the files referred to the user groups.
EyeOS 2.0 Developer Manual 3
css…
This code, on being executed by the browser would send a message whose
name is “whatDayIs” and that send by parameter an array with a string. On returning
from the message, the specified function would be executed that, in this case, would
tell us what day of the week is in a dialog. We must note that the variable rPars on the
callback function contains the results emitted on the return of the message.
As we have said, this message is received on the server side by a php file. This
file is the responsible of returning the corresponding response:
As we can see, it describes the behavior of the function that has by name the
name of the message, and returns what day of the week we are.
EyeOS 2.0 Developer Manual 5
//Create the layout where the button will be placed and put it on the window
var mainLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox());
mainWindow.add(mainLayout);
//Add a listener to the button that will be executed when its clicked
boto.addListener("execute", function(e) {
//Send the message
eyeos.callMessage(checknum, 'quinDiaEs', ['ca'], function (rPars) {
//Function that will be executed when you return from the message
alert('Avui és '+rPars);
});
});
};
demo.php
<?php
abstract class demoApplication extends EyeosApplicationExecutable {
if($params[0]=="en"){
return $daysEn[date(w)];
}
}