4 ms·
Super nice, but TWO dependencies? jQuery I guess is okay, since it's already, well, everywhere - but backbone? Don't get me wrong, the first thing I thought wa
by tzaman 14y ago
Super nice, but TWO dependencies? jQuery I guess is okay, since it's already, well, everywhere - but backbone?
Don't get me wrong, the first thing I thought was "Gotta use this somewhere", but if I need Backbone (a great library for where it fits!) just to make alerts prettier, then no thanks.
- jlogsdon 14y agoYeah, that caught my attention as well. I think it's pretty insane for something like this to require backbone to work, the functionality is trivial to implement without Backbone.View.
- zackbloom 14y agoIt would be nice to get rid of Backbone. The chief dependency is the event parsing piggybacks on Backbone's, but it shouldn't be too hard to pull that code out and include it directly.
- tzaman 14y agoPing me (tomaz[at]codeable[dot]io) if you do that (getting rid of Backbone dependency), I'll be more than happy to include it in our product, since we're just in the middle of implementing a notification system.
- zackbloom 14y agoWilco: https://github.com/HubSpot/messenger/issues/9 https://github.com/HubSpot/messenger/issues/9
- tzaman 14y agoExcellent, and while you're at it, make it a proper jQuery plugin then advertise it like one. Review sites and bloggers will be more than happy to put it in their "Top X jQuery plugins" posts, giving you a wider reach.
- mikeryan 14y agoSomeone did pull out the events for you https://github.com/jrf0110/backbone-events https://github.com/jrf0110/backbone-events Not sure if they're keeping it up to date however.
- masklinn 14y agoWould probably be even better to use custom DOM events.
- davidw 14y agoPlus the examples are written in 'coffeescript':-/ Alert works in plain old javascript.
- lowboy 14y agoCoffescript is an actual thing - no need to use "quotations". Besides, Messenger will work with plain js too (or any other compile-to-js lang) it's just the examples that are in coffeescript. You can write an example for alert in cs: alert "Blammo! A coffeescript alert example"
- deleted 14y ago[deleted]
- jmathai 14y agoI believe the point is, why provide examples in CoffeeScript? Is there any benefit? I'd venture to say less than 1% of people who know JavaScript also know CoffeeScript. Personally, I was wondering what the language language it was.
- davidw 14y agoIf I see examples in Coffeescript, I'm not sure if you can also write it in Javascript, or if the whole thing is in Coffeescript or what.
- mcritz 14y agoI’m not clever enough for Coffeescript. I wish the examples were written in such a way that if I showed it to coworkers half of them wouldn’t roll their eyes.
- abraham 14y agoPlus backbone has a requirement of underscore so that's actually three dependencies.