You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Ross Allen <ro...@mesosphe.re> on 2013/07/23 04:14:29 UTC

Review Request 12830: Prefer "angular.forEach" to Underscore's "_.each"

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12830/
-----------------------------------------------------------

Review request for mesos.


Repository: mesos-git


Description
-------

Prefer "angular.forEach" to Underscore's "_.each"

Angular has no dependency on Underscore, and so it would be great to
remove any libraries that overlap with functionality provided by
Angular.

"angular.forEach" delegates to the native "forEach" if it exists like
Underscore.


Diffs
-----

  src/webui/master/static/js/controllers.js dae12b61001ff0c7379169242e5d125ef6ca141b 

Diff: https://reviews.apache.org/r/12830/diff/


Testing
-------


Thanks,

Ross Allen


Re: Review Request 12830: Prefer "angular.forEach" to Underscore's "_.each"

Posted by Ross Allen <ro...@mesosphe.re>.

> On July 25, 2013, 9 p.m., Ben Mahler wrote:
> > I actually quite like the underscore.js library, what would be the benefit from eliminating it?

`forEach` is implemented in Angular, and so Underscore's implementation is duplicate JavaScript. Underscore is great, but if Angular implements the functionality the UI needs, then we could drop a dependency.


- Ross


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12830/#review23861
-----------------------------------------------------------


On July 23, 2013, 2:14 a.m., Ross Allen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12830/
> -----------------------------------------------------------
> 
> (Updated July 23, 2013, 2:14 a.m.)
> 
> 
> Review request for mesos.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Prefer "angular.forEach" to Underscore's "_.each"
> 
> Angular has no dependency on Underscore, and so it would be great to
> remove any libraries that overlap with functionality provided by
> Angular.
> 
> "angular.forEach" delegates to the native "forEach" if it exists like
> Underscore.
> 
> 
> Diffs
> -----
> 
>   src/webui/master/static/js/controllers.js dae12b61001ff0c7379169242e5d125ef6ca141b 
> 
> Diff: https://reviews.apache.org/r/12830/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Ross Allen
> 
>


Re: Review Request 12830: Prefer "angular.forEach" to Underscore's "_.each"

Posted by Ross Allen <ro...@mesosphe.re>.

> On July 25, 2013, 9 p.m., Ben Mahler wrote:
> > I actually quite like the underscore.js library, what would be the benefit from eliminating it?
> 
> Ross Allen wrote:
>     `forEach` is implemented in Angular, and so Underscore's implementation is duplicate JavaScript. Underscore is great, but if Angular implements the functionality the UI needs, then we could drop a dependency.

After talking yesterday and an email about browser support, it makes more sense to move to the native Array.forEach implementation rather than temporarily move to angular.forEach for the sake of not using Underscore.

Nuking this commit from orbit.


- Ross


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12830/#review23861
-----------------------------------------------------------


On July 23, 2013, 2:14 a.m., Ross Allen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12830/
> -----------------------------------------------------------
> 
> (Updated July 23, 2013, 2:14 a.m.)
> 
> 
> Review request for mesos.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Prefer "angular.forEach" to Underscore's "_.each"
> 
> Angular has no dependency on Underscore, and so it would be great to
> remove any libraries that overlap with functionality provided by
> Angular.
> 
> "angular.forEach" delegates to the native "forEach" if it exists like
> Underscore.
> 
> 
> Diffs
> -----
> 
>   src/webui/master/static/js/controllers.js dae12b61001ff0c7379169242e5d125ef6ca141b 
> 
> Diff: https://reviews.apache.org/r/12830/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Ross Allen
> 
>


Re: Review Request 12830: Prefer "angular.forEach" to Underscore's "_.each"

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12830/#review23861
-----------------------------------------------------------


I actually quite like the underscore.js library, what would be the benefit from eliminating it?

- Ben Mahler


On July 23, 2013, 2:14 a.m., Ross Allen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12830/
> -----------------------------------------------------------
> 
> (Updated July 23, 2013, 2:14 a.m.)
> 
> 
> Review request for mesos.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Prefer "angular.forEach" to Underscore's "_.each"
> 
> Angular has no dependency on Underscore, and so it would be great to
> remove any libraries that overlap with functionality provided by
> Angular.
> 
> "angular.forEach" delegates to the native "forEach" if it exists like
> Underscore.
> 
> 
> Diffs
> -----
> 
>   src/webui/master/static/js/controllers.js dae12b61001ff0c7379169242e5d125ef6ca141b 
> 
> Diff: https://reviews.apache.org/r/12830/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Ross Allen
> 
>