On Dec 16, 11:55 am, Scott <
scott...@gmail.com> wrote:
> Geoffrey, do you know why this requirement was added?
I'm not sure why it was added. The assumption may be that the default
use of the sortable tag is to sort something and then notify the
server about it.
It was used as an introductory example in the screencast, so the hit
to the server wasn't needed. You can also use Scriptaculous sortables
directly (in Javascript) without hitting a server.
> Also, you say
> that the url is irrelevant but sortable_element still makes an
> unnecessary ajax call to the server which adds overhead to the client
> and the server. It doesn't make sense to me why this requirement was
> added.
I think that in most cases, you would want to hit the server with the
results of the sort. However, this requires more controller and model
code than was being taught at this point in the screencast.
As for the performance hit, it's pretty minimal. If you really wanted
to do a sort and not hit the server, you could use Javascript directly
as mentioned above.
Geoffrey Grosenbach
http://peepcode.com