re: jquery novice to ninja, p271 - jQuery UI sortable ‘07/15_sortables/script.js’
I’ve been having a go at some of this stuff and I have to admit, while it looks ‘neat’ it seems totally pointless. For instance, dropping stuff in the bin - as soon as you refresh the screen everything is back. Why is there no demonstration of how to actually remove the ‘file’. It doesn’t even demonstrate removal of the filename from the text file.
So that wasn’t the issue, that was just the theme of what I’m trying to say. In chapter 07/15 we are trying to reorder lists. Seriously, I need to know why.
Lets say I go to a palm reader and this person holds up 3 of my fingers. What difference does it make that I can change which 3 fingers I am holding up? Who cares? Using jquery to re-order a list on my browser doesn’t really do anything! I go away. I come back. It has reverted. So what?
If several people were creating a preference list then I would want to record an order of preference for that person. Naturally that would be on a database and I would have a record for each person. To view the average public version I would do some maths with the whole database results… bare with me, I’m thinking off the top of my head. Ok, so now you may look at your list and compare it to the public version. There is something in that. But without a connection to other people or any permanence, all I’m doing by moving stuff around on the page is wasting my time.
I managed to connect previous samples of the book to a local database to generate a list of image names. But that was reading a database. Am I supposed to write Ajax code to update a database on the fly while some plank is twiddling around the order of a list? haha. Ridiculous.
However, lets say I did go along with that. How dissapointed would I be to write all that jquery, external php and sql pages only to find that the jquery sortable behavoir only changes the order of items in the browser cache. Which means ofcourse, even if I put a submit button in, reordered everything and sent the data to the server, it would still only be the same data that was originally there before the page was first viewed.
So I am effectively reordering my fingers, but the palm reader refuses to do anything significant until my fingers are back to where they were - the ability to twiddle my fingers is ‘irrelevant’. As I see it, so is this ‘sortable’ feature.
So, now that you’ve read this far, you now have the right to be-little me with the obvious point that I am apparantly missing.