Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When is an "interface" useful?

Tags:

oop

interface

OOP interfaces.

like image 399
TIMEX Avatar asked Oct 03 '26 07:10

TIMEX


1 Answers

In my own experience I find interfaces very useful when it comes to design and implement multiple inter-operating modules with multiple developers. For example, if there are two developers, one working on backend and other on frontend (UI) then they can start working in parallel once they have interfaces finalized. Thus, if everyone follows the defined contract then the integration later becomes painless. And thats what interfaces precisely do - define the contract!

Basically it avoids this situation : alt text

like image 138
Gopi Avatar answered Oct 05 '26 21:10

Gopi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!