Server-side technology can help you dynamically create the tree data from where ever it comes from, but for the client end, you need a client-side technology.
In my project, the current implementation is to generate the navigation tree on server-side with the JAVA/XML/XSLT. Is that a better solotion?I heard of JAXB, but not sure whether it owns a competative edge on this.
I use a server-side XML / XSLT based solution to build such explorer / tree interfaces. I have the metadata for building the explorer / tree interface in an XML file. Using XSLT I transform the Interface to react to the user interaction.
Client-side java scripts werent a good idea for me, because I have seen how messy it can get when it comes to cross browser issues and the hacks you have to incorporate. Even after all this you can hardly be sure that it works the way you want it.
Unlike client-side "validations", where round-trips can at times prove costly or unwarranted; With these interfaces , along with the change in the "VIEW" of the interface, the client would most of the times require to fetch new content from the server as a response to the change in the tree / explorer view, so it is anyways making a roundtrip..... [ November 11, 2004: Message edited by: Ajith Anand ]
LXI Technologies P Ltd
Joined: Oct 25, 2004
I'm not a fan of Applets either... but was trying to be informational for a change instead of my normally opinionated self :-) I'm new here - gotta keep a good rep ;-)
So with that XML/XSLT solution, you are going to the server even when nodes are only opened to see their child nodes. If the tree is "small" and the server hits are tolerable, or if you have to perform business logic to build out the next level in the tree, then its tolerable.
In most cases I've seen, the logic to determine child nodes is not positional in the tree, but is page or higher scope information dependent (is that a real sentence?). Generally there is no more information required to build out a tree all at once, or one level at a time. In some cases its easier to do it all at once.
Blah, I ramble. The only time a request is necessary in my experience (not saying I can't dream up a case where its not so) is when you click on a leaf node or somehow want to act on the Node other than open and see whats in it.
As we all know there are a dozen ways to skin a cat, the way you decide to do it just depends on what results and side effects you feel you need to maximize.