Question

As one of the features in an in-house testing tool I'm interested in allowing the user to view the fileds' values of Java objects in a graphical way.
So, as far as I understand, the object's class needs to implement Serializable -and according to Effective Java book, preferably the custom form of the read/write methods.

This way I can use the serialized version of the objects as input for the viewer (this is more for after-run comparisons and regression-type comparisons with other runs rather than run-time viewing)

  1. How does one go about implementing something like this,especially as I have close to zero experience in developing Java GUI applications?

  2. Are there any relevant frameworks available-both for GUI as well as for the object-visualization part?

Thanks a lot!

Was it helpful?

Solution

I've used XStream for years and it's performance has been great both in flexibility and speed.

But, if you're going web, then something like Tapestry 5's bean components (BeanDisplay, BeanEditForm and friends) are definitely worth a quick prototype these has been very good friends also.

OTHER TIPS

1) I would use XMLEncoder (http://download.oracle.com/javase/1.4.2/docs/api/java/beans/XMLEncoder.html)

2) I would try to use something similar to UML (as it is a well understood standard

However, does it have to be in Java GUI? If this was a web-application, then using the XML outputter, you could use some reasonably simple XML Stylesheets (XSL) over the XML to produce the output.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top