Quick links: Content - sections - sub sections
EN

Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
en:tutorials:main:creating-action [2007/09/16 15:06] laurenten:tutorials:main:creating-action [2007/11/30 13:44] laurent
Line 1: Line 1:
 ====== Creating an action ====== ====== Creating an action ======
 +
  
  
Line 13: Line 14:
  
 Knowing the type of request processed and the action, Jelix knows the type of the answer to be generated, and thus controls more or less the response generation. Thus, even the error case (an exception or other) occurring during the processing of the action, the exit format will always be the awaited one. A client who calls a web service with xmlrpc, will thus have no matter what happens, a response in the xmlrpc format. That brings a certain robustness to the application. Knowing the type of request processed and the action, Jelix knows the type of the answer to be generated, and thus controls more or less the response generation. Thus, even the error case (an exception or other) occurring during the processing of the action, the exit format will always be the awaited one. A client who calls a web service with xmlrpc, will thus have no matter what happens, a response in the xmlrpc format. That brings a certain robustness to the application.
 +
 +Here is how Jelix work: 
 +
 +{{http://jelix.org/images/schema_logic.png}}
 +
 +  - an HTTP request calls Jelix. Jelix creates an instance of a jRequest object which contains datas of the request. It then create an instance of your controller which corresponds to the asked action.
 +  - A method  in the controller is executed. It retrieves request parameters in order to know which process to run.
 +  - Then the method execute business processes, et retrieves eventually some results which will be used for the response
 +  - The method of the controller create an instance of a jResponse object which is setup with datas or else (initialization of templates etc..).
 +  - Jelix gets this jResponse object, launch the generation of the final document (html page, pdf..) and then send it to the browser.
 +
  
 ===== Implementing an action ===== ===== Implementing an action =====

en/tutorials/main/creating-action.txt · Last modified: 2012/04/15 08:32 by laurent

Recent changes RSS feed Creative Commons License