0

I'm a junior dev and at work the senior dev that essentially mentors me into not being useless at the job heavily discourages adding a System.Net.Http dependency to a project within the solution as much as can be reasonably gotten away with.

From what I remember one of the issues with it is that it's supposed to be a really fat dependency to introduce to a project, but I'm wondering if from a package size aspect that matters much nowadays other than slowing down the speed of a deployment and fattening the binary?

Does that even matter if the dependency would be added to a library project within a solution that already has references to the dependency?

Outside of the context I described, are there other reasons to avoid packages such as System.Net.Http or any other ones that could perhaps in some way be notorious?

Scy
  • 245
  • 1
  • 12
  • By avoiding or reducing the dependencies you are effectively reducing the attack surface area for your app. – Ramesh Jan 31 '19 at 09:21
  • 4
    This question is entirely subjective, there is are plenty of reasons not to use something depending on what your environment is, and what the general consensus is within your work place/industry. The fact your boss said not to use it, then listen to what he/she is saying and make up your own mind – TheGeneral Jan 31 '19 at 09:26
  • I agree with @MichaelRandall. This question is totally subjective, and it may invite bias on personal opinions as answers. – Eriawan Kusumawardhono Jan 31 '19 at 09:31
  • 1
    Just ask your senior dev why he has this position. It is his job as a mentor to explain to you, not just tell "not to include", so far he is failing that. – Alex Buyny Jan 31 '19 at 09:55
  • https://stackoverflow.com/questions/21667319/why-is-there-both-a-system-net-http-and-system-web-http-namespace might be useful. But in general the lesser dependencies you`ve got the better - unless you really need them. But if you really need exact package - there is no other way and you add dependency – Vladimir Jan 31 '19 at 10:58

0 Answers0