luisfarzati/ng-bs-daterangepicker

Best Practices and Anti-Patterns

Closed this issue · 3 comments

You guys should see if you fall into them https://github.com/angular/angular.js/wiki/Best-Practices, https://github.com/angular/angular.js/wiki/Anti-Patterns

particularly this:

The ng- is reserved for core directives. STOP USING IT

and this:

Stop releasing the same plugin 8 other people released. Learn to fork and pull request instead.

p.s. cool project, but have you seen http://angular-ui.github.io/bootstrap/#/datepicker

Hi Jason, are you just an educated troll, or you just lack the skill to read?

1- Please tell me where do you see my directive prefixed with ng-. Actually, the directive doesn't even have a custom name; it's attached to the input element. Have you at least read the source code or did you just saw an "ng-" somewhere and jumped from your seat?

Or is it the module name what it bothers you? Because that's a different story.

2- The angular-ui datepicker is precisely that: a datepicker. One date only. This, on the other hand, is for a range of dates. Start date - end date. Of course you can build a date range picker using 2 angular-ui datepickers, but it happens that I liked Dan Grossman's control much more.

Sure, I could PR' this control to the angular-ui library, but they have their requirements for PRs (like having test coverage and stuff) which I don't have time to do. So in any case, you better do rather than talk and contribute by fitting this control into the angular-ui suite.

Thanks.

Hi Luis,

I meant no disrespect. Actually, a surprising number of AngularJS community members have never seen the pages I indicated above. It's totally up to you to follow the guidelines, but I figured I'd my duty to the AngularJS community and disseminate the knowledge of these guidelines in an effort to improve the overall quality of the AngularJS plugin ecosystem. For example, the module name 'ngBootstrap' could easily clash with another module out there. These guidelines may prove useful as you improve upon your project.

Best of luck with your project!

No problem, I really appreciate your clarified answer. Now it seems much less rude and definitely doesn't sound troll :)

While I agree with you on the guidelines and best practices, it's also worth noting that I don't consider "ui" to be a good name either (don't know about you, but I think it makes sense for my app to have an "ui" module or set of modules?) nonetheless a lot of people use angular-ui without complaining. In fact, several angular-ui modules started being named 'ngSomething' (ui-router ex ngStates).

My point is: it's not such a big deal. This is the open source universe. Some authors suck at picking names, some others don't, some others don't know or care about guidelines. But in the end, all it takes is for someone to politely suggest a new name and that's it.

I acknowledge that ng-bs-daterangepicker doesn't strictly follow the Angular guidelines regarding naming, and my only reason was to just put a name that makes sense. Feel free you or anybody to suggest a better name. :)