ZK Dictionary

From Documentation
Revision as of 10:57, 14 January 2021 by Matthieu (talk | contribs)

Introduction

ZK Framework uses a number of keywords to refer to specific concepts. These words may have a "general use" in English different than their use in the context of ZK.

You will find a short description of these concept below, as well as a link to a full documentation page explaining it in details. This list is meant to be used as a reference page. If you are new to ZK, we encourage you to refer to it while you explore the rest of our documentation.

Component

A component is a Java object existing at server-side representing a UI element. A component can be a simple control like a Button, or a complex control like a Grid.

Component tree

The component tree is a group of component organized in a tree structure. A component may have children, and these children can have their own descendants. A component has a single parent. For example, a window contain a div, and the div contain two buttons.

Page

A Page object represents the collection of components loaded from a zul file. It also acts as the root of the component tree.

Widget

A widget is a JavaScript object existing at client-side. It is the client-side representation of a server-side Component. The widget role is to pilot the DOM tree (the actual browser content) and to act as a communication relay between user actions and server updates.

Mold

A mold is an appearance applied to a component. ZK provide different apparences for some components, if they have different mode of operation.

Composer

A composer is a Java class that controls part or all of a ZK page. A composer can access components, update their properties and listen to user actions.

Sclass

The sclass="customclass" attribute can be used by a developer to add a class="customclass" attribute on the DOM node created by the component. Its purpose it to easily add CSS styles to a ZK component.

[[ZK_Developer's_Reference/MVC/Model/List_Model | ListModel]

A ListModel is a ZK utility class that wraps a collection. It provides convenient APIs when binding a collection to a ZK component. For example, it handle selection, automatic updates and collection events. You can implement your own version for manual control, or simply use the existing classes for standard collections such as ListModelList, ListModelArray, ListModelSet, ListModelMap

[[ZUML_Reference/ZUML | zul file]

A zul file contains ZUML (ZK User Interface Markup Language) describing a collection of ZK components. Conceptually, a zul page is similar to a JSP page. Zul files are parsed by the ZK framework when the end-user request the corresponding URL to generate the page content.

[[ZK_Developer's_Guide/Fundamental_ZK/Basic_Concepts/Page_and_Desktop | desktop]

A ZK desktop is a collection of pages served through the same URL. In 90% of cases, a desktop represents the content of one single browser tab. (Note: if a browser tab contains content loaded from multiple URLs, such as using iframes, there may be more than 1 desktop per browser tab.)

[| session

A ZK Session object is a wrapper for the WebServer's own session object. In a Java EE environment, an application server creates a javax.servlet.http.HttpSession object to track client's session. ZK's Session is a wrapper of HttpSession.


[[ZK_Developer's_Reference/Architecture_Overview | execution]

A ZK Executionis a transaction between the client and the server. An execution begins when the client browser sends an HTTP request to the server, and ends when the server sends back a response containing the result of the transaction. An execution can contain multiple AU requests (sent from the client to the server) and reply with multiple AU responses (from the server to the client)

[[ZK_Configuration_Reference/zk.xml/The_Library_Properties | Library property]

A library property is a configuration that affects how ZK behaves. A library property can be set globally, for a page, or for a limited number of ZK components. The full list of library property can be found here.

[[ZK_Configuration_Reference/zk.xml | zk.xml]

WEB-INF/zk.xml is the configuration descriptor of ZK. If you want ZK to follow default behaviors, this file is optional. You can create it and add configuration elements to customize how ZK behaves.

[[ZK_Client-side_Reference/Language_Definition | lang-addon.xml]

A language definition defines a component set (aka., a language) such as the zul language used for .zul files. A language addon is used to extend a language definition in order to modify its default content, or to add new content to it.

[[ZK_Client-side_Reference/Communication | AU request]

AU requests are commands sent from the client to the server. They each contains an event generated from the client-side, such as a user click or a change in the UI state. Multiple AU Requests can be sent at the same time, and processed during the same execution. A single AU Request can cause multiple AU Responses, or even no response at all.

[[ZK_Client-side_Reference/Communication | AU response]

AU responses are commands sent from the server to the client. They each contains an action to be performed at client-side. Multiple AU Requests can be sent back at the same time at the end of the same execution.