Trace:
Differences ¶
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
en:tutorials:main:creating-action [2007/09/16 15:06] – laurent | en: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:// | ||
+ | |||
+ | - 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 | ||
+ | - 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 ===== |