Ivar B. Jessen
2004-01-24 18:05:38 UTC
The following reports some problems in dQuery which are related to its design
and not to specific coding errors. If this is the wrong group please move it
to a more suitable place.
In attempts to make dQuery work I have noticed that dQuery and especially its
wizards do not follow the MS Guidelines for designing Wizards and the end
result is that dQuery is experienced as a very user unfriendly application.
Definition of a wizard:
A wizard is a series of presentations or pages, displayed in a secondary
window, that helps the user trough a task. The pages include controls that you
define to gather input from the user; that input is then used to complete the
task for the user.
Especially the following items from the Guidelines are important:
A) Design your wizard pages to be easy to understand. It is important that
users immediately understand what a wizard is about so they don't feel like
they have to read it very carefully to understand what they have to answer.
B) Make certain that the design alternatives offered by your wizard provide
the user with positive results. You can use the context, such as the
selection, to determine what options may be reasonable to provide.
C) Avoid a wizard design that requires the user to leave the wizard to
complete a task. Less experienced users are often the primary users of a
wizard. Asking them to leave the wizard to perform a function can make them
loose their context. Instead, design your wizard so that the user can do
everything from within the wizard.
D) Make certain that it is obvious how the user can proceed when the wizard
has completed its process. This may be accompliced by the text you include on
the last part of the wizard.
Example 1) The user wants to create a simple query from the Fish table.
As an example of a typical wizard in dQuery press the button 'Create a SQL
Query'. A window opens and the text promises that "This wizard allows you to
create a Query with columns and rows by writing a SQL Select statement. A SQL
Select statement allows you to define which rows and columns you wish to
retrieve".
We want to retrieve all columns and rows and with that in mind proceed with
the default selection 'Create a Query from a single Table', which in the next
window displays a list of databases. By careful reading we find that if our
database is not in the list we have to leave the wizard. Why is that? This is
not userfriendly. It should be possible to proceed without leaving the wizard.
Why didn't the wizard in the first page open a window from which one or more
tables could be selected, and if necessary also databases?
Continue by selecting database 'dBASESamples' and table 'Fish', we now se a
checkbox and a disabled mover. It is not clear what to do next, careful
reading is again required. The first impression is that we can't select
individual columns at all and need to uncheck the checbox in order to select
all columns. It would be much better to remove the checkbox and let the user
see a live mover where he can make a selection.
Click Next and get an info page with a single radio button which can not be
deselected (What is the purpose?).
(Bug here, click the 'Back' button all the way to the first page of the wizard
and then go forward again, when you reach the info page the single radiobutton
has disappeared, click next and get error:
Error: Variable undefined: NORMALOBJECTCOLOR
File: qDialog.cc
Routine: QEXPRESSION::ENABLEBUILDCONTROLS
Line: 845 )
Click Next and get a page where it is possible to limit the rows in the query,
but when we started out we were promised the wizard could create a query with
columns and rows which we could select, but nobody said that the rows needed
to be limited.
The only buttons working are 'Back' which doesn't solve the problem, 'Cancel'
which will make us loose all the work done until now, and 'Help' which
indicates that help is not installed. In other the wizard gave us a choice,
specified what we ccould get and is now unable to deliver. The worst thing is
that it knew all the time that it couldn't make a simpel query containing all
columns and rows in a table.
It is of course possible to continue by setting a condition like 'ID is not
Empty', but this just underlines that the wizard is simply not doing its job,
which is to allow the user to create a simple query. A wizard should _never_
spring a surprise like this on an unaware user and give him the feeling that
he has just wasted time which could have been used better.
If a condition is selected the wizard finishes with a query on the design
surface.
Example 2) The user wants to export the Fish table to an Excel file.
Select File->Export Wizard... and read the text carefully. From the second
paragraph we learn that we need to set up a Custom View, whatever that is; let
us hope that the wizard knows.
The third paragraph tells us that if the Custom View button is disabled, we
need to set one up. The button may be the same as depicted to the right of the
text, however clicking on any button in dQuery just gives a 'ping!', nothing
is enabled. Again we have to belive the wizard can solve this problem.
Reading on we understand we have to cancel the wizard and use the Custom View
Wizard on the Tool Panel. So click Cancel and Yes to an unneccessary
messagebox and start looking for a Tool Panel. Put the mouse cursor over the
each of the twelve pushbuttons to see if they give access to a tool panel,
then click all the menu items and the buttons below the menu, still no Tool
Panel.
Give up on the Tool Panel and try clicking on the button 'Custom View Wizard',
bingo a Custom View Wizard opens, click Next and get an emty mover. Deep
disappointment, click Next, get error:
No Fields Selected
You must select at least one field.
This indicates that the designer of this wizard has not understood that it is
not allowed to use error messages in a wizard. If the wizard needs anything to
fill the mover it is the job of the wizard (and the programmer) to open
whatever pages, windows og dialog boxes to get the necessary information.
Give up on this wizard, we obviously got a wrong advice from the previous
wizard. Let us go back and start all over again <sigh>
Select File->Export Wizard..., ignore the text, click Next and select Excel
Spreadsheet, Next, click folder button and get msgbox:
No current Query
"Current Query" not available. There may be no active query in your
dataModule.
Hmm, doesn't the wizard know or is it too lazy to take a look? Click Ok and
select a file name in the getFile() dialog box which opens, Save, Next, Finish
and get the same msgbox as before.
How is it possible that we can get that far? This wizard is not doing its work
at all. Instead of checking if a table is available it let us jump through all
the hoops and comes up with said messagebox which, if you press Ok, is
followed by an error:
Error: Data type mismatch. Expecting Object
File: qDialog.cc
Routine: GENERICFIELDTYPES::GENERICFIELDTYPES
Line: 3397
If the fish table had been placed on the design surface before the wizard was
started and the computer did not have Excel installed, the wizard would have
taken the user through all the steps of selecting the type of query, the file
format, the name of the destination file and checking if Excel should be
opened or not, and then it would come up with a message box declaring that
Excel was not found.
It is a large misunderstanding if the designer of this wizard believes that it
is justified to end up with an error message and dump the user. We are not
talking about a coding error, but a message which the programmer found
necessary because he couldn't continue. And why did he paint himself into this
corner? He simply neglected to check for the existence of Excel before he
opened the page which allowed selection of export to Excel.
And why is it necessary to open a database connection in order to export a
simple table to *.xls. Let the user select his table and when the export is
finished tell him that if he needs to repeat the export from time time he
should select a database, for example a LocalDatabase ( "." in the BDE) and
save the setup as a dmd, ie only require and carry out the steps that are
necessary to serve the users purpose.
Example 3) The use wants to make a Join between two copies of the Fish table.
Click button 'Create SQL Query', select 'Create .. Join ..', Next, get a page
telling you that the wizard will launch Create SQL Object, whatever that is,
and the SQL Designer. Click Finish and a gray form opens. The upper
radiobutton is selected and the entryfield is grayed out, click on the folder
icon, a getFile() dialogbox opens, now type the name you want your new sql
file to have, click open and get error saying that the file can not be found.
Why does the wizard allow a selection which is obviously wrong?
Now click Ok and the SQL designer opens together with an 'Add Table'
dialogbox. Select the Fish table twice, select all fields and connect the ID
fields. set ID = 5 and what do we do now?. The wizard did _not_ tell us what
to do with the sql file. Try to Save As and close the SQl designer. A correct
query is now sitting on the design surface, but the wizard should have saved
us from the panic experienced when closing the designer and not knowing if all
the preceeding work was lost.
Also the form 'Create SQL Query' would be much better if the lower radiobutton
was selected when it opens, the user doesn't know what to do when everything
looks like it is disabled, it is much better to let the user make his own
choice on a live form.
BTW said form should have been incorporated as a page in the wizard, its only
purpose is to ask for a file path in the same way as it is done in several
places in other wizards, it is unsetteling to be dumped first from the wizard
and then again into the SQL designer.
This posting became a little longer than intended, but hopfully it illustrates
why one may find that dQuery is not exactly userfriendly.
(Everything done with ldriver=windows in ini file)
Ivar B. Jessen
and not to specific coding errors. If this is the wrong group please move it
to a more suitable place.
In attempts to make dQuery work I have noticed that dQuery and especially its
wizards do not follow the MS Guidelines for designing Wizards and the end
result is that dQuery is experienced as a very user unfriendly application.
Definition of a wizard:
A wizard is a series of presentations or pages, displayed in a secondary
window, that helps the user trough a task. The pages include controls that you
define to gather input from the user; that input is then used to complete the
task for the user.
Especially the following items from the Guidelines are important:
A) Design your wizard pages to be easy to understand. It is important that
users immediately understand what a wizard is about so they don't feel like
they have to read it very carefully to understand what they have to answer.
B) Make certain that the design alternatives offered by your wizard provide
the user with positive results. You can use the context, such as the
selection, to determine what options may be reasonable to provide.
C) Avoid a wizard design that requires the user to leave the wizard to
complete a task. Less experienced users are often the primary users of a
wizard. Asking them to leave the wizard to perform a function can make them
loose their context. Instead, design your wizard so that the user can do
everything from within the wizard.
D) Make certain that it is obvious how the user can proceed when the wizard
has completed its process. This may be accompliced by the text you include on
the last part of the wizard.
Example 1) The user wants to create a simple query from the Fish table.
As an example of a typical wizard in dQuery press the button 'Create a SQL
Query'. A window opens and the text promises that "This wizard allows you to
create a Query with columns and rows by writing a SQL Select statement. A SQL
Select statement allows you to define which rows and columns you wish to
retrieve".
We want to retrieve all columns and rows and with that in mind proceed with
the default selection 'Create a Query from a single Table', which in the next
window displays a list of databases. By careful reading we find that if our
database is not in the list we have to leave the wizard. Why is that? This is
not userfriendly. It should be possible to proceed without leaving the wizard.
Why didn't the wizard in the first page open a window from which one or more
tables could be selected, and if necessary also databases?
Continue by selecting database 'dBASESamples' and table 'Fish', we now se a
checkbox and a disabled mover. It is not clear what to do next, careful
reading is again required. The first impression is that we can't select
individual columns at all and need to uncheck the checbox in order to select
all columns. It would be much better to remove the checkbox and let the user
see a live mover where he can make a selection.
Click Next and get an info page with a single radio button which can not be
deselected (What is the purpose?).
(Bug here, click the 'Back' button all the way to the first page of the wizard
and then go forward again, when you reach the info page the single radiobutton
has disappeared, click next and get error:
Error: Variable undefined: NORMALOBJECTCOLOR
File: qDialog.cc
Routine: QEXPRESSION::ENABLEBUILDCONTROLS
Line: 845 )
Click Next and get a page where it is possible to limit the rows in the query,
but when we started out we were promised the wizard could create a query with
columns and rows which we could select, but nobody said that the rows needed
to be limited.
The only buttons working are 'Back' which doesn't solve the problem, 'Cancel'
which will make us loose all the work done until now, and 'Help' which
indicates that help is not installed. In other the wizard gave us a choice,
specified what we ccould get and is now unable to deliver. The worst thing is
that it knew all the time that it couldn't make a simpel query containing all
columns and rows in a table.
It is of course possible to continue by setting a condition like 'ID is not
Empty', but this just underlines that the wizard is simply not doing its job,
which is to allow the user to create a simple query. A wizard should _never_
spring a surprise like this on an unaware user and give him the feeling that
he has just wasted time which could have been used better.
If a condition is selected the wizard finishes with a query on the design
surface.
Example 2) The user wants to export the Fish table to an Excel file.
Select File->Export Wizard... and read the text carefully. From the second
paragraph we learn that we need to set up a Custom View, whatever that is; let
us hope that the wizard knows.
The third paragraph tells us that if the Custom View button is disabled, we
need to set one up. The button may be the same as depicted to the right of the
text, however clicking on any button in dQuery just gives a 'ping!', nothing
is enabled. Again we have to belive the wizard can solve this problem.
Reading on we understand we have to cancel the wizard and use the Custom View
Wizard on the Tool Panel. So click Cancel and Yes to an unneccessary
messagebox and start looking for a Tool Panel. Put the mouse cursor over the
each of the twelve pushbuttons to see if they give access to a tool panel,
then click all the menu items and the buttons below the menu, still no Tool
Panel.
Give up on the Tool Panel and try clicking on the button 'Custom View Wizard',
bingo a Custom View Wizard opens, click Next and get an emty mover. Deep
disappointment, click Next, get error:
No Fields Selected
You must select at least one field.
This indicates that the designer of this wizard has not understood that it is
not allowed to use error messages in a wizard. If the wizard needs anything to
fill the mover it is the job of the wizard (and the programmer) to open
whatever pages, windows og dialog boxes to get the necessary information.
Give up on this wizard, we obviously got a wrong advice from the previous
wizard. Let us go back and start all over again <sigh>
Select File->Export Wizard..., ignore the text, click Next and select Excel
Spreadsheet, Next, click folder button and get msgbox:
No current Query
"Current Query" not available. There may be no active query in your
dataModule.
Hmm, doesn't the wizard know or is it too lazy to take a look? Click Ok and
select a file name in the getFile() dialog box which opens, Save, Next, Finish
and get the same msgbox as before.
How is it possible that we can get that far? This wizard is not doing its work
at all. Instead of checking if a table is available it let us jump through all
the hoops and comes up with said messagebox which, if you press Ok, is
followed by an error:
Error: Data type mismatch. Expecting Object
File: qDialog.cc
Routine: GENERICFIELDTYPES::GENERICFIELDTYPES
Line: 3397
If the fish table had been placed on the design surface before the wizard was
started and the computer did not have Excel installed, the wizard would have
taken the user through all the steps of selecting the type of query, the file
format, the name of the destination file and checking if Excel should be
opened or not, and then it would come up with a message box declaring that
Excel was not found.
It is a large misunderstanding if the designer of this wizard believes that it
is justified to end up with an error message and dump the user. We are not
talking about a coding error, but a message which the programmer found
necessary because he couldn't continue. And why did he paint himself into this
corner? He simply neglected to check for the existence of Excel before he
opened the page which allowed selection of export to Excel.
And why is it necessary to open a database connection in order to export a
simple table to *.xls. Let the user select his table and when the export is
finished tell him that if he needs to repeat the export from time time he
should select a database, for example a LocalDatabase ( "." in the BDE) and
save the setup as a dmd, ie only require and carry out the steps that are
necessary to serve the users purpose.
Example 3) The use wants to make a Join between two copies of the Fish table.
Click button 'Create SQL Query', select 'Create .. Join ..', Next, get a page
telling you that the wizard will launch Create SQL Object, whatever that is,
and the SQL Designer. Click Finish and a gray form opens. The upper
radiobutton is selected and the entryfield is grayed out, click on the folder
icon, a getFile() dialogbox opens, now type the name you want your new sql
file to have, click open and get error saying that the file can not be found.
Why does the wizard allow a selection which is obviously wrong?
Now click Ok and the SQL designer opens together with an 'Add Table'
dialogbox. Select the Fish table twice, select all fields and connect the ID
fields. set ID = 5 and what do we do now?. The wizard did _not_ tell us what
to do with the sql file. Try to Save As and close the SQl designer. A correct
query is now sitting on the design surface, but the wizard should have saved
us from the panic experienced when closing the designer and not knowing if all
the preceeding work was lost.
Also the form 'Create SQL Query' would be much better if the lower radiobutton
was selected when it opens, the user doesn't know what to do when everything
looks like it is disabled, it is much better to let the user make his own
choice on a live form.
BTW said form should have been incorporated as a page in the wizard, its only
purpose is to ask for a file path in the same way as it is done in several
places in other wizards, it is unsetteling to be dumped first from the wizard
and then again into the SQL designer.
This posting became a little longer than intended, but hopfully it illustrates
why one may find that dQuery is not exactly userfriendly.
(Everything done with ldriver=windows in ini file)
Ivar B. Jessen