Showing posts with label wicket. Show all posts
Showing posts with label wicket. Show all posts

2009-07-02

Choosing scatter chart library for web application

So I definitely know that I have to make web based UI for medical diagnostic application. It's not so complicated as I initially though. It is a kind of scatter chart that has to display delivered XY data and use as reference some kind of meta data like description, database id etc. Basic functionality of that module is adding and editing points. It should be somehow interactive - like has clickable points that can fire various events. Graph zooming is also needed.

There are articles with list of interesting solutions: 13 useful graphing solutions, 10 Free Chart Scripts. I reviewed few charting libraries that can be divided into three categories:
  • HTML canvas charts
  • Java applets
  • Flash based charts
There where also other interesting ideas like SVG based interactive chart, or image chart with imagemap and added DHTML tricks, but still without enough support and needed writing more code.

Needed charting solutions should be lightweight so I thought about html canvas drawing, but unfortunately there are serious IE issues - It does not implement such feature, so excanvas ActiveX is used not always successfully (new IE changes are breaking excanvas functionality).

Another good choice from point of customization and extending functionality is Java applet based on JFreeChart, or lighter jchart2d library. Using Java applet was tempting. I made some serious applet work some time ago so I had to make some user experience tests of deploying UI as applet. The large group of users has no technical computer background, and can be confused about accepting prompts for Java installation (Java is not preinstalled with system in here), waiting for runtime download and finally for applet initializing. That may cause serious problems with acceptance tests.

So I tried Open Flash Chart 2- the nice flash based chart library. It has fixed but all basic features I need. Flash player is king of the browsers (large deployments ratio) today. That and smaller than Java's runtime should cause less problems with runtime installation. It has wrapper libraries in most popular programming languages including Java. I have choose third party jofc2 library for quite easy integration with code sample from Open Flash Chart and Wicket example.

Open Flash Chart has enough javascript interface, to dynamically change data, graph style, add tooltips and script onclick events on data points. It has no direct zooming support but can be implemented as changing chart properties by adding external scripted controls. Redrawing after data delivery is fast also.

Near future brings even more choices like Silverlight, improved Applet/JavaFX runtime or adoption of canvas like solutions.


Further reading:
Scatter chart library - moving to Flot
Looking for simple python chart library

2008-12-04

Good luck of Wicket beginner with grain of problems

It was worky and little disorganized week. Functional prototype of application I wrote in Wicket is working and waiting for client acceptation. When I decided to use Wicket for that project I have almost no bad feelings about using new framework. Framework looked reasonable and was written using best software patterns and practices. In practice It works indeed.

Because nothing is ideal, I want to share with some problems I have met while charging at Wicket:

  • WicketTester can't load my page resource files - maybe it's a problem with Spring classloader.I have skipped more complicated testing, and made only the simplest TestUnits. It's bad practice, but almost all application features was and will be heavily manual used and checked.

  • Automatic "hot" class deployment - it's problem with Spring classloader and proxying. I've tried to set class reloading only for non Spring managed page classes, but with no luck.

  • Editor in ListView component - problem is finally solved but it took me all day to get it work with validation and all editing features. I have read two books and some tutorials. Where was the answer? I should more carefully read API docs, where the problem of reusing list items is addressed - so remember that editor with validation based on Wicket ListView needs setReuseItems(true) option !

Going back to work.