ChanwitDr.Chanwit Kaewkasi

  • Software Engineer, Creator of ZKGrails & Lecturer at Suranaree University of Technology.
  • 19+ years experiences in software writing
  • Obtained PhD degree in Computer Science from the University of Manchester in 2010
  • Indulged in the research of virtual machine development, compiler and programming languages and software framework development in recent years

Q: Firstly, please give us a brief introduction of ZKGrails?

ZKGrails is a plug-in for the Grails framework. It basically adds the ZK functionality atop the Grails stack. Grails is a full-stack Web development framework that uses the concept of convention-over-configuration and the DRY principle. It uses Groovy as a main language, but it naturally inter-operates with Java. Grails features a very cool ORM tool, called GORM, built on Hibernate. Grails itself is also based on the Spring container. ZKGrails integrates ZK into the Grails infrastructure so you can use Grails features with ZK as views. With ZKGrails, you can get your first data-driven, say Spring + Hibernate, ZK application running with just a few commands.

Q: What role does ZK play in ZKGrails? 

ZK is used as views in ZKGrails. Normally, Grails uses the front-controller style MVC, but ZK is different – ZK is a server-side and page-centric, and this is very important.  ZK simplifies the programming model of the Grails’ web layer. You can just create a domain class, which is a Hibernate object, a service (a Spring Bean) to control transactions and a composer (also a Spring Bean) to control views. Wire them together, and it’s done.

Q: What was the driving force that made you start this project? How did you start this project? Where did the original idea come from?

The motivation was that I was finding a way to create a desktop-like Web application. ZK was one of my choices at the time. I am also a fan of XML-based UI technologies, especially the XUL box model so I decided to have a look at ZK.

Then I started to study how ZK works back in April 2006 and wrote one of the very first ZK’s small talk articles, which Henri (Chen) was kindly enough to edit and published it. The small talk was about the data-binding implementation whose concept has been greatly improved later by Henri to be today’s ZK annotation data-binder.

After that, I had been hacking Grails and help the team testing its plug-in architecture. So I hadn’t touched ZK for a while. In 2007, Island Chen created and released the first version of ZK plug-in. Later in 2008, just after Grails 1.0.3 has been released, I contacted Island to send a patch and asked to help if he’d like to revive the project. He decided to hand over the project to me. I then took some times to rewrite several parts and finally be able to release it again as ZKGrails 0.5 on Google Code in August 2008 which was my first version of ZKGrails.

Q: What was the greatest challenge that you encountered when creating ZKGrails?

One of the greatest challenges is integration smoothness. Grails provides a dynamic plug-in architecture and it will be a failure if I could not leverage its outstanding features for ZKGrails.

Another challenge is how to concretize best practices, for example the MVC or the MVVM patterns, atop ZKGrails. For the MVC model, I think ZKGrails already offers a great way to write an RIA using ZK’s composer classes as Spring Beans. In the new coming version of ZKGrails, however, MVVM will be supported natively as a part of the plug-in.

Q: What do you think is the greatest value of ZKGrails?

From the user-perspective, ZKGrails can provide a fast development experience to create RIAs. Although there is no scientific measurement of how fast you may gain from using it, but I have confidence that it is one of the most rapid tools to develop enterprise RIAs you can find in the market today. To me, I am also a ZKGrails user myself.

Q: Lastly, what prospect do you have in ZKGrails?

ZKGrails currently has been accepted as one of leading choices when people in the Grails community looking for an RIA solution. On the other hand, it’s a stack that people from the ZK community will be asking for when they want a faster way to develop Spring and Hibernate applications.  This is just great and invaluable. I really appreciate it. I’ll continue to do my best on maintaining and delivering features that hopefully will be useful for both ZK and Grails worlds.


If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Reply