How-to build tagging system like SO ?
I'm using a unique textbox on my asp.net mvc website to submit "tags".
First of all, i tried to split tags with commas "asp.net, c#, sql server". It works but if user forgot to seperate tags with commas i've a problem to split that string.
"asp.net c# sql server" : sql server should be a single tag, not two "sql" + "server".
Moreover i "can't" (he should not take care about this ...) ask user to use "-" character to seperate words of the tag : "sql-server"
Someone help ?
Tagging provides a way for organizations to identify various resources on AWS — and can help companies understand their usage, costs, performance, and more. A tagging strategy defines specific rules and practices for an organization to follow and implement.
Tags help social marketers group and categorize posts for flexible reporting on content, creative and campaigns. Customers across industries use them to unlock key performance insights and move their strategies forward.
There's one (easy) way I can think of to allow your user to include any character in a tag. That solution is to allow the user to enter only one tag at a time. You could have a textbox where the user enters the tag (autocompletion for existing tags is a definite plus), presses enter or a button when finished entry, and the entered tags appear below the textbox in a list of applied tags. Those applied tags must have a button for each tag in order to allow the user to remove the tag.
Wordpress has a similar tagging mechanism when you create posts, but they allow multiple tags to be entered at once by simply stating what character delimits tags. Asking for a delimiter is not a big deal, but if you don't want to mandate a particular delimiter, you'll simply have to restrict the user to entering a single tag at a time.
Another Idea (edit)
I just read this today: Tokenizing Control
StackOverflow has exactly the same problem with users incorrectly entering tags, for example if you had entered 'string manipulation' instead of 'string-manipulation'. You've just changed the tag separator from space to comma.
The fundamental problem is still the same, so it is no surprise that the solution is also the same:
StackOverflow proves that this model can work well. An automated solution for correcting user errors will sometimes make errors itself because of the ambiguity you pointed out yourself. This will frustrate people who are doing it correctly only to be foiled by the software "fixing" their tags for them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With