SlideShare uma empresa Scribd logo
1 de 10
ZK Framework
(http://www.zkoss.org/)




                      Rupalli Das
                       Developer
                MESTECH Services Pvt. Ltd
                 Phone No: 8446309467
What is ZK ?
•   ZK framework is a highly productive open source Java framework for building amazing enterprise web and
    mobile applications.
•   ZK's architecture is based on units of modularization which are pluggable and replaceable, enabling developers
    to extend and customize.
•   ZK uses ZK User Interface Markup Language (ZUML) makes the design of rich user interfaces as simple as
    authoring HTML pages. ZUML is a variant of XUL inheriting all features available to XML, and separates the UI
    definition from the run-time logic.
•   ZUML also allows developers to automate CRUD between UI components and the data source with
    annotations, data binding and MVVM.
•   The main idea behind ZK is to introduce event-handling programming to web applications.
•   ZK refers to the description language as "ZUL."

    System requirements :

•   JRE version 1.4 or later
•   A Web server supporting Servlet 2.3 or later
How to use the ZK
                     framework ?
• To use the framework, copy libraries from the ZK distribution
  (directories dist/lib and dist/zkforge) into a directory WEB-
  INF/lib in your project. Then configure file web.xml by defining:

a)   A servlet for handling requests for displaying new pages.
b)   A servlet for intercepting events that happened on the pages.
c)   A listener for performing cleanup work after session timeout.
d)   The servlets zkLoader and auEngine (Listing One) are
     responsible for "double-track" service of HTTP requests arriving
     from a browser.
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="ZKdemo" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<display-name>ZKdemo</display-name>
    <welcome-file-list>
            <welcome-file>index.html</welcome-file>
            <welcome-file>index.zul</welcome-file>
    </welcome-file-list>

    <servlet>
            <description>ZK loader for evaluating ZK pages</description>
            <servlet-name>zkLoader</servlet-name>
            <servlet-class>org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class>
                         <!— Must. Specifies URI of the update engine (DHtmlUpdateServlet). —>
            <init-param>
                         <param-name>update-uri</param-name>
                         <param-value>/zkau</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup><!— MUST —>
    </servlet>
<servlet>
             <description>The asynchronous update engine for ZK</description>
             <servlet-name>auEngine</servlet-name>
             <servlet-class>org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class>
    </servlet>

    <servlet-mapping>
             <servlet-name>zkLoader</servlet-name>
             <url-pattern>*.zul</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
             <servlet-name>zkLoader</servlet-name>
             <url-pattern>*.zhtml</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
             <servlet-name>auEngine</servlet-name>
             <url-pattern>/zkau/*</url-pattern>
    </servlet-mapping>

    <listener>
             <description>Used to cleanup when a session is destroyed</description>
             <display-name>ZK Session Cleaner</display-name>
             <listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class>
    </listener>

</web-app>
Create a new ZK Project
•   Click [File]/[New]/[Other...]/[ZK Project] in Eclipse main menu.

•   Type the project name. Eclipse will automatically include the default ZK package configured in the ZK
    Package preferences, however, you can select any other installed ZK package by selecting it from the
    combo box. Then, click Next.

•   You can modify the Source folders and Default output folder if you like. Then, click Next.

•   You can modify Context root or Content directory if you like. Then, Click Finish.

•   After clicking Finish, the New Project Wizard will setup the ZK Project ready for development.

•   [you will find a top right icon includes a ZK mark to show that the project has ZK Studio support]
Creating a New ZUL File

•   You can create new ZUL file using the [File]/[New]/[File] command in Eclipse's main menu.

•   However, you have to write the ".zul" extension yourself and the newly create zul file will not contain any
    template code.

•   Click [File]/[New]/[Other] in Eclipse's main menu and then using the wizard to filter zul. Select zul from
    the listbox and then click Next.

•   Type the file name and optional page title name, click Finish.

•   The newly created ZUL File will be opened in ZUL Editor.
Running the ZK Project

•   Configuring Apache Tomcat for Eclipse
     – You are required to create a valid Apache Tomcat Server configuration. Configuration of Apache with
         Eclipse is done in the Server/Runtime Environments preference page.

•   To create a server instance to run a web application the server needs to be defined.
EXAMPLE FOR DESIGNING COMBOBOX

•   <hbox pack="center" align="top" width="100%" height="400px">

          <div height="278px" width="443px">
                    <separator spacing="40px" />
                    <hbox width="440px>
                               <vlayout>
                                          <separator spacing="20px" />
                                          <label value="Color/>
                                          <combobox id="cmbColor" width="150px">
                                          <comboitem label="@load(each)“
                                          image="@load(vm.getIconImage(each))" />
                                          </combobox>
                               </ vlayout>

                    </hbox>
          </div>
•   </hbox>
Zk doc1

Mais conteúdo relacionado

Mais procurados

An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOS
Kevin Decker
 

Mais procurados (20)

MuleSoft ESB Scripting Example
MuleSoft ESB Scripting ExampleMuleSoft ESB Scripting Example
MuleSoft ESB Scripting Example
 
"Backbone React Flux" Артем Тритяк
"Backbone React Flux" Артем Тритяк"Backbone React Flux" Артем Тритяк
"Backbone React Flux" Артем Тритяк
 
Bundle your modules with Webpack
Bundle your modules with WebpackBundle your modules with Webpack
Bundle your modules with Webpack
 
Mule esb
Mule esbMule esb
Mule esb
 
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST APIWordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
 
An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOS
 
Codegen2021 blazor mobile
Codegen2021 blazor mobileCodegen2021 blazor mobile
Codegen2021 blazor mobile
 
Webpack
WebpackWebpack
Webpack
 
Packing for the Web with Webpack
Packing for the Web with WebpackPacking for the Web with Webpack
Packing for the Web with Webpack
 
Web Applications with AngularJS
Web Applications with AngularJSWeb Applications with AngularJS
Web Applications with AngularJS
 
A New Vue for Web Development
A New Vue for Web DevelopmentA New Vue for Web Development
A New Vue for Web Development
 
Drupal point of vue
Drupal point of vueDrupal point of vue
Drupal point of vue
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
 
006. React - Redux framework
006. React - Redux framework006. React - Redux framework
006. React - Redux framework
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
 
Module design pattern i.e. express js
Module design pattern i.e. express jsModule design pattern i.e. express js
Module design pattern i.e. express js
 
Building and Managing Projects with Maven
Building and Managing Projects with MavenBuilding and Managing Projects with Maven
Building and Managing Projects with Maven
 
Vue, vue router, vuex
Vue, vue router, vuexVue, vue router, vuex
Vue, vue router, vuex
 
Javascript Bundling and modularization
Javascript Bundling and modularizationJavascript Bundling and modularization
Javascript Bundling and modularization
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack Introduction
 

Destaque

Statsground: The First 9 Months Retrospective
Statsground: The First 9 Months RetrospectiveStatsground: The First 9 Months Retrospective
Statsground: The First 9 Months Retrospective
Rogier van Duyn
 
Press Releases Business Development
Press Releases Business DevelopmentPress Releases Business Development
Press Releases Business Development
jdouglass2
 
Hotpots practice for_ced
Hotpots practice for_cedHotpots practice for_ced
Hotpots practice for_ced
Joan Ripoll
 
Statsground Introduction
Statsground IntroductionStatsground Introduction
Statsground Introduction
Rogier van Duyn
 
ตารางสอบกลางภาค156
ตารางสอบกลางภาค156ตารางสอบกลางภาค156
ตารางสอบกลางภาค156
Npr Punsiri
 
22 cross bordner-knowledge-transfer
22 cross bordner-knowledge-transfer22 cross bordner-knowledge-transfer
22 cross bordner-knowledge-transfer
LTGnetrade
 

Destaque (10)

Statsground: The First 9 Months Retrospective
Statsground: The First 9 Months RetrospectiveStatsground: The First 9 Months Retrospective
Statsground: The First 9 Months Retrospective
 
Press Releases Business Development
Press Releases Business DevelopmentPress Releases Business Development
Press Releases Business Development
 
Hotpots practice for_ced
Hotpots practice for_cedHotpots practice for_ced
Hotpots practice for_ced
 
Asia Map Powerpoint Map - SlideWorld
Asia Map Powerpoint Map - SlideWorldAsia Map Powerpoint Map - SlideWorld
Asia Map Powerpoint Map - SlideWorld
 
Justin deskin
Justin deskinJustin deskin
Justin deskin
 
Justneed.ppt
Justneed.pptJustneed.ppt
Justneed.ppt
 
Best Practices Mobile Web: Il "Tap" è il nuovo "Click" @ Codemotion Roma
Best Practices Mobile Web: Il "Tap" è il nuovo "Click" @ Codemotion RomaBest Practices Mobile Web: Il "Tap" è il nuovo "Click" @ Codemotion Roma
Best Practices Mobile Web: Il "Tap" è il nuovo "Click" @ Codemotion Roma
 
Statsground Introduction
Statsground IntroductionStatsground Introduction
Statsground Introduction
 
ตารางสอบกลางภาค156
ตารางสอบกลางภาค156ตารางสอบกลางภาค156
ตารางสอบกลางภาค156
 
22 cross bordner-knowledge-transfer
22 cross bordner-knowledge-transfer22 cross bordner-knowledge-transfer
22 cross bordner-knowledge-transfer
 

Semelhante a Zk doc1

Semelhante a Zk doc1 (20)

Lect06 tomcat1
Lect06 tomcat1Lect06 tomcat1
Lect06 tomcat1
 
Tomcat server
 Tomcat server Tomcat server
Tomcat server
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
 
Knolx session
Knolx sessionKnolx session
Knolx session
 
Liferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for DevelopersLiferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for Developers
 
treeview
treeviewtreeview
treeview
 
treeview
treeviewtreeview
treeview
 
Session on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaSession on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh Gundecha
 
Weblogic Console Customization labs
Weblogic Console Customization labsWeblogic Console Customization labs
Weblogic Console Customization labs
 
Weblogic 12c Graphical Mode installation steps in Windows
Weblogic 12c Graphical Mode installation steps in Windows Weblogic 12c Graphical Mode installation steps in Windows
Weblogic 12c Graphical Mode installation steps in Windows
 
12c weblogic installation steps for Windows
12c weblogic installation steps for Windows12c weblogic installation steps for Windows
12c weblogic installation steps for Windows
 
AJppt.pptx
AJppt.pptxAJppt.pptx
AJppt.pptx
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to Jquery
 
Developing Series 40 web apps with Nokia Web Tools 2.0
Developing Series 40 web apps with Nokia Web Tools 2.0Developing Series 40 web apps with Nokia Web Tools 2.0
Developing Series 40 web apps with Nokia Web Tools 2.0
 
Jsp and jstl
Jsp and jstlJsp and jstl
Jsp and jstl
 
Camel as a_glue
Camel as a_glueCamel as a_glue
Camel as a_glue
 
Embedding Oracle Weblogic Server 1871199
Embedding Oracle Weblogic Server 1871199Embedding Oracle Weblogic Server 1871199
Embedding Oracle Weblogic Server 1871199
 
Oracle autovue
Oracle autovueOracle autovue
Oracle autovue
 
Unlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin ArchitectureUnlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin Architecture
 
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
 

Último

“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
Muhammad Subhan
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 

Último (20)

1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 

Zk doc1

  • 1. ZK Framework (http://www.zkoss.org/) Rupalli Das Developer MESTECH Services Pvt. Ltd Phone No: 8446309467
  • 2. What is ZK ? • ZK framework is a highly productive open source Java framework for building amazing enterprise web and mobile applications. • ZK's architecture is based on units of modularization which are pluggable and replaceable, enabling developers to extend and customize. • ZK uses ZK User Interface Markup Language (ZUML) makes the design of rich user interfaces as simple as authoring HTML pages. ZUML is a variant of XUL inheriting all features available to XML, and separates the UI definition from the run-time logic. • ZUML also allows developers to automate CRUD between UI components and the data source with annotations, data binding and MVVM. • The main idea behind ZK is to introduce event-handling programming to web applications. • ZK refers to the description language as "ZUL." System requirements : • JRE version 1.4 or later • A Web server supporting Servlet 2.3 or later
  • 3. How to use the ZK framework ? • To use the framework, copy libraries from the ZK distribution (directories dist/lib and dist/zkforge) into a directory WEB- INF/lib in your project. Then configure file web.xml by defining: a) A servlet for handling requests for displaying new pages. b) A servlet for intercepting events that happened on the pages. c) A listener for performing cleanup work after session timeout. d) The servlets zkLoader and auEngine (Listing One) are responsible for "double-track" service of HTTP requests arriving from a browser.
  • 4. <?xml version="1.0" encoding="UTF-8"?> <web-app id="ZKdemo" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>ZKdemo</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.zul</welcome-file> </welcome-file-list> <servlet> <description>ZK loader for evaluating ZK pages</description> <servlet-name>zkLoader</servlet-name> <servlet-class>org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class> <!— Must. Specifies URI of the update engine (DHtmlUpdateServlet). —> <init-param> <param-name>update-uri</param-name> <param-value>/zkau</param-value> </init-param> <load-on-startup>1</load-on-startup><!— MUST —> </servlet>
  • 5. <servlet> <description>The asynchronous update engine for ZK</description> <servlet-name>auEngine</servlet-name> <servlet-class>org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>zkLoader</servlet-name> <url-pattern>*.zul</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>zkLoader</servlet-name> <url-pattern>*.zhtml</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>auEngine</servlet-name> <url-pattern>/zkau/*</url-pattern> </servlet-mapping> <listener> <description>Used to cleanup when a session is destroyed</description> <display-name>ZK Session Cleaner</display-name> <listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class> </listener> </web-app>
  • 6. Create a new ZK Project • Click [File]/[New]/[Other...]/[ZK Project] in Eclipse main menu. • Type the project name. Eclipse will automatically include the default ZK package configured in the ZK Package preferences, however, you can select any other installed ZK package by selecting it from the combo box. Then, click Next. • You can modify the Source folders and Default output folder if you like. Then, click Next. • You can modify Context root or Content directory if you like. Then, Click Finish. • After clicking Finish, the New Project Wizard will setup the ZK Project ready for development. • [you will find a top right icon includes a ZK mark to show that the project has ZK Studio support]
  • 7. Creating a New ZUL File • You can create new ZUL file using the [File]/[New]/[File] command in Eclipse's main menu. • However, you have to write the ".zul" extension yourself and the newly create zul file will not contain any template code. • Click [File]/[New]/[Other] in Eclipse's main menu and then using the wizard to filter zul. Select zul from the listbox and then click Next. • Type the file name and optional page title name, click Finish. • The newly created ZUL File will be opened in ZUL Editor.
  • 8. Running the ZK Project • Configuring Apache Tomcat for Eclipse – You are required to create a valid Apache Tomcat Server configuration. Configuration of Apache with Eclipse is done in the Server/Runtime Environments preference page. • To create a server instance to run a web application the server needs to be defined.
  • 9. EXAMPLE FOR DESIGNING COMBOBOX • <hbox pack="center" align="top" width="100%" height="400px"> <div height="278px" width="443px"> <separator spacing="40px" /> <hbox width="440px> <vlayout> <separator spacing="20px" /> <label value="Color/> <combobox id="cmbColor" width="150px"> <comboitem label="@load(each)“ image="@load(vm.getIconImage(each))" /> </combobox> </ vlayout> </hbox> </div> • </hbox>