870Part VCase StudiesFor one thing, we don t like (My web site)

870Part VCase StudiesFor one thing, we don t like the fact that you have to do two things to submit a rating (choosea radio button and then click Submit) rather than one. Long before we were aware of any one-click patent controversy, we had a one-click version of such a rating system on theMysteryGuide site (www.mysteryguide.com) this made each voting alternative into itsown Submit button, so that only one user action was needed. The problem with this is that, although the radio-button code in this chapter manipulates three different values (the vari- able name, the corresponding submitted value, and the text displayed in association with thebutton), you really only have two alternatives with a Submit button: the name of the variableand the value (which will also be the text displayed in the button). There is no good way, forexample, to display meaningful text and actually submit something else when clicked (like adatabase ID). The alternatives are 1) to resort to JavaScript; 2) to use radio buttons instead(as in this chapter); or 3) to somehow map from submitted text back to the value you reallywant to send (as we do on the MysteryGuide site). Probably Javascript is the way to go. Another improvement that our rating system needs is better prevention of ballot stuffing. Inthis chapter, we present the weakest defense to multiple voting for the same item: The ratingsform disappears in response to detecting a ratings submission, so the user cannot simplyclick a button on the same page over and over. However, nothing stops our user from hittingthe Back button or typing in the original URL to get the form back again, and repeating adnauseum. Any better technique needs to start with identifying multiple requests as actuallycoming from the same person see Chapter 24 for a discussion of how to do this. SummaryIn this chapter, we have shown you a system that lets users rate your pages, and we havetaken you through how it hooks up to a minimal content site. The code lets users rateitems, and it displays a summary page of votes. We also discussed some ways in which youcould take this code and extend it to make it more useful and interesting. We hope we vemade it easy to detach it from our sample content domain (a small set of quotations) and tosnap it back on to some content you care about. …
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.

Leave a Reply