Development-time Best Practices"

From Documentation
(Created page with "{{ZKDevelopersReferencePageHeader}} There are several settings below we recommend you to specify during development time that can improve your developer experience. They can ...")
 
Line 8: Line 8:
  
 
= Separate zk.xml for Developement=
 
= Separate zk.xml for Developement=
 +
Put these development-time settings in a separate file, so that you can easily remove it for production in the future.
  
 +
'''zk.xml'''
 
<source lang='xml'>
 
<source lang='xml'>
 
     <library-property>
 
     <library-property>

Revision as of 02:29, 16 November 2018


DocumentationZK Developer's ReferenceDevelopment-time Best Practices
Development-time Best Practices




There are several settings below we recommend you to specify during development time that can improve your developer experience. They can show you more debugging information and reload a zul page to get the latest change without restarting a server.


Separate zk.xml for Developement

Put these development-time settings in a separate file, so that you can easily remove it for production in the future.

zk.xml

    <library-property>
        <name>org.zkoss.zk.config.path</name>
        <value>/WEB-INF/zk-dev.xml</value>
    </library-property>


zk-dev.xml

	<system-config>
		<disable-zscript>false</disable-zscript>
	</system-config>
	<!-- show debug information -->
	<client-config>
		<debug-js>true</debug-js>
	</client-config>
	<library-property>
		<name>org.zkoss.zk.ui.versionInfo.enabled</name>
		<value>true</value>
	</library-property>
	<!-- disable various caches -->
	<library-property>
		<name>org.zkoss.zk.ZUML.cache </name>
		<value>false</value>
	</library-property>
	<library-property>
		<name>org.zkoss.zk.WPD.cache</name>
		<value>false</value>
	</library-property>
	<library-property>
		<name>org.zkoss.zk.WCS.cache</name>
		<value>false</value>
	</library-property>
	<library-property>
		<name>org.zkoss.web.classWebResource.cache</name>
		<value>false</value>
	</library-property>
	<library-property>
		<name>org.zkoss.util.label.cache</name>
		<value>false</value>
	</library-property>



Subsections:



Last Update : 2018/11/16

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.