Monday, May 23, 2011

ZK vs Vaadin

I have developed a webmail system ZkMail and VaadinMail by using ZK and Vaadin frameworks. I have found some points while development regarding ZK and Vaadin that I want to share.

  • ZK supports XML (zul, zhtml) to create user interface, while Vaadin is based on pure java. JAVA code must be written in Vaadin to create UI.
    So development in ZK is faster than Vaadin as developer can use xml tag, attributes to create user interface.
  • ZK users its own proprietary engine to render user interface. Vaadin uses GWT. So in Vaadin, there are lots of GWT widgets available that can be reused.
  • Vaadin is released under Apache 2.0 license. ZK comes under community edition (limited edition) under LGPL and commercial license for full version. Although, ZK limited edition provides so many features/functionalities that is enough to develop any application.
  • I found Vaadin more reliable than ZK. In ZK some components like FCK editor behavior is random and creates problems which is not possible to debug.
  • Both ZK and Vaadin support custom components. ZK support macro components for that and Vaadin provides com.vaadin.ui.CustomComponent.
  • Both Vaadin and ZK support Drag & Drop support.
  • ZK supports integration with other technologies like spring and others which Vaadin does not provide.
  • Vaadin is integrated into Liferay portal. So Vaadin applications can be easily used in liferay. Whereas there is no official integration of ZK provided with such kind of portal. Although ZK can be integrated with Liferay to be use as portlet with some effort as i have already done.
  • ZK can be integrated in legacy applications (html/jsp based) easily. Whereas Vaadin can not be used with such kind of legacy applications. Such applications should be rewritten entirely in Vaadin. In ZK, html files can be renamed to zhtml to leverage the power of zk in html. We can also include html code into ZK (zul) page easily by using html tag of zul.
  • ZK CE provides robust server push facility based on client polling and commercial edition provides comet based server push. Whereas in Vaadin there is an experimental plugin ICEPush that provides server push. Also ICEPush add-on requires that vaadin application’s url-pattern must be ‘/*’ in web.xml. In other cases it is not working. So we can not use other resources like jsp, html when using the ICEPush add-on.
  • ZK and Vaadin both provide rich theme support. ZK provides ZKThemer by which we can generate different theme. ZKThemer automatically creates/updates CSS and images to generate new theme. In Vaadin no such tool is available. Although there are different themes jar files available in vaadin directory, but those themes are not consistent with the vaadin default theme as applying them modifies layouts/components and do not render the same output as default theme.

So from a user interface perspective, ZK has a rich set of user interface components than Vaadin and it is easy for developers to use. And also from a productivity point of view ZK is best.
Everything in Vaadin is also provided by ZK. But reverse is not true.
The only thing in using Vaadin is that it is based on GWT. There are lots of live applications that are using GWT. So it is proven.
Whereas ZK uses it own proprietary client side for rendering.

For comparison between these frameworks mobile technologies, ZK Mobile and Vaadin Touchkit visit: http://jtechnoprojects.blogspot.in/2012/12/vaadin-touchkit-vs-zk-mobile-vs.html

Reference:
http://books.zkoss.org/wiki/Small_Talks/2006/July/Work_with_Legacy_Web_Applications,_Part_I_-_Servlets_and_Forms
http://books.zkoss.org/wiki/Small_Talks/2006/July/Work_with_Legacy_Web_Applications,_Part_II_-_JSP
http://vaadin.com/directory#addon/icepush
http://www.zkoss.org/product/edition.dsp
http://jtechnoprojects.blogspot.com/p/webmail-system-with-chating-ajax-based.html
http://jtechnoprojects.blogspot.com/p/vaadinmail-webmail-system.html

9 comments:

  1. Thanks for the comparison. We (Vaadin team) will consider including an optional XML declaration for Vaadin also in the future as some prefer it. There are already couple of XML declarations as add-ons in the directory, but no "official" one.

    At the moment one should also note that there is a full blown free visual editor for designing Vaadin UI:s just by drag and drop. It was released last week. In most cases it is even faster than designing in XML.

    Vaadin can be embedded in any page and works well with JSP/JSF systems. You can share authentication detail and pass info by normal java calls. No rewrite necessary. Take a look of the book for "in div" embedding. There is even "remote embedding" called Vaadin XS available in the directory.

    There are a lots of integration tutorials with several technologies (including Spring) at vaadin.com/wiki

    When comparing widgetsets, one should take a deep look into vaadin.com/directory. Our design choice is not to bloat the core widgetset, but instead provide a really smooth and easy extension mechanism through add-ons (built in GWT).

    ReplyDelete
  2. Regarding the last point, there indeed is a powerful theme editor for Vaadin:

    http://demo.vaadin.com/chameleontheme

    You use it by building your look and feel visually, and then download the resulting theme as one JAR file that you just drop to your project.

    You can extend and modify the theme later by hand, if needed.

    ReplyDelete
  3. yes there is a theme editor for vaadin.. but if you are using your own images then you have to manually create/modify your images according to the new theme...

    In ZK, theme tool ZKThemer automatically chnages your application images according to the supplied new theme color... along with its internal images and css...

    vaadin theme support is obviously good... but when i tried some built in vaadin themes from vaadin directory on vaadin application developed using default theme.. then GUI layout is distorted.. means components sizes had been increased and goes out the browser screen sizes which results in the scrollbars...

    ReplyDelete
  4. Thanks for the review. Allow me to correct one thing: ZK's client is based on jQuery. jQuery has far more plugins/widgets to use. http://code.google.com/p/jquery4j/ is an example to integrate jQuery UI.

    ReplyDelete
  5. Vaadin can be Integrated with Spring And Hibernate.I did it .
    jimmyjijo@gmail.com

    ReplyDelete
  6. I am not sure how it can be said that ZK is a proprietary rending engine and GWT is not. GWT is proprietary to Google but opensource licensed under Apache2 opensource license. ZK is proprietary to Potix but opensource licensed under the LGPL opensource license for the standard edition and ZOL opensource license for the pro and enterprise edition. ZOL says if your opensource then no restriction, if you are commerical then speak to us and so long as your not going to compete with us thats fine. Since most businesses use the framework to build some application, not to sell an RIA framework, then there is "no practical difference".

    As folks also point out ZK uses jQuery which has a massive userbase.

    With respect to integrating with Spring and Hibernate checkout my sample app which codes MVC, MVP and MVVM patters and which deploys onto either redhat opensource cloud or heroku java cloud.

    https://github.com/simbo1905/ZkToDo2

    I think the real difference is that ZK comes out of the far east and doesn't get the instant press attention of american or european frameworks so it is the "best kept secret" in the world.

    ReplyDelete
  7. I don't know if ZK is a "secret" coming from the east but i must say that ZK's development cycle is unprecedented.

    ReplyDelete
  8. For developer, i think vaadin is the best, why....
    More easier debug using vaadin, i have use it, I can debug the code for result from client side, can't u debug code like vaadin in other framework ???

    ReplyDelete
  9. Thanks for sharing these points. I have used vaadin and webfirmframework but I haven't used ZK. I will have a look at ZK.

    ReplyDelete