A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.
One of the most boring, and in my opinion pretty hard functions to develop, are the ones that delete stuff. Say a routine that deletes a category which may or not have something in them.
I just can't make my mind up what is the better take on this "problem":
1. Don't delete if it's not empty, force the user to delete the items that's in the category first.
2. Delete the category if the user agrees that the items in it also will be removed.
3. Delete the category, but move the existing items into another category.
What do you think / do ?
Option D - The answer cannot be determined from the information given.
It depends on how important the information is, why it's in that category, and how serious the consequences are when it's gone.
The way my Palm OS PDA does it is if I delete a category of, say, contacts, it moves all the contacts in that category to the "Unfiled" category. That makes a lot more sense than deleting them. On the other hand, if I delete a folder in Windows, it's a pretty good bet that I don't want those files anymore, and I'd be pretty irritated if Windows "helpfully" said "I've put those files in the 'Misc' folder for you!"
So we can't answer this question without knowing the context.
The question is a bit broad here, and you don’t define in what context.
but here my 2 cents on this:
>2. Delete the category if the user agrees that the items in it also will be removed.
This is the best option, no need to make the user go and delete things one by one. Why force all that extra work? Further, think of what the windows “folder” behaviors like when you delete one?
I have a TON of applications that deal with this problem. However, my solutions (answer) is usually easy. You just have to ask does the sub-category ever require some type of “ACTION” or does the sub-category have some restrictions on deletions also?
If none, or only a simple “yes” is needed, then you allow a wholesale delete of the sub-stuff. (the typical “yes to all” prompt).
I should note that you likely should give a prompt that asks the “yes to all” question, but I don’t see any more need…
For example, I can allow a user to delete tour booking, and if no invoices have been generated to the individuals, then I can delete the booking. I should point out that relational database theory, or sub-categories in a folder, or whatever is really the same thing!!
However, if the group booking has some invoices data, then booking cannot be deleted (you can un-book however).
So, my answer is that in cases where the sub-category (whatever it may be) can have restrictions on deleting, then you can’t do a whole sale deletion without first telling the user to go and remove/fix/update those sub-categories until they are in a state that allows them ALL to be deleted. So, my software often tells the user that what they are about to do cannot be done until they go and fix/update/delete whatever and then will be allowed to delete wholesale.
>1. Don't delete if it's not empty, force the user to delete the items that's in the category first.
As mentioned, this is usually my case for applications, but that because I have restraints on what can be deleted in the levels below. If there none restrictions, and NO ACTION needs to be taken for each sub-category (except that of a confirm delete), then you go with the whole sale deletion. No need to go one by one here again.
>3. Delete the category, but move the existing items into another category.
You don’t mention to where, and again the issue of user intervention comes into play. If you can willy nilly move the stuff without a problem, then you likely can willy nilly delete the stuff, so, why not just delete it?
You have to assume users are intelligent here, and they will learn what their actions and what the consequences of deleting something does.
If you can allow wholesale deletion with a single “yes”, then that is what you offer. As I said, in my cases, often some other action then deletion needs to be done, so simply can’t allow wholesale deletion. (hence, this will decide which option, eg: "1" or "2" to use for me).
So, if you can allow a yes to delete , and perhaps confirm like windows does with a “yes to all”, then that seems the best to me.
It also depends on if a un-do is available, or fact what kind of operation it is.
A easy “yes” to deleing the root folder and all below on a OS is not great for example.
Albert D. Kallal
Edmonton, Alberta Canada
Albert D. Kallal
Tuesday, November 01, 2005
This topic is archived. No further replies will be accepted.Other recent topics
Powered by FogBugz