# zk10FL integration with springboot

wastemails
130 1 2

zk10 looks very good, Please share how to integrate with spring boot also

delete retag edit

## 3 Replies

MDuchemin
2146 1 5

Oh yes, absolutely. If you want to switch the ClientBindComposer project-wide, there will be a library property to set in zk.xml for that.

If you had a chance to check-out the smalltalks, the performance test project explains how to do so in its readme file: https://github.com/zkoss-demo/zk10-performance-test

Same warning as per previous post: The features are still in development, so I'd recommend waiting for the stable release, as there might be updates to the APIs or configuration from here to release.

There are some limitations on the structures that can be transformed from the default BindComposer to the ClientBindComposer. You can definitely test it out, but if you encounter exceptions while testing, I'd recommend keeping an eye out for the later article explaining how to optimize the MVVM structures for client-side MVVM

wastemails
130 1 2

Thankyou, is it possible to configure "org.zkoss.zephyrex.bind.ClientBindComposer" for entire project as default composer instead of writing in each viewmodel?

MDuchemin
2146 1 5

Hey there,

ZK 10 is currently still in development phase. The two projects provided with the recent articles are technology demonstrations, and I'd recommend waiting for the actual tutorial projects before doing integration.

Which feature do you plan on testing in a spring-boot project?

Client-side MVVM is pretty easy to test, you can start from the zk springboot project demo of your choice, and then just update the ZK version of the graddle / maven build file to the current ZK 10 FL, and the relevant depedencies:

<dependency>
<groupId>org.zkoss.zephyr</groupId>
<artifactId>zephyr</artifactId>
<version>${zk.version}</version> </dependency> <dependency> <groupId>org.zkoss.zephyr</groupId> <artifactId>zephyr-ex</artifactId> <version>${zk.version}</version>
</dependency>
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zkmax</artifactId>
<version>\${zk.version}</version>
</dependency>


Once your project is configured, it's just a matter of switching the default BindComposer on your ViewModel binding with a org.zkoss.zephyrex.bind.ClientBindComposer

<div apply="org.zkoss.zephyrex.bind.ClientBindComposer" viewModel="@id()@init()" ...


For the cloud-native feature, the setup is slightly more complicated. I'd recommend waiting for the tutorial on that one. Not only because of the setup, but also because these features are still under development, and you may need to redo it once the final version is out.

The steps required to use this feature under current FL are: - Setup a zk spring-boot project. - Add the zephyr dependencies - Add the configuration for the new DispacherRichletFilter (which process the StatelessRichlet). Should look like:

FilterRegistrationBean reg = new FilterRegistrationBean(new DispatcherRichletFilter());


Then you'd need to setup the relevant @getMapping in your application to target the Richlets declared in your project.

[hide preview]