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