Are there best practices for when it’s appropriate to use an interface?
Does this use much more resources than just having the code directly in a class, instead of creating this “layer”?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Interfaces are contracts that you typically expose so others can fulfill the contracts in your code. Unless you plan on having others work with your interfaces, or you plan to make multiple classes yourself to fullfull the interface you’re making a lot of work for yourself for little benefit.