What is an interface?

Asked

Viewed 258 times

1

Background (TL;DR):
I’m working on an ASP.NET project legacy, I was testing some features of it when I got an error in the browser console:
Failed to load resource: the server responded with a status of 500 (Internal Server Error) I promptly went to debug the code to find out what led to the error when I came across a method that received 2 parameters, but when I accessed it pressing F12 in Visual Studio, took me to a page with several list definitions with the name of the object.

When I asked my supervisor, he gave me a vague definition, saying that "method" was actually an interface, while searching I noticed that in many articles there is the phrase:

Interface is the name given to the way in which "communication" occurs between two distinct parts and which cannot connect directly.

In the case the interface in question was a query, but I see no benefits of adopting this type of implementation, since it makes it difficult to read the program and consequently makes it more difficult to solve the problems of the code.

Question:

  • What is the concept of interface in programming?
  • What are the benefits of using an interface in the implementation?
  • How I see the contents of an interface?
  • 1

    https://answall.com/questions/2913/em-orienta%C3%A7%C3%A3o-objects-by-which-interfaces-s%C3%A3o-%C3%Bateis

  • https://answall.com/q/23900/101, https://answall.com/q/86484/101, https://answall.com/q/3603/101 does one or the combination of these not give a duplicate? I think you can make it more specific and maybe less broad, but the way it is, more general, since it has already been answered.

  • @bigown yes, the combination of these satisfies what you were looking for, thank you very much

  • 1

    @Rovannlinhalis really the first topic and the second is basically the question on the link, thank you very much

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.