|
|
|||||||
|
I'm not sure why the author had to go with a 'hybrid' solution -- mixing hierarchical data structure with the relational. Wouldn't it be easier to simply implement the solution as a full blown hierarchical data structure? Something like the following: <act:ActionList version='1.0' xmlns:act='http://www.good_thang.net/xmlns/ActionList'> <act:Action type='Question'> <act:Content value ='What type of vehicle did you purchase?'/> <act:Explanation value='Pick your choice'/> <act:AnswerList> <act:Answer value='Car'/> <act:Action type='Question'> <act:Content value ='What type of car?'/> <act:AnswerList> <act:Answer value='Sport Coupe'/> <act:Answer value='Sedan'/> </act:AnswerList> </act:Action> <act:Answer value='Truck'/> <act:Action type='Question'> <act:Content value ='What type of truck?'/> <act:AnswerList> <act:Answer value='Pickup'/> <act:Answer value='4x4'/> </act:AnswerList> </act:Action> <act:Answer value='SUV'/> <act:Action type='Question'> <act:Content value ='What type of SUV?'/> <act:AnswerList> <act:Answer value='Ford Runner'/> <act:Answer value='Passport'/> <act:Answer value='Path Finder'/> </act:AnswerList> </act:Action> </act:AnswerList> </act:Action> </act:ActionList> |
||||||||
|
|
|||||||
|
Using a heirarchical approach it would not be possible to skip over unneeded sections and then continue with the main thread of questioning. Consider for instance, filling out a tax return, where there are whole sections that are not needed for most tax-filers, but everyone needs to fill out a basic set of questions. Although it is more complicated to form questions using the relational view, it is also more flexible. |
||||||||
|
|
|||||||
Quote: You should use hierarchical approach to branch out to the portions that contain relevant information. That way, there is no need to skip anything. For example, if you ask the users to specify whether they are married or not, that decision is going to take them to the different section of the hierarchical document. Same holds for any other point where the questionaire branches out. There should be no need to skip any portions, providing that the hierarchical structure is designed properly in the first place. |
||||||||
|
|
|||||||
Quote:Quote: A hierarchial structure will eventually become redundant and difficult to maintain. Consider the follow: Type of vehichle Car Truck Suv Manufacturer of Truck: Toyota Dodge Ford Manufacturer of Car Toyota Dodge Ford Size of Dodge Truck Dakota Ram Engine of Dodge Truck 4.7 5.9 The two trucks have the same availability for engines. No sense in reproducing an new set of questions for it. The Durango which is an SUV uses these engines as well. Think how far up the page you would have to go looking in an XML file to add the 4.7dual turbo charged engine with widgets attached. Theres many repetitions in questions and answers. Get too big and your going to have to reproduce the same questions over and over and over. I built a product selection application that is a basic questionaire. Heres the features you want and results in a product. Mine was quite a bit more abstracted than this of course. The questions and answers were all normalized. Add the questions. Add the answers. Drag and drop them together and you have a new question. |