| In the Forums... |
|---|
|
| ZK 5.0 and FlashChart |
|
|
| Written by gbowerman | |
| Monday, 11 January 2010 | |
|
It's been a while since I've worked with the ZK programming language (or Rich Internet Application framework) so it was nice to get an opportunity to play around with the latest release. To ease myself back in gently I wrote a simple letter frequency analyzer to help with solving ciphers (note this post is not Informix-related for a change).. The current release of ZK is 5.0 RC2, and I notice it is now split up into a free community edition, and commercial professional and enterprise edtions. The free edition no longer includes JFreeChart but fortunately it does include FlashChart which provides basic charting capability and is very easy to use. (Click on the image to view it full size): The program is only about 40 lines so all the code can be self-contained in a single .zul file to be deployed under an app server such as Tomcat. First I'll write the presentation layer which consists of a text box, a button and a chart:
Next comes the Java code that is executed when the "Calculate" button is clicked. This reads the text in the "targetText" texbox, counts the frequency of different letters and feeds it into a chart which is associated with the "chart" FlashChart:
That's it. In my case I created a "freq" directory under my Tomcat webapps path, copied the above code in as index.zul and created a WEB-INF sub-directory as per the ZK Quick Start Guide. Overall I like the look and feel of ZK 5, it is smoother, faster and slicker looking than earlier editions.
Find more about it here.
Find out more about Informix Application Development. Copyright © 2010. All rights reserved. Copyright Discuss this article on the forums. (0 posts) |
| < Prev | Next > |
|---|
| Main Menu | |||||
|---|---|---|---|---|---|
|
| Newsflash | ||||||||
|---|---|---|---|---|---|---|---|---|
|
||||||||
| Ads |
|---|
| Login Form |
|---|


