The Execution Flow

  1. When a user types an URL or clicks an hyperlink at the browser, a request is sent to the Web server. ZK loader is then invoked to serve this request, if the URL matches which ZK is configured for[19].

  2. ZK loader loads the specified page and interprets it to create proper components accordingly.

  3. After interpreting the whole page, ZK loader renders the result into a HTML page. The HTML page is then sent back to the browser accompanied with ZK Client Engine[20].

  4. ZK Client engine sits at the browser to detect any event triggered by user's activity such as moving mouse or changing a value. Once detected, it notifies ZK AU Engine by sending a ZK request[21].

  5. Upon receiving ZK requests from Client Engine, AU Engine updates the content of corresponding component, if necessary. And then, AU Engine notifies the application by invoking relevant event handlers, if any.

  6. If the application chooses to change content of components, add or move components, AU Engine send the new content of altered components to Client Engine by use of ZK responses.

  7. These ZK responses are actually commands to instruct Client Engine how to update the DOM tree accordingly.



[19] Refer to Appendix A in the Developer's Reference.

[20] ZK Client Engine is written in JavaScript. Browsers cache ZK Client engine, so the engine is usually sent only once at the first visit.

[21] ZK requests are special AJAX requests. However, for the mobile edition, ZK requests are special HTTP requests.