Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4045

support a dev mode configuration



    • New Feature
    • Resolution: Unresolved
    • Later
    • None
    • 8.5.2
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.6.0 S1


      There are several debug/development related properties:

      • debug-js true
      • org.zkoss.zk.ZUML.cache false
      • org.zkoss.zk.WPD.cache false
      • org.zkoss.zk.WCS.cache false
      • org.zkoss.web.classWebResource.cache false
      • org.zkoss.zk.ui.versionInfo.enabled true
      • <disable-zscript>false</disable-zscript>

      Developers might apply these properties when developing a zk app, we can provide a master property <dev-mode>true</dev-mode> that enables them all at once.

      Functional Spec.

      1. when enabling the dev mode, zk should print info messages to list above properties it applies when a server starts up like:

        Enable ZK dev mode with the following settings:
        debug-js : true
        org.zkoss.zk.ZUML.cache : false

        This can remind developers that such dev mode is enabled.

      2. when enabling the dev mode, zk should override existing property values and enforce dev mode setting values. That means ZK should ignore those property values specified by developers in zk.xml
        for example:
        <!-- ZK ignores the property below for <dev-mode> -->
      3. This overriding way can allow developers keep their production zk.xml unchanged.
        For example, a zk.xml
        production settings... 

        Then just remove <dev-mode>true</dev-mode>, the zk.xml is a production-ready zk.xml. No need to search and remove each debug related property.


      • simplify debug/dev settings, developers don't need to enable them one by one
      • developers can know all debug/dev related properties at once. They can either enable dev mode or configure some of them by themselves.
      • although we can write a doc to list all these properties, a running feature is still much easier to use than reading a doc. Like IDE content assist is always much helpful than static javadoc.


      • org.zkoss.bind.DebuggerFactory.enable is also debug-related. But it prints too much information when enabling it which might


        Issue Links



              hawk hawk
              hawk hawk
              0 Vote for this issue
              1 Start watching this issue