zk framework : zul file, pure java or hybrid for better performance -
zk framework flexible web developers. flexibility brings issues. wonder method best performance (memory, time etc.)
1) .zul files, consists scripts :
<vbox> auto-complete combobox: <combobox id="combo" autodrop="true" mold="rounded"/> <hbox> <checkbox checked="true" oncheck="combo.autodrop = self.checked" label="auto drop popup when typing" /> <checkbox checked="true" oncheck="combo.buttonvisible = self.checked" label="button visible" /> </hbox> <checkbox label="use rounded combobox" checked="true" oncheck='combo.mold=self.checked? "rounded": "default"'/> </vbox> <zscript> string[] _dict = { "abacus", "accuracy", "acuity", "adage", "afar", "after", "apple", "bible", "bird", "bingle", "blog" ...
2) pure java like
public class testrenderer { listmodellist model = new listmodellist(); private annotatedatabinder binder; @aftercompose public void aftercompose(@contextparam(contexttype.view) component view) { binder = new annotatedatabinder(view); list persons = new arraylist(); model.add(new person("david", "coverdale")); ...
3) hybrid zk
<window apply="com.synnex.wms.outbound.so.indexviewctrl"> <style> .z-row-cnt .z-label { white-space:nowrap; } </style> <grid model="${model}" rowrenderer="${renderer }" height="300px" width="800px"> <custom-attributes org.zkoss.zul.grid.rod="true" /> <custom-attributes org.zkoss.zul.grid.initrodsize="20" /> <columns> <column foreach="${headers}" label="${each}" width="80px"/> </columns> </grid> </window>
are differ when using different technologies spring? java html parsing faster zul html?
also notice evaluation of el expressions fast, el can used in production system. on other hand, zscript suggested utilize in prototyping or quick-fix. link
so not utilize 1) 2) can faster, slower or fast 3) depends on impl., faster may takes much time , 2) isn't idea. 3) best, cos zul file much more readeable java code , gui logic , gui construction not (that much) mixed up.
to take between mvc , mvvm read this. if think makes sense mix them, there shouldbe no problem framework.
java zk zul
No comments:
Post a Comment