just having a hard time believing you database speeds will be much
faster if at all.
A major issue I have with this type of solution is that your view is
buried now in stored procedures. The application will be locked into
using HTML for display. Let alone this XML solution wouldn’t work at all
for a Flash front end. How many designers do you know who will work
within stored procedures?
Using XML this way is not for every application -- but when you have an
application with a lot of similar inserts and selects this is a viable
option in the toolkit.
Where are you seeing these similar inserts and selects? If a standard
quiz has a pool of say 50 questions. Only 25 are display in random
order. Multiple choice questions have their answers displayed in random
order. A student takes this test, but you are only saving the 25 answers
they selected. It would be very rare for one users database result and
insert to match up with anothers.
Why not just create a quiz object, populate it with a stored procedure
call and throw it into application scope? You hit the DB only once to
create the initial object, and then once each time you save the results.
Then you are open to trow a façade in between the object and the display
to port to Flash, HTML or whatever.
How is CF still not parsing XML? It would have to parse the XML to get
to the HTML within.
Adam Wayne Lehman
Web Systems Developer
Johns Hopkins Bloomberg School of Public Health
Distance Education Division
-----Original Message-----
From: Jeremy Brodie [mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003 1:04 PM
To: CF-Talk
Subject: Re:Quiz builder?
Adam,
One of things you can do within SQL server 2000 is build the HTML for
the checkbox, radio buttons and select options directly in the database
without CF having to parse the information. ( I think this is possible
within Oracle 9i as well-- the commands and techniques are different)
To see why this could be an easier process let's take a look at the
alternatives.
Requirements:
1) You need to answser 20 questions, they of any form type
2) Users need to save the information for later... i.e they can take the
quiz and go back an hour later
3) Your administrative section needs to provide a interface allowing
quiz questions to be added, modified and deleted. You also need to weigh
the questions as well for scoring purposes.
4) You need to provide quiz administrators with reporting on the users
results
Quiz creation
a) Non XML way: Based upon a selection you will need to querry the
database for questions and answers. Pulling the answers from a single
query (and mulitple joins) you'll check if there are more than one
record in the database query. If there its a checkbox, radio list or
select box, then you will need to supress the question and provide the
user with the answer.
b) Using XML, on the database side, configure the XML query so you are
pulling direct HTML (there is no processing on the CF side, it just
pulls whatever provided by the database). If there is no answers then in
the stored proceedure write out the Textbox or input tags directly. For
radio buttons, check boxes and select lists, created a nested XML
structure containing the questions and the answers outputting the
information as straight HTML (so the XML would be your option or input
tags).
Quiz display
For displaying answers for each question the NON-XML method would
involve running two querries-- one against a reporting database and the
other against the question list. CF would then compare the results to
see if we need to merge the two items. Even if we were doing one
question at a time and saving the question number, as in a pool of
question, this would still involve querrying the entire database every
time (or be a drain on resources of a lot of people were using Q of Q
functionality to do the same).
Using the XML way (in SQL server 2000), create a table object containing
the questions and the correct answer. This way the output can contain
the answer or checked box as needed. By using database functions to
randomize and pool the functions, one can reduce the laod on the
database server while also easing the parsing by using XML.
Inserting answers into the reporting database
Inserts work in the same way-- by placing the data into a table datatype
one can quickly move information into the database (obv.. you'll place
the the document into the proper format by turing the results into XML),
into the right fields 20 questions at a time-- this way the database
does not have to process 20 insert questions at a time -- less chance of
a deadlock if you have quite a number of customers on the site.
You'll note that I could of saved the user's information as a session
variable and choose not to do it this way. Even using a structure to
determine the question answer pair -- a customer taking the quiz could
not take the quiz later on without taking the whole quiz again!
Take a look at the presentation link (the example presented was your
employee skills application at Hopkins)-- by moving much of the
processing to the database and not parcing the XML (instead one created
the XML using direct HTML)one can create quizes with question pools and
a random display-- instead of CF functions, this is now handled by
database functions.
Using XML this way is not for every application -- but when you have an
application with a lot of similar inserts and selects this is a viable
option in the toolkit.
Jeremy
>I don't see how XML would really help. You're still having to run
>complicated queries to generate the XML, then asking CF to parse. In
>most quiz applications a random display and question pool is common so
>caching the xml wouldn't be beneficial either.
>
>What am I missing here?
>
>Adam Wayne Lehman
>Web Systems Developer
>Johns Hopkins Bloomberg School of Public Health
>Distance Education Division
>
>-----Original Message-----
>From: Jeremy Brodie [mailto:[EMAIL PROTECTED]
>Sent: Friday, December 19, 2003 12:56 PM
>To: CF-Talk
>Subject: Re:Quiz builder?
>
>Joe,
>
>If you're looking to build one from sratch you might want to take a
look
>at using XML to send and retieve information from the database.
>Christopher Lomvardias has a good presentation on this subject at
>http://www.cfug-md.org/talks/mdcfug_2003December.ppt. Its a bit heavy
on
>the database site, however, doing it this way will save a lot of time
>building the application.
>
>He does a great job explaining how this would work for a situation such
>as yours. (and doing it this way will save a tremendous amount of
code--
>doing it without XML would involve complicated querries and quite a bit
>of CF logic to display the page properly!)
>
>Bascially, the hard part of creating any quiz is generating the
>checkboxes, radio button and the select lists -- and generating XML is
a
>clean fast way of moving this information in and out of the database,
>espcally if you have 20-30 questions in your quiz. On the creation
side,
>you might want to look at using a bit of _javascript_ to add the elements
>you'll need to add checkboxes, select lists and radio buttons.
>
>Jeremy Brodie
>Intelix
>an Edgewater Technology Solutions Company
>
>web: http://www.edgewater.com
>phone:(703) 815-2500
>nasdaq symbol: EDGE
>
>
>>I've been looking for a nice quiz/test builder for an online course
>system
>>i'm working on and can't seem to find one, at least not one for
>ColdFusion.
>>Anyone come across anything like this? I'd rather buy some open code
>than
>>write it myself, too many other things to work on right now. Most of
>what i
>>see out there are poll generators though, nothing for quizzes or
tests.
>>
>>If you know where i can find it, or would like to sell what you've
>made,
>>please contact me. Thanks!!! ... .joe
> _____
>
>
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]