Feedback on JDNC and my framework
I'm very excited that JDNC (finally) came out, over the years I had to write most of these things for practically every project I worked at (I'm a consultant so sometimes I can't take code from one project to the next).
I have a framework implementation with some features that are not available (yet) in JDNC and I'll be very happy to contribute and even assign copyright/license as needed to get code into the tree, but I might be a bit stressed in time to merge stuff myself.
If there is any interest then let me know how I can contribute.
Anyway I have some comments on the structure of JDNC:
1. Its great that JDNC is divided so that JNTable does not derive from table. However the approach of maintaining the whole "component hierarchy" and layout management immediately visible is a bit problematic.
My solution in the framework was to use what I dubbed as templates (yes I stole the idea ;) the template is an interface whose implementer makes sure to layout a panel appropriately, you just assign roles to components and send them to the template that will produce a well laid out container.
This is very powerful since an advanced Swing user can implement several templates and layout logic can be reused. Templates can be nested, but it is much simpler and the hierarchy is not tree like as in the component/container hierarchy. I generally found templates to be much simpler and implemented correctly they can allow JDNC to create its own hierarchy and encapsulate the huge Swing/AWT API.
2. The table implementation needs some work for at least some of our customers to use it:
a. Different data types in a single column is very common (a "sum" or "total" row is very common).
b. Validation in "real world" tables is so complicated I just disabled table editing in our current framework version. Powerbuilder allows you to place constraints on losing focus and exiting row/cell etc... Thus allowing you to force a user to enter the correct data even in cyclic dependencies. I can't say I'm crazy about this myself but some "ex" powerbuilder users were on my case quite often about table validation and it was quite hard.
3. Image/Icon managers will be quite useful.
4. I saw no mention of i18n or BiDi.
5. What about a harness application? This way the developer doesn't have to implement main() etc... and gets things such as progress indicator, menubar, toolbar etc...
There can be several simple harness applications and the developer can override a method such as createFileMenuEntries()... to customize the application.
6. How will JDNC be packaged? Right now I see a single JavaDoc so I assume a single Jar. However since JDNC is layered it should probably be split up both for the sake of JNLP applications and for developers that don't want to use all the layers of JDNC.
7. I noticed Swing worker was incorporated which is nice. However since this framework has a layer targeted at beginners maybe a few calls to isSwingThread() that could result in an exception would be a good idea? Also how about incorporating something like foxtrot?