Developers/Concepts/Tine 2.0 Process Flow
Contents |
[edit] Tinebase request processing overview
$_REQUEST => index.php => Tinebase_Controller->handle() => JSON / HTTP
If $_REQUEST['method'] is set and the request is a XMLHttpRequest, the JSON-Server (Tinebase/Json.php) is started. If not, the normal HTTP-Server (Tinebase/Http.php) will handle the request.
If the method begins with an application name (i.e. "Admin"), the corresponding Json-server of this application is used to handle the request (in this case that would be Admin_Json or Admin/Json.php). A method consists of two parts: APPLICATION.FUNCTION . The function part is the name of the function that will be called in the JSON or HTTP server.
[edit] HTTP request
If the Zend_Auth singleton object is already available, the "mainScreen" will be displayed. If there is no auth object, the user has to login via the login screen (Tinebase/views/login.php and Tinebase/js/Login.js).
Two examples follow:
[edit] Example: Login
The login is handled by the Tinebase_Controller->login() function. From there the Tinebase_Auth->authenticate() function is called to validate the username and password and if the credentials are valid, an Account object is created with the given username.
[edit] Example: Admin.editGroup
http request/method=Admin.editGroup => index.php => Tinebase_Controller->handle() => Admin_Http->editGroup() => show view mainscreen.php and call Tine.Admin.Groups.EditDialog.display()
[edit] JSON request
An example for a JSON request:
[edit] Example: Admin.getGroups
json request/method=Admin.getGroups => index.php => Tinebase_Controller->handle() => Admin_Json->getGroups() => Admin_Controller->getGroups() => Tinebase_Group->getGroups() => Tinebase_Group->_backend->getGroups() => get groups from backend (LDAP or SQL) and deliver them (json encoded) to the frontend




