I am creating a new survey module and need to decide whether to make use of Drupal Node system. The current survey module does not meet my requirements. I am looking more towards phpESP kind of solution. The node system seem very convenient in terms of implementation but also seem to be making more calls to the database. Am I correct?

Are there any guidelines of when to use node and when to avoid them? I have seen this topic discuss before, but I was not able to locate it.

Any advice will be greatly appreciated.

Comments

nevets’s picture

First before answering your question I would suggest you consider if the current module could be changed to meet your needs and f so you might approach the current owner(s) and see if they are open to such changes.

As for the question of "to node or not to node", consider there are two parts two your question, the survey and the answers. Lets consider the answer part first where code constructs a set of questions and stores the answers when submitted. The survey form used to gather the answers does not really have the typical attributes of node based content and I would think it better implemented not as a node. You are probably going to want custom access to be able to control peoples access to the survey and I can not come up with a good reason to use nodes for the answers. The one thing that might be a reason is CCK 2 (not here yet) which I understand I suppose to allow us to use CCK fields outside of CCK, one could image a survey builder that uses CCK fields to build the questions and presents the survey as a node, but like I said we are not there yet.

New surveys could be stored as nodes but it is a advanced use of nodes since each survey may have more than one question. Typically in this case the node would represent the common parts of the survey and the details would be stored in an additonal table with each question as a seperate row in that table. You might use nodes in this case in particular if you want to use one of the many modules that allow you to extend an node. Maybe you what to be able to categorize the surveys as an example. So in this the answer might be yes but it could also be no depending on what your goals are.