4 ms·
Show HN: using Backbone to make multiselects useful
- swombat 15y agoNot putting down the project by any means, I'm sure it's useful, but worth pointing out that I just looked at it on my iPad and the "vanilla multiselect" was nicer and clearer, and easier to use, than the checkboxes!
- zidar 15y agoWhile I do agree that the "vanilla multiselect" is better on tablets (I just checked on my galaxy tab), I have to point out, that it's only better, because the tablet shows me that multiselect as a checkbox array. That is exactly what this checkbox-field does, so it looks to be a steb in the right direction. And one other thing, using multiselect in a browser with a mouse, I see no easy way of selecting just option 1 and 3, without holding the control key. This might seem perfectly normal to "us", but try telling that to someone with less computer skill. I bet that an average computer user would find the checkbox-field more intuitive.
- swombat 15y agoThe iPad has a native control, with no checkboxes in sight. Please note I said IPad, not tablet. Call me a dick, but I don't believe other tablets are worth considering as part of any relevant target market anyway, at least at this stage.
- zidar 15y agoBig market or not, my point was that I like the solution I see on my android device (tablet or a phone) and that it's a far better solution than what I see in the regular computer browser. And to turn your words around a bit, the number of desktop and leptop users surfing the web, is far greater than iPad users, so your iPad should not be considered a target market as well. But that is not the point, even if iPad has this native awesome solution, it's like you're saying "people should just by iPads to be able to use multiselect normally." This project is simple and easy and in my opinion, it helps make the web a bit nicer for developers and users.
- Swizec 15y agoYes, I noticed that too. iOS has a particularly lovely way of handling multiselects. However, if you really need to target multiple platforms, there's always media query magic you can use :)
- jrnkntl 15y agoI don't see the need for the Backbone and Handlebars requirements to accomplish this? Wouldn't writing it as a jQuery plugin or the like suffice?
- Swizec 15y agoYou're right, I could write it so the only dependency is jQuery. But using Backbone makes the implementation much cleaner and more robust. Especially considering there are three data representations that all have to be in sync: - the actual multiselect - the visible checkboxes - the internal state I thought about using pure jQuery, but my head soon started spinning and I decided to do it right.
- gillesmaes 15y agoI hope you don't mind, made a quick jQuery only version. http://gillesmaes.github.com/Multibox/ http://gillesmaes.github.com/Multibox/
- josscrowcroft 15y ago"You can use jQueries for that? :O"
- gmac 15y agoA bunch of checkboxes look better, but they are difficult for the backend developer to handle. Really? I've never found this a problem -- and if I did, I wouldn't push a load of JavaScript cruft to the front-end to work around it.
- alex_duncan 15y agoI really don't see the point. The problem it aims to overcome is the handling of the input on the back end, but surely just using checkboxes as an input array would accomplish the same thing e.g.: http://stackoverflow.com/questions/1010941/html-input-arrays http://stackoverflow.com/questions/1010941/html-input-arrays