I would create a QuestionGroup object, which contains an array of questions.
Then, you could populate it by category, who posed it, who answered it, etc.
So, in theory, you could select all questions about food posed by BenB and
answered by Candace.  You could also simply populate it with everything, or
nothing, or whatever.  Kind of a recordset for questions.

I would also create types Answer and AnswerGroup so you could do the same
thing.  A QuestionGroup contains a Question which contains an AnswerGroup
which contains specific Answers to that Question.

Make sense?


--  Ben Doom
    Programmer & General Lackey
    Moonbow Software, Inc

: -----Original Message-----
: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
: Sent: Wednesday, April 02, 2003 2:10 PM
: To: CF-Community
: Subject: OOCF, CFCs and the questionnaire app
:
:
: Ok,
:     The boss and I are using the questionnaire app to expand our skill set
: some during lunch.  We are looking at how to objectify it, what methods to
: have, what might be good to break into a web service.  During this process
: several questions have arisen.
:
: 1. Why the hell won't CF 5 close my CFMX tags like cfcomponent or
: cffunction? I know I am being lazy but so what.
:
: 2.  How do you break up things that deal with one of an object
: (getQuestion()) and deal with several instances at once
: (getQuestionsByCat())?  Say I want to list all the questions in a
: category.
: Is that properly a method of the question object, or do I need a category
: object?
:
:     So far we have decided on the following objects and methods
:
:     User
:         newUser - constructor, will be used after login to create as a
: session object that will go through the site with the users credentials,
: basically just a db query to pull the users info and check the login
:
:         getUser - used to look up users, say in an address book
: like manner
:
:         setUser - input new user info, used for registration.  Should this
: be broken up more in to things like setAddress, setEmail?  Also can your
: override functions in CFMX?  I guess I could get the same effect just by
: doing some conditional work inside the method right?
:
:         addQuestion - enter a new question.  Question would still
: need to be
: approved by an administrator - calls question constructor??
:
:     Administrator - extends user
:         newAdministrtator - constructor - called if the user has admin
: rights.  What's the way to make this happen in the newUser constructor
: automatically?
:
:         approveQuestion - Approve a user entered question
:
:         approveUsers - Approve a new user application. Figured
: make it so it
: can handle many users at once.  Should it be for a single user
: and then just
: something you do many times?
:
:         getNewUsers - Gets the listing of new user application
:
:     Question
:         newQuestion - question constructor
:
:         getQuestion - pulls a specific question
:
:         getAnswers - pulls the answers for a specific question
:
:         getAnswersByUser - pulls a users answers
:
:         getQuestions - list of all questions
:
:         getQuestionsByCategory - pulls questions by category
:
:         answer - answer a question
:
:         setCategory - set the questions category
:
:         setQuestion - edit/enter a question
:
: I guess that's about it.  See anything I am missing?  Am I
: putting anything
: in the wrong place?
:
: Timothy Heald
: Overseas Security Advisory Council
: U.S. Department of State
: "that the free Constitution, which is the work of your hands, may be
: sacredly maintained" - George Washington, Farewell Address 1796
:
:
: 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=5
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=5
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
                                

Reply via email to