News for hackers. Stuff that matters.
Re:Sort tables fast with Sortable.js by zackbloom on Tuesday December 03, 2013 @01:21PM (#6842043)
I'm a little biased, but just from reading through, it looks like the original does some pretty out-of-date things. I'm annotating the copy in the new project's repo, just to allow me to link to line numbers, but this IS THE LEGACY PROJECT'S CODE:

- Webdings: https://github.com/HubSpot/sortable/blob/37894eb51bda9f0e438...

- Using class names, rather than data attributes, for everything: https://github.com/HubSpot/sortable/blob/37894eb51bda9f0e438...

- Hardcoded date formats which would make localization tough: https://github.com/HubSpot/sortable/blob/37894eb51bda9f0e438...

- Sorting in JavaScript (not using Array.prototype.sort): https://github.com/HubSpot/sortable/blob/37894eb51bda9f0e438...

- Overriding event bindings in a destructive manner: https://github.com/HubSpot/sortable/blob/37894eb51bda9f0e438...

Not to mention stuff I just find objectionable:

- Useless comments: https://github.com/HubSpot/sortable/blob/37894eb51bda9f0e438...

- Mistabbing: https://github.com/HubSpot/sortable/blob/37894eb51bda9f0e438...

It also looks like this one is 1/3 the length.

To be fair though, the original was written seven years ago, and still works, so it's not really fair to criticize it by modern standards. Suffice it to say that it was time for something new.

There are no comments on this comment yet.